Xata
DatabaseLet AI agents work your Xata serverless Postgres data. Agents insert, update, and bulk-load records, run typed queries, full-text search across tables and branches, aggregations, summaries, and raw SQL.
What This Integration Enables
Xata's bet is that Postgres should behave like a product: serverless, branchable, searchable, with typed data APIs alongside raw SQL. That combination is what makes it a database agents can work responsibly. A FlowRunner agent gets structured record operations for the routine writes, filter queries and full-text search for the reads, aggregations and summaries for the reporting, and parameterized SQL for everything the structured API cannot express. Branches are the safety architecture: what would be a scary statement on production becomes a rehearsal on a copy, and the [human-in-the-loop](/concepts/human-in-the-loop) approval happens with evidence in hand. - Insert, upsert, update, and bulk-load records with schema-matched JSON - Query with structured filters and run fuzzy full-text search across one table or the whole branch - Compute counts, sums, averages, and grouped summaries for reporting without an export - Execute parameterized Postgres-compatible SQL for joins and advanced work
Without FlowRunner
With FlowRunner
Use Case Scenarios
The metrics digest nobody compiles
Each morning the agent runs Summarize Records on the orders table, grouped by status and channel with sums and averages per group, plus Aggregate Records for the day's headline counts. The result posts to [Slack](/integrations/slack) as a digest and appends to [Google Sheets](/integrations/google-sheets) for the running history. When a number looks off, the follow-up is immediate: Query Table with the same filter pulls the underlying records into the thread, so the conversation happens over rows, not recollections.
External systems synced without column loss
Rows flow in from [Google Sheets](/integrations/google-sheets) and the order platform. For records keyed on an external id, the agent deliberately avoids Create or Replace Record for routine syncs, because a replace clears every column the payload omits. Instead it uses Update Record with upsert enabled: existing rows get partial updates that preserve untouched columns, and missing rows get created. Full replaces are reserved for loads that genuinely own the whole record, and Bulk Insert Records handles first-time imports at volume.
One search box over every table
Support gets a customer email and needs everything: orders, tickets, shipments, notes. The agent runs Search Branch with the customer's email and name, and gets back relevance-ranked records tagged with their source table, across the entire branch in one call. The assembled picture posts into the support thread within seconds, and for compliance and data-subject requests the matched records archive to [S3](/integrations/s3) as a dated, auditable bundle. Nobody writes a five-table join to answer a routine lookup ever again.
Human-in-Loop Highlight
Run SQL executes whatever statement it is given against the branch, and on main that includes the UPDATE with the missing WHERE clause that rewrites a column for every row in the table. Delete Record is explicit about being permanent, and Create or Replace Record silently clears any column the payload leaves out, which is data loss wearing an upsert's clothing. The FlowRunner posture uses Xata's own architecture as the gate: destructive statements rehearse on a working branch first, the agent reports exactly how many rows the statement touched there, and the run against main waits for the data owner to read the statement and the count and say so. A database that makes branching cheap has removed every excuse for unrehearsed writes to production.
Agent Capabilities
13 actionsRecords
7- Insert Record Inserts a record with Xata generating the id, from a JSON object matching the table schema. The default write for new rows.
- Create Record Creates a record with a specific id and fails if that id exists. The guarantee to reach for when overwriting would be the bug.
- Create or Replace Record Upserts by id, fully replacing an existing record. Columns not in the payload are cleared, so it belongs to loads that own the whole record.
- Get Record Retrieves a record by id, with column selection including dot notation into linked tables like author.name.
- Update Record Partially updates only the provided columns, optionally creating the record if it is missing. The safe default for syncs.
- Delete Record Permanently deletes a record by id, optionally returning selected columns of what was removed. Behind confirmation, always.
- Bulk Insert Records Inserts many records in one request with generated ids. The import primitive for seeds and nightly loads.
Query
1- Query Table Queries with structured filter objects, sorting, column selection, and cursor or offset pagination. The read behind reporting and record inspection.
Search
2- Search Table Fuzzy full-text search over one table's searchable columns, relevance ranked, with prefix matching and column boosting.
- Search Branch Full-text search across every table in the branch at once, results tagged with their source table. The one-call customer lookup.
Analytics
2- Aggregate Records Computes counts, sums, averages, min and max, unique counts, and date histograms, optionally filtered. The reconciliation and dashboard primitive.
- Summarize Records Groups records SQL-GROUP-BY style with per-group summary functions, filterable and sortable on the output. One row per group, ready for a digest.
SQL
1- Run SQL Executes raw Postgres-compatible SQL with $1, $2 parameter placeholders against the branch. Joins, advanced aggregations, and the corrective statements that only run on main after a person approves.
Frequently Asked Questions
What can FlowRunner do with Xata?
FlowRunner agents can run Insert Record, Create Record, and Create or Replace Record in Xata, plus 10 more actions.
Does connecting Xata to FlowRunner require OAuth?
No. Xata connects to FlowRunner with an API key, no OAuth flow required.
Can Xata trigger a FlowRunner workflow automatically?
Xata doesn't currently expose triggers in FlowRunner. It connects as an action step inside workflows started by another trigger.
Start building with Xata
$100 in credits. No card required. Connect in minutes.