Menu

Mattering Automations Turso integration

Connect Turso to Mattering Automations: databases, groups and replica locations, members and invites, audit logs, usage, plans and billing, and both platform and SQL token minting as workflow steps, authenticated with one platform API token and your organization slug.

The Mattering Automations Turso integration puts Turso's Platform API on your automation canvas: create and configure databases inside groups, branch a database from a point in time, add and remove replica locations, mint and revoke SQL tokens and platform tokens, read usage, stats, plans, subscriptions and invoices, walk the audit log, and manage organization members and invites. All 49 operations in Turso's published Platform API document are built as 49 nodes.

The credential is a platform API token minted with the Turso CLI, sent as an Authorization Bearer header, plus one non-secret field: your organization slug. The slug is on the credential rather than on the nodes because 44 of the 49 operations put it in the URL path, and because Turso scopes its own tokens to one organization by design. One connection therefore addresses one Turso organization.

One boundary is deliberate and better read now than discovered later: this integration talks to the control plane only and never touches a database's own hostname, so there is no node here that runs SQL against your data. Turso documents platform tokens and SQL-engine tokens as two independent credential systems that share neither key material nor vocabulary, so a query node would need a live database token pasted into its configuration. Instead, Turso: Create Database Token and Turso: Create Group Token mint those tokens for whatever does the querying, and this integration never consumes them.

Before you start

  • A Turso account and an organization you can mint a platform API token for. For a personal account the organization slug is your username.
  • The Turso CLI, which is how platform API tokens are minted. Mint the token scoped to one organization rather than leaving it unrestricted: Turso documents unrestricted cross-organization tokens as deprecated and due for removal in a future release.
  • A group, or the intent to create one. Databases are created into groups, so a fresh organization needs Turso: Create Group before Turso: Create Database will work, and creating a database into a group that does not exist returns HTTP 400.
  • Awareness of what your token's restriction level gates, because this is credential-level gating rather than plan-level. An organization-scoped token reaches everything in this integration. A group-scoped token cannot create, delete or transfer a group at any scope and will answer those three nodes with 403 no matter which scopes it holds.
  • An understanding that capacity is plan-gated and surfaces as HTTP 402. Turso gates database count, storage, groups, locations, rows read and rows written by plan, and a refusal comes back as 402 Payment Required rather than as a permission error. Turso: List Plans reads your account's real quota numbers from the API rather than from a pricing page, which is the honest way to know where the ceilings are.
  • A Mattering workspace with access to the Automations app.
  • Not required and not stored here: a database SQL token. Those are minted by this integration and consumed by your application, never by these nodes.

Mint a Turso platform API token

Turso authenticates the Platform API with a bearer token minted through the Turso CLI. The credential here carries that token plus your organization slug, because almost every operation puts the slug in the path and Turso's own client takes the two together.

Sign in with the Turso CLI on a machine you trust.
Mint a platform API token with the CLI, scoped to the organization you want to automate rather than leaving it unrestricted.
Copy the token when the CLI prints it. Turso does not reveal token material a second time, so a lost token is replaced rather than recovered. Mint it scoped to one organization: Turso has deprecated unrestricted cross-organization tokens and states they will be removed.
Read your organization slug from the CLI's organization list. For a personal account it is your username, and after connecting you can also read it from Turso: List Organizations at data[].slug.
A group-scoped token is narrower than an organization-scoped one and cannot create, delete or transfer a group at any scope. If you intend to automate group lifecycle, mint an organization-scoped token.

Connect Turso to Mattering

In Mattering Automations, open Connectors and click Add Connector.
Choose Turso from the list.
Click Create new credential, paste the token into API Token, put your organization slug into Organization Slug, and save.
The credential is stored encrypted in Google Secret Manager and never appears in workflow logs.
Click Test Connection. Mattering reads the organization named by the slug, which checks both halves of the credential in one call and reports the organization's name and plan on success. The failures are distinguishable on purpose: 401 means the token is bad or expired, 403 usually means a group-scoped token hitting an organization-level route, and 404 means the token is fine and the slug is wrong.
A simpler token-only check would pass with a valid token and a completely wrong slug, and then 44 nodes would fail at run time. Verifying the half people actually get wrong is the whole point of this test.
Click Connect. All 49 Turso nodes appear in your canvas palette.

Verify it works

