Best Way to Connect a Make or Zapier AI Agent to Your Database
Call a scoped Retrieve agent from a Make HTTP module or a Zapier webhook. Typed answers come back in order. Writes wait for Guard.
Claix · November 2026. Related guides: human approval in n8n, n8n, and call an agent. Product: Claix Retrieve and Claix Guard.
Make and Zapier are great for connecting apps and automating workflows. But when you add an AI agent, the question changes. It is no longer only “How do I connect this app to that app?” It becomes “How do I let an AI agent use live business data without giving it unrestricted access to my database?”
This guide explains the best way to connect a Make or Zapier AI agent to your database, how to get typed answers with one call, and how to control writes with Claix.
Why Make and Zapier need a database layer
Make and Zapier are automation platforms. They connect triggers, actions and apps. An AI agent adds a new layer. It can receive an instruction, decide what information it needs, call a tool and act on the result.
That creates a new problem. A generic database connection gives an agent access to a database. It does not define what the agent should be able to read, which columns it can retrieve, which records belong to a particular user, or which writes are allowed. That is why you need a control layer between the agent and the database.
The two halves of the problem
| Problem | What it controls | What Claix provides |
|---|---|---|
| What can the agent read? | Tables, columns, rules and answer format | Claix Retrieve |
| What can the agent change? | Inserts, updates and deletes | Claix Guard |
Claix Retrieve controls what your agents can read. Claix Guard controls what they can change.
What Claix Retrieve does
Claix Retrieve connects to a relational database and lets each agent retrieve only the tables and columns you allow, within the rules and limits you define. It does not copy your data into a vector store. Agents query the database where the data lives, within the tables and columns allowed for that agent. A smaller retrieval surface means less exposure.
Routes define what an agent can read
In Claix, a route defines a retrieval capability. A route specifies which tables an agent can access, which columns it can retrieve, and a guide with your rules and vocabulary. You create a route once and attach it to as many agents as you need.
- A support agent may use a route that includes orders and customers.
- An operations agent may use a route that includes inventory and shifts.
- An internal analytics agent may use a different route with broader access.
The route is the boundary. The agent cannot freely query the entire database.
Agents define who can access what
In Claix, an agent is the identity that uses one or more routes. Each agent has its own endpoint, its own business prompt, its own attached routes and its own response mode. A support bot and an internal assistant can share the same database while seeing different data. In Make and Zapier, different scenarios can call different agents.
How to call Claix Retrieve from Make
Make can call an HTTP endpoint. Send POST https://claix.dev/retrieve/{agent_name} with header x-api-key and a JSON body. Each question can include an optional format. Docs: call an agent.
{
"questions": [
{ "question": "How many orders are confirmed?", "format": "int" },
{ "question": "What is the name of the customer with the most orders?", "format": "string" }
]
}The response has user_ask, ia_response and log_id. ia_response is aligned with the questions, in the same order. Use log_id in Traces.
How to call Claix Retrieve from Zapier
Zapier can call the same endpoint through a Webhooks by Zapier action or a custom request: POST https://claix.dev/retrieve/{agent_name}, the same JSON body, and the same x-api-key header. You get the same user_ask, ia_response and log_id.
What you get back
You set the response mode on the agent in the dashboard. It is not a field in the request.
| Mode | What you get |
|---|---|
| Raw | JSON rows returned by the database, as { rows, truncated } |
| Reasoned | A single typed value per question |
In raw mode, each answer is the JSON rows as returned by the database. In reasoned mode, each answer is a typed value matching the format you requested. If one question fails, that slot can come back as { error } while the rest of the call still returns.
What typed answers mean
Typed answers matter because an automation often needs to branch on a specific value: whether an item is in stock, how many orders are pending, which customers need follow-up, or the current status of a reservation. Claix Retrieve can return booleans, numbers, lists and JSON objects, so the next Make or Zapier module can use the value directly.
Why this is better than giving Make or Zapier direct database access
If you give Make or Zapier direct database access, you have to manage the permission model yourself. You need to control which tables the agent can access, which columns it can retrieve, which records belong to the current user or tenant, how much data a request can return, whether the agent can execute writes, and what happens when something goes wrong.
Claix Retrieve handles the read side of that. It validates queries before they run and traces every request. It does not replace a dedicated read-only database role. Connect Retrieve with one.
How to control writes
If the scenario needs to write, add a guardrail. Claix Guard checks the INSERT, UPDATE or DELETE an agent proposes against rules you approved. Allowed means your module can execute the statement. Denied means it should not, and the agent receives the reason. Needs approval means the write waits for a person. Claix Guard does not execute the statement. Your scenario does, with its own database credentials. A denial is still HTTP 200. Read allowed.
How to add Guard to a Make scenario
Add an HTTP module before the node that writes. That module calls POST /check-sql. If allowed is true, the next node runs the statement. If it is false, stop the scenario or return the reason. For the cases that need a person, use the n8n and Slack approval flow. The same webhook pattern works in Make.
How to add Guard to a Zapier Zap
Add a Webhooks by Zapier action before the step that writes. That action calls POST /check-sql. If allowed is true, the next step runs the statement. If it is false, the Zap stops or returns the reason. sql is required. params follows placeholder order. connection_id is required only when the account has more than one active connection. Docs: check SQL.
What Guard can enforce
| Control | What it prevents |
|---|---|
| Operation type | Unwanted inserts, updates or deletes |
| Target table | Changes to tables outside the agent’s scope |
| Target columns | Changes to sensitive or protected fields |
| Record selection | Updates or deletes that affect too many records |
| Value limits | Discounts, quantities, amounts or statuses outside allowed ranges |
| State transitions | Invalid changes from one status to another |
| Rate limits | Too many changes in a short period |
| Human review | High-risk actions that require approval |
| Audit trail | Missing evidence of what was proposed and decided |
- Agents can create and update orders, but never delete them.
- Agents can update an order status, but never its price.
- Discounts cannot exceed 20 percent.
- Refunds above a threshold require human review.
- An update or delete must target a specific record.
- Certain status transitions are not allowed.
- The number of refunds per hour is limited.
How to get started
Claix supports any SQL database, including Postgres, MySQL and MariaDB, plus Postgres-compatible setups such as Supabase. You connect with a read-only role. You define routes and agents with your rules, then call one endpoint so the agent gets live typed answers within the perimeter you set. For writes, Claix Guard supports PostgreSQL, MySQL and MariaDB. Keep the write credentials in the Make or Zapier module that runs the statement, not in the agent.
Conclusion
Make and Zapier are great for automation. When you add an AI agent, you need a control layer between the agent and the database. Retrieve limits and structures what agents can read. Guard checks proposed writes before they run. Traces make requests and decisions reviewable. Do not give the scenario unrestricted database access.
You might also like…
Guides · Guard
Best Way to Add Human Approval to an n8n AI Agent Before It Writes to Your Database
Guides · Supabase
How to Give an AI Agent Safe Access to Your Supabase Database with Claix
Guides · Retrieval
Text-to-SQL vs Predefined Queries: Which Should Your AI Agent Use?
Guides · Guard
Human Approval Before AI Agent Writes to Database: A Step-by-Step n8n and Slack Workflow