Open any automation canvas and check the palette for a Turso section. Drop Turso: List Organizations onto it and run a test step. It takes no configuration, and it confirms in one read that the token works and that the slug on your credential is one of the organizations listed. Note the response shape while you are here: this one is a TOP-LEVEL ARRAY, so paths read data[].slug rather than data.organizations[].slug. Every user has a personal organization whose slug is their username.

Now check the structure the rest of the integration hangs off. Drop Turso: List Groups onto the canvas and run it, then Turso: List Databases. Databases live inside groups, so an empty group list on a fresh organization is expected rather than a fault, and it tells you Turso: Create Group is the first write to make. Field names follow Turso's own capitalization on the wire, so a database name reads as data.databases[].Name.

Finish with a read that proves the credential reaches the organization scope, not just the account. Drop Turso: Get Organization onto the canvas and run it: it returns the organization's name, type, plan and billing timeline, and whether reads or writes are currently blocked account-wide, which is a useful thing to have seen once before you ever need it. Everything in this path is read-only, so it cannot reach any of the seven destructive nodes and is safe to re-run whenever you rotate the token.

Node reference

49 nodes, generated from the connector itself so this reference always matches what ships.

Read and query nodes 25

Turso: Get Current Subscription

turso_get_subscription

Read the organization's current subscription: the plan name, whether it is billed monthly or yearly, and whether overages are enabled. Pair with Turso: List Plans to turn the plan name into its quota numbers.

Turso: Get Current User

turso_get_current_user

Read the account the platform token belongs to: username, display name, primary email, avatar URL, current plan, whether multi-factor authentication is enabled and whether there are pending organization invites waiting.

Turso: Get Database

turso_get_database

Read one database: its UUID, the hostname clients connect to, its group, primary and replica regions, delete-protection flag and blocked read/write status. Turso documents no operation-polling endpoint, so read a newly-created database back with this node rather than assuming it is ready to accept connections.

Turso: Get Database Configuration

turso_get_database_configuration

Read a database's settings: size limit, whether other databases may ATTACH to it, whether reads or writes are blocked, whether delete protection is on, and any IP or AWS VPC allow lists. The response is a FLAT object with no wrapper key, so paths read data.size_limit rather than data.configuration.size_limit.

Turso: Get Database Instance

turso_get_database_instance

Read one instance of a database by its location code: UUID, primary or replica, region and hostname.

Turso: Get Database Stats

turso_get_database_stats

Read the top queries running against a database, each with the rows it read and the rows it wrote. This is the node that finds the expensive query behind a usage spike, since Turso bills on rows read and written. The query text comes back verbatim, so treat the output as potentially revealing about schema and application behaviour.

Turso: Get Database Usage

turso_get_database_usage

Read one database's usage over a time period: rows read, rows written, storage bytes and bytes synced, both as a total and broken down per instance. Both bounds default to the current calendar month. The response carries NO per-day rows: it is a single aggregate for whatever window you ask for, so building a daily series means one request per day. storage_bytes is a size at a point in time and must never be added across windows.

Turso: Get Group

turso_get_group

Read one group: name, UUID, primary location, the full list of locations it replicates to, delete-protection flag and the libSQL version its databases run. Also the source for the location picker on Turso: Remove Location From Group.

Turso: Get Group Configuration

turso_get_group_configuration

Read a group's configuration. The only documented setting is delete_protection, which when enabled prevents the group and all its databases from being deleted. The response is a FLAT object with no wrapper key, so the path is data.delete_protection.

Turso: Get Member

turso_get_member

Read one organization member by username: their email and their role. A username that is not a member returns HTTP 404 with error could not find member.

Turso: Get Organization

turso_get_organization

Read the organization the credential is scoped to: name, slug, whether it is a personal or team account, its plan and billing timeline, whether overages are enabled, whether MFA is required, and whether reads or writes are currently blocked account-wide. Blocked reads or writes here explain an otherwise baffling wave of client failures. A slug that does not exist returns HTTP 404, which makes this the cheapest way to confirm the credential's organization_slug is right.

Turso: Get Organization Usage

turso_get_organization_usage

Read the organization's usage for the CURRENT BILLING CYCLE: rows read and written, storage bytes, bytes synced, plus a per-database breakdown. Takes no date range at all, unlike the per-database usage node, so it always describes the cycle in progress and cannot be windowed or back-filled. Compare against Turso: List Plans to see how close the account is to a quota.

Turso: List API Tokens

turso_list_api_tokens

List the platform API tokens belonging to the authenticated USER, with each token's name, id, the organization it is restricted to, the group it is pinned to if it is group-scoped, its expanded scopes and its creation date. Token material is never returned by any read. This lists the caller's own tokens across organizations; for tokens scoped to one organization including other people's, use Turso: List Organization API Tokens.

Turso: List Audit Logs

turso_list_audit_logs

Read the organization's audit trail newest first: who did what, when, and from the CLI or the web. Codes include db-create, db-delete, db-protect, db-token-create, group-token-create, user-token-create, instance-create, instance-delete, group-create, group-delete, group-unarchive, org-member-add, org-member-rm, org-plan-update and org-set-overages. Paginated with page and page_size; the response carries page, page_size, total_pages and total_rows under data.pagination. Note this is PAGE-NUMBER pagination rather than a cursor, so rows can shift between pages while new events arrive.

Turso: List Database Instances

turso_list_database_instances

List the physical copies of a database: one primary plus a replica in each additional location the group covers. Each instance carries its UUID, its location code as the name, whether it is primary or replica, and its own hostname. Instances follow the GROUP's locations; you change them with Turso: Add Location To Group rather than per database.

Turso: List Databases

turso_list_databases

List every database in the organization, each with its name, UUID, connection hostname, group, primary region, replica regions, delete-protection flag and blocked read/write status. A branched database also carries a parent object with the source database id and the time it was branched. This is the lister behind every database picker in this connector. Field names follow the vendor's capitalization: data.databases[].Name.

Turso: List Groups

turso_list_groups

List the organization's groups. A group is the unit that owns locations: every database inside it is replicated to the same set of regions and shares one signing key. Each group returns its name, UUID, primary location and delete-protection flag. The version and locations fields are marked deprecated by Turso but are still returned.

Turso: List Invites

turso_list_invites

List the organization's PENDING invites with the invited email, the role they were offered and when the invite was created. Accepted invites drop off this list and appear under Turso: List Members instead, so this is the node for chasing invitations nobody has accepted. Note the v2 path.

Turso: List Invoices

turso_list_invoices

List the organization's invoices with amount due, due date, when each was paid, when payment last failed, and a downloadable PDF link. The payment_failed_at field is the one worth alerting on: a failed payment is what precedes an account being blocked.

Turso: List Locations

turso_list_locations

List every location a group or database can be created or replicated in. The response is a MAP keyed by location code, not a list, so one location reads as data.locations.aws-us-east-1 and there is no data.locations[].code path. Use this to find the code for Turso: Create Group or Turso: Add Location To Group.

Turso: List Members

turso_list_members

List the organization's members with their username, email and role. Roles are owner, admin, member and viewer; owner is reported here but cannot be assigned through the API. This is the lister behind every member picker in this connector.

Turso: List Organization API Tokens

turso_list_organization_api_tokens

List the platform API tokens scoped to this organization, both organization-scoped and group-scoped, each with the member who minted it under owner. What you see depends on your role: admins and owners see every token scoped to the organization, while members and viewers see only the ones they minted themselves. Deprecated unrestricted tokens do not appear here at all; find those with Turso: List API Tokens. This is the audit node for finding forgotten credentials.

Turso: List Organizations

turso_list_organizations

List the organizations this token can act on, each with its SLUG, type (personal or team), plan, overage setting and whether reads or writes are currently blocked. Run this first: the slug it returns is the value the Turso credential needs, and almost every other node in this connector is scoped by it. Note this response is a TOP-LEVEL ARRAY, so paths read data[].slug rather than data.organizations[].slug. Every user has a personal organization whose slug is their username.

Turso: List Plans

turso_list_plans

List the plans available to this organization with their prices and QUOTAS: rows read, rows written, database count, location count, storage bytes, group count and bytes synced. This is the only non-guessing way to read what Turso allows an account, and it is the node to reach for when a create call starts returning HTTP 402. The numbers come from the live API rather than from a pricing page, so they reflect what the account is actually entitled to.

Turso: Validate API Token

turso_validate_api_token

Check that the stored platform API token is still valid and read when it expires. Returns data.exp as unix epoch seconds or -1 when the token never expires. This is the cheapest possible credential check: no organization in the path and no parameters and no secret material echoed back. An invalid or expired token answers HTTP 401.

Action nodes 24

Turso: Add Location To Group

turso_add_group_location

Replicate a group into an additional region. Every database in the group gains a read replica there, which is how you put data near users. An unknown code returns HTTP 400 with error invalid location, and exceeding the plan's location quota surfaces as HTTP 402. The response returns the group's new full location list.

Turso: Add Member

turso_add_member

Add an EXISTING Turso user to the organization by username, with immediate effect and no invitation step. Use Turso: Create Invite instead when the person does not already have a Turso account or when you only have their email. An unknown username returns HTTP 404 and someone already in the organization returns HTTP 409.

Turso: Create API Token

turso_create_api_token

Mint a new PLATFORM API token, the credential that calls this API. THE RESPONSE CONTAINS THE TOKEN AT data.token AND TURSO NEVER REVEALS IT AGAIN, so whatever consumes this node is the only thing that will ever see it, and it will be stored in this run's execution record. Three levels of restriction, narrowest last: leave organization blank for an unrestricted token, which Turso has DEPRECATED and will remove; set organization for an organization-scoped token; set organization plus group plus scopes for a group-scoped token, which the caller must be an admin or owner to mint. Prefer the narrowest that works.

Turso: Create Database

turso_create_database

Create a database inside an EXISTING group. The group must already exist: creating a database into a group that does not returns HTTP 400 with error group not found, and a name already in use returns HTTP 409. The response carries only the new name, DbId and Hostname, so read it back with Turso: Get Database for the full record. The seed object also drives two other workflows: copying an existing database (optionally at a past timestamp, which is how point-in-time recovery works) and preparing a database to receive an uploaded SQLite file. Plan quotas apply and a refusal surfaces as HTTP 402.

Turso: Create Database Token

turso_create_database_token

Mint a SQL token for one database. This is the second half of the database-per-user pattern: create the database, mint its token, hand the hostname and token to the tenant. THE RESPONSE CONTAINS A LIVE CREDENTIAL at data.jwt, which will be stored in this run's execution record, so treat the run output accordingly. This token is a SQL-engine credential and is a different thing from the platform API token this connector authenticates with; it cannot call the Platform API and the platform token cannot query a database. Set authorization to read-only for anything that should not write. Existing tokens are unaffected by minting a new one; only Turso: Invalidate Database Tokens revokes them.

Turso: Create Group

turso_create_group

Create a group in a primary location. Databases are created into groups, so this is the first call in a fresh organization. A name already in use returns HTTP 409, and a group count over the plan quota surfaces as HTTP 402. Note that a group-scoped API token cannot call this at any scope: group create is gated to organization-level credentials.

Turso: Create Group Token

turso_create_group_token

Mint one SQL token that works against EVERY database in the group, including databases created later. That is its point and also its risk: it is the right credential for an application that owns a whole group and the wrong one for a single tenant, who should get a per-database token from Turso: Create Database Token instead. THE RESPONSE CONTAINS A LIVE CREDENTIAL at data.jwt and will be stored in this run's execution record. Like the database token this is a SQL-engine credential and cannot call the Platform API.

Turso: Create Invite

turso_create_invite

Invite someone to the organization. Supply EXACTLY ONE of email or username: an email works even when the person has no Turso account yet, in which case they get a signup link, while a username targets an existing user. An existing pending invite for the same email is REPLACED rather than duplicated, which makes this safely repeatable. Membership only takes effect when they accept; use Turso: Add Member for an immediate add.

Turso: Delete Database

turso_delete_database

DESTRUCTIVE AND IRREVERSIBLE. Delete a database and everything stored in it. Be precise about what point-in-time recovery does and does not cover here: Turso PITR restores by creating a NEW database FROM AN EXISTING one at a past timestamp, so it protects against mistakes made INSIDE a database that still exists, such as a dropped table. Nothing in the Platform API reference or the PITR documentation describes restoring a database once it has been deleted. What IS recoverable is whatever you copied out beforehand with Turso: Create Database using a seed. Every SQL token issued for this database also stops being useful. The call is refused while delete_protection is enabled on the database; turn it off with Turso: Update Database Configuration first. The response returns just the deleted name as a STRING at data.database.

Turso: Delete Group

turso_delete_group

DESTRUCTIVE AND IRREVERSIBLE. Delete a group. This is the widest blast radius in the connector: the group's own configuration documents delete protection as preventing the group AND ALL ITS DATABASES from being deleted, so every database inside goes with it, and Turso's authentication documentation states that deleting a group cascades a revoke to every API token scoped to it. What is NOT recoverable: the databases and their data, since point-in-time recovery works by copying from a database that still exists, and the revoked tokens. What IS recoverable: nothing, unless the databases were copied out beforehand. Refused while the group's delete_protection is enabled. Group delete is also unreachable from a group-scoped token at any scope.

Turso: Delete Invite

turso_delete_invite

Withdraw a pending invite by the email it was sent to. Fully reversible: re-inviting the same address restores the same offer, and nothing about the organization changes. An email with no pending invite returns HTTP 404 with error invite not found. The email is a PATH segment and is URL-encoded for you.

Turso: Invalidate Database Tokens

turso_invalidate_database_tokens

DESTRUCTIVE AND IRREVERSIBLE. Rotate the database's signing key, which invalidates EVERY SQL token ever issued for this database, at once and with no grace period. No data is lost and the database keeps running, but every application, service and integration holding an old token starts failing authentication immediately and stays broken until it is given a freshly minted token. Old tokens cannot be brought back. Use this when a token has leaked; do not use it as routine hygiene unless every consumer can be re-issued in the same operation. Answers with an empty body.

Turso: Invalidate Group Tokens

turso_invalidate_group_tokens

DESTRUCTIVE AND IRREVERSIBLE. Rotate the GROUP's signing key, invalidating every SQL token ever issued against ANY database in the group, group tokens and per-database tokens alike. This is the widest credential revocation in the connector: in a database-per-tenant setup it logs out every tenant at once. No data is lost and the databases keep running, but nothing can connect until every consumer has been re-issued a token, and the old ones cannot be brought back. Answers with an empty body.

Turso: Remove Location From Group

turso_remove_group_location

Stop replicating a group into a region. The replica copies in that location are dropped, so clients there lose their nearby read path and fall back to a further one. This is NOT irreversible and it does not lose data: the primary still holds everything and adding the location back re-replicates it, at the cost of a resync. Turso does not document what happens if you name the group's PRIMARY location, so do not aim this at data.group.primary.

Turso: Remove Member

turso_remove_member

Remove a member from the organization. Their access ends immediately. NOT irreversible and no data is lost: the organization's databases and groups are untouched and the same person can be added back with Turso: Add Member, though they lose the role they had unless you set it again. Classed Destructive so the endpoint test matrix does not quietly eject a real colleague from a live organization.

Turso: Revoke API Token

turso_revoke_api_token

DESTRUCTIVE AND IRREVERSIBLE. Revoke one of your own platform API tokens by NAME. It stops working immediately and anything using it, including possibly this connector's own credential, starts returning HTTP 401. The token cannot be restored: Turso never revealed the material a second time, so recovery means minting a new token and updating every consumer. No databases or data are affected.

Turso: Revoke Organization API Token

turso_revoke_organization_api_token

DESTRUCTIVE AND IRREVERSIBLE. Revoke a token scoped to this organization, addressed by its ID rather than its name because names are unique per user and an admin revoking a member's token cannot disambiguate by name alone. It stops working immediately and whatever was using it starts returning HTTP 401; it cannot be restored, only replaced. Admins and owners can revoke any token scoped to the organization; members and viewers can revoke only their own. No databases or data are affected.

Turso: Transfer Group

turso_transfer_group

Move a group and every database in it to another organization you own or belong to. Be precise about what is and is not undoable: the MOVE itself can be reversed by transferring back if you hold rights in both organizations, but Turso's authentication documentation states that transferring a group cascades a revoke to every API token scoped to it, and revoked tokens never come back. After a transfer this connector's credential no longer reaches the group at all, because the credential carries one organization slug; you need a credential for the destination organization. Group transfer is also unreachable from a group-scoped token at any scope. Usage and billing move with the group.

Turso: Unarchive Group

turso_unarchive_group

Wake a group that Turso archived for inactivity. Archived groups stop serving their databases until this is called, so a scheduled workflow that hits an archived group can call this first and then retry. No data is lost by archiving; the group returns with everything in it.

Turso: Update Database Configuration

turso_update_database_configuration

Change a database's settings in place. Every field is optional and only the ones you fill are sent. Two of them take a live database offline the moment they are set: block_reads and block_writes make the database reject client queries until they are turned off again, which is useful as a deliberate freeze and painful by accident. delete_protection is the safety catch that makes Turso: Delete Database refuse. Setting allowed_ips restricts which addresses can connect at all.

Turso: Update Databases In Group

turso_update_group_databases

Upgrade every database in the group to the latest libSQL server version. Marked destructive for TESTING purposes rather than for data loss: no data is deleted, but the version change applies to every database in the group at once, Turso documents no downgrade endpoint, and there is no dry run. Treat it as a planned maintenance action on a group you own, not something to run against a production group to see what happens. Answers with an empty body.

Turso: Update Group Configuration

turso_update_group_configuration

Turn a group's delete protection on or off. Switching it on is the cheapest guard available against Turso: Delete Group, which would otherwise take every database in the group with it. Switching it off is the deliberate step before a planned teardown.

Turso: Update Member Role

turso_update_member_role

Change an existing member's role. Only admins and owners can do this; anyone else gets HTTP 403 with error updating member roles is only allowed for admin or owner. Reversible by setting the previous role back, so read the member first if you intend to restore it. Demoting the only admin leaves nobody able to promote anyone.

Turso: Update Organization

turso_update_organization

Change organization-wide settings. overages decides whether usage beyond the plan's quota is billed rather than refused, so turning it OFF converts a future overage into HTTP 402 failures on create and write paths, and turning it ON accepts the charge. require_mfa forces every member to have multi-factor authentication; the caller must already have MFA on their own account before enabling it, and members without MFA will be locked out until they set it up. Both are reversible by setting them back.

Using the integration

On the automation canvas

Turso nodes chain with every other node. A webhook that signals a new customer can run Turso: Create Database and Turso: Create Database Token and file the hostname in a Mattering database, a nightly schedule can read Turso: Get Organization Usage and open a task when the trend says a quota will be reached, and Turso: List Audit Logs can feed a change-alerting workflow. The id fields are pickers wherever a lister exists: databases from Turso: List Databases grouped by their group, groups from Turso: List Groups, members from Turso: List Members, and tokens from the two token listers.

From AI assistants over MCP

Every node speaks MCP, the open protocol for connecting AI assistants to tools, so Claude, ChatGPT, and Matter, the assistant built into the platform, can drive the same surface. Turso publishes an MCP server of its own and it is worth knowing about before you choose: Turso runs a hosted MCP server for Turso Cloud, authenticated with OAuth so an agent gets a scoped token through the browser rather than a pasted key, covering database management including branching, SQL execution as separate tools for reads, writes, deletes and schema changes, and per-database insight such as top queries. For an agent that queries and edits the data itself, that is the right tool and this integration has no SQL node at all. What this integration adds is the rest of the control plane, which its server does not put on a canvas: groups and replica locations, members, invites and roles, audit logs, plans, subscriptions, invoices and usage, and both token families, running as workflow steps on a schedule or a trigger with nobody present, chained with every other connector, on a credential the workspace holds rather than one person's client config.

One credential, one organization

The organization slug lives on the credential because 44 of the 49 operations carry it in the path, and because Turso's own tokens are scoped to one organization: the vendor documents unrestricted cross-organization tokens as deprecated and models its client on an organization plus a token. So a connection addresses one organization, and someone working across two creates two connections and picks the right one on the node. The five operations with no organization in the path (Turso: Validate API Token, Turso: Get Current User, Turso: List Organizations, Turso: List Locations and the platform token list) work regardless and simply ignore the slug. Two node fields name a DIFFERENT organization on purpose, on Turso: Transfer Group and Turso: Create API Token, and both are picked from Turso: List Organizations.

Groups, locations and where the data physically sits

A group is the unit that owns locations: every database inside it replicates to the same regions and shares one signing key, which is why Turso: Create Group comes before Turso: Create Database in every fresh organization. Turso: Add Location To Group gives every database in the group a read replica in a new region, and Turso: Remove Location From Group takes it away, dropping the replicas there without losing data, since the primary still holds everything and adding the location back re-replicates at the cost of a resync. Do not aim the removal at the group's primary location: Turso does not document what happens. Location codes come from Turso: List Locations, whose response is a MAP keyed by the location code rather than a list, so one location reads as data.locations.aws-us-east-1 and those two fields are typed rather than picked.

Two kinds of token, and which one this integration holds

Confusing these is the most likely support question this integration generates, so here it is plainly. The PLATFORM token is what this integration authenticates with: it is minted by the Turso CLI or by Turso: Create API Token, and it calls api.turso.tech. A SQL token is what your application uses to query a database: it is minted by Turso: Create Database Token for one database or Turso: Create Group Token for every database in a group, and it works against the database's own hostname. Neither can do the other's job. All three of those minting nodes return live credential material in their response, which means it lands in the run's execution record, so the nodes say so and your workflow should deliver the value in the same run rather than leaving it lying in state. Turso: Create API Token is the sharpest, because Turso never reveals that value again.

Point-in-time recovery, stated precisely

Turso: Create Database takes a seed object, and one of its shapes copies an existing database at a past timestamp. That is how recovery works on Turso, and the precise wording matters. It creates a NEW database FROM AN EXISTING one, so it protects against mistakes made INSIDE a database that still exists, such as a dropped table or a bad migration: branch to a moment before the mistake, verify the branch, then cut over and remove the old database when you no longer need it. Nothing in the Platform API reference or Turso's recovery documentation describes restoring a database once it has been DELETED, so this is not a safety net under Turso: Delete Database and this guide does not present it as one. Retention windows for how far back you can seed are documented inconsistently across Turso's own pages, so check the current figure on Turso's documentation for your plan rather than trusting a number quoted elsewhere.

Usage, plans and the 402 you should expect

Turso bills on rows read and rows written, which is why Turso: Get Database Stats returns top queries by rows read and written: it is the node that finds the expensive query behind a spike. Turso: Get Database Usage takes a window for one database, and one thing about its response shapes any reporting built on it: there are no per-day rows, only a single aggregate for the window you ask for plus one per instance, so a daily series is one request per day rather than one request split locally. Storage bytes in that response is a size at a point in time and must never be summed across windows. Turso: Get Organization Usage always reports the current billing cycle and takes no date range at all. Turso: List Plans returns the account's real quotas, which is what to compare against when create calls start answering HTTP 402: that response means the plan or the overage setting refused, not that anything is broken, and Turso: Update Organization is what turns overages on or off.

The destructive nodes, and what each one actually costs

Seven nodes are flagged destructive and they are not all the same kind of loss. Turso: Delete Database takes the database and its data, and point-in-time recovery does not cover a deleted database. Turso: Delete Group is the widest: Turso documents group delete protection as preventing the group and all its databases from being deleted, so everything inside goes, and deleting a group cascades a revoke to every API token scoped to it. Turso: Invalidate Database Tokens and Turso: Invalidate Group Tokens lose no data at all and break every live client instead, immediately and with no way back to the old values. Turso: Revoke API Token and Turso: Revoke Organization API Token do the same to platform tokens and can revoke this integration's own credential. Turso: Transfer Group is reversible as a move if you hold rights in both organizations, but the cascade revoke of every token scoped to the group is not, and afterwards this credential no longer reaches the group at all. Three more nodes are classed destructive for testing without the flag, because they change a lot at once while losing nothing irrecoverable: Turso: Remove Location From Group, Turso: Remove Member and Turso: Update Databases In Group. Leave delete protection on as the standing guard, and make turning it off the deliberate step in a teardown workflow.

Troubleshooting

Test Connection fails with 401
The platform token was rejected. Check for whitespace from the copy, then check that the token still exists: Turso: Validate API Token is the cheapest read in the integration and reports when a token expires, but it needs a working credential to run, so at this stage mint a fresh token with the Turso CLI instead. Note that a SQL token minted for a database is not a platform token and will always be rejected here, since Turso documents the two credential systems as independent.
Test Connection fails with 404
The token is valid and the organization slug is wrong, which is exactly the failure the connection test exists to catch. Read your slug from the Turso CLI's organization list, or connect with a slug you are sure of and run Turso: List Organizations, which returns every organization the token can act on at data[].slug. For a personal account the slug is your username. A wrong slug would pass a simple token check and then fail at run time on the 44 nodes that carry it in the path, which is why the test reads the organization itself.
Test Connection or a group node fails with 403
Usually a group-scoped token hitting an organization-level route. Turso's token restriction levels are not all equivalent: an organization-scoped token reaches everything in this integration, while a group-scoped one is pinned to a single group and cannot create, delete or transfer a group at any scope. If you intend to automate group lifecycle, mint an organization-scoped token with the CLI and update the credential. On Turso: Update Member Role a 403 means something different: only admins and owners can change roles.
A create call returns HTTP 402
This is the sleeper response on Turso and it is neither an auth failure nor a bad request: 402 means the plan or the overage setting will not permit the operation. A workflow that has run for months can start returning it the day a quota is reached, or the day someone turns overages off with Turso: Update Organization. Run Turso: List Plans to read the account's actual quota numbers from the API, and Turso: Get Organization Usage to see how much of the cycle is already spent. Treat it as a decision for a person rather than as something to retry: branch the workflow so a 402 opens a task instead of looping.
Create Database fails with group not found
Databases are created INTO groups and the group has to exist first, so this is order rather than permissions. Run Turso: List Groups to see what exists, and Turso: Create Group to make one, choosing its primary location from the codes Turso: List Locations returns. Note that group creation is unreachable from a group-scoped token at any scope, so if that call also fails with 403 the fix is an organization-scoped token. A name already in use answers 409 instead.
A newly created database is not accepting connections yet
Turso documents no operation-polling endpoint, so there is nothing to wait on and nothing to poll for readiness in the way some platforms offer. Read the database back with Turso: Get Database before handing out its hostname, rather than chaining a client connection straight onto the create step. The create response deliberately carries only the new name, id and hostname, which is another reason to read it back for the full record.
A scheduled workflow started failing after a quiet period
Check whether the group was archived. Turso archives groups for inactivity and an archived group stops serving its databases until Turso: Unarchive Group is called, so this is a real cause of a workflow breaking without anyone changing anything. No data is lost by archiving. Two other quiet causes worth ruling out in the same pass: Turso: Get Database Configuration shows whether block reads or block writes were set on the database, which makes it reject client queries until they are cleared, and Turso: Get Organization reports whether reads or writes are blocked account-wide, which explains failures across everything at once.
Delete Database or Delete Group returns an error instead of deleting
Almost always delete protection, which is the protection working rather than a bug. Turn it off deliberately with Turso: Update Database Configuration or Turso: Update Group Configuration and run the delete again. Before you do, be clear about what is at stake: point-in-time recovery works by creating a new database from an existing one at a past timestamp, so it does not restore a database that has been deleted, and deleting a group takes every database inside it and cascades a revoke to every token scoped to it. Copy out anything that matters first, with Turso: Create Database using a seed from the existing database.
Every client stopped connecting after a token node ran
That is what the invalidate nodes do, and no data was lost. Turso: Invalidate Database Tokens rotates one database's signing key and Turso: Invalidate Group Tokens rotates a group's, so every SQL token ever issued against those databases stops working at once, with no grace period, and the old values cannot be brought back. The way out is forward: mint replacements with Turso: Create Database Token or Turso: Create Group Token and redeploy them everywhere. Design the rotation as one workflow that revokes and redistributes in the same run, rather than as a standalone step. The same shape applies to Turso: Revoke API Token, which can revoke this integration's own credential and leave every node returning 401.
A location code is rejected as invalid
Location codes come from Turso: List Locations, and an unknown code returns HTTP 400 with an invalid location error while exceeding the plan's location quota returns HTTP 402 instead, so read which one you got. That lister answers with a MAP keyed by the location code rather than a list, which is why the location fields on Turso: Create Group and Turso: Add Location To Group are typed rather than offered as a picker: the platform's option resolver fans out over lists rather than over map keys. Run the lister once, copy the code, and note that Turso: Remove Location From Group DOES get a picker, because the locations a group already has come back as a real array from Turso: Get Group.
A template reading a database name resolves to nothing
Check the capitalization. Turso mixes cases on the wire and the node paths follow the wire rather than normalizing it, so a database name really is data.databases[].Name with a capital N, alongside DbId and Hostname, while group, primaryRegion, block_reads, block_writes and delete_protection are lower case. Two other shapes catch templates out: configuration reads are FLAT with no wrapper key, so the path is data.size_limit rather than data.configuration.size_limit, and Turso: Delete Database answers with a STRING at data.database where every other database endpoint returns an object.

Turso is a trademark of its respective owner. Mattering uses platform names to identify the services these integrations connect to; no endorsement or affiliation is implied.

Start Free Explore our Products