How to Trigger a Governed AI Agent from n8n, Zapier, or Any Webhook
Most AI agent platforms give you two options: click a button in their UI, or set up a cron schedule. Neither works when the trigger lives in another system.
A deal moves to “Closed Won” in Salesforce. A support ticket is escalated in Jira. A form is submitted on your website. A sensor reading exceeds a threshold. These are the moments when you want an agent to act — and they don’t happen on a schedule.
The missing piece is a webhook: a single HTTP endpoint that any external system can call to start a governed agent run. Not a raw LLM API call (those have no tool access, no identity, no governance), but a full agent execution with tool calling, policy enforcement, and audit logging.
Here’s how to set it up.
The endpoint
Every agent profile in ACP gets an HTTP trigger endpoint:
POST https://api.makeagents.run/<workspace>/agents/<profileId>/run
You authenticate with an API key, send a JSON body with your goal, and get back the agent’s output. The agent has access to all the tools configured in its profile — Salesforce, Slack, GitHub, Jira, custom APIs — and every tool call goes through the same governance pipeline as if a user were chatting in the dashboard.
The minimum request:
export ACP_KEY="your-api-key-here"
curl -X POST https://api.makeagents.run/acme/agents/abc123/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACP_KEY" \
-d '{"input": "Summarize open support tickets tagged urgent"}'
The response includes the agent’s output, token usage, tool call count, cost, and a link to the full conversation in the dashboard.
Why governance matters here
When a human uses the dashboard, governance is intuitive: the user is authenticated, their scopes determine what tools they can access, PII is detected before it reaches the model, rate limits prevent runaway costs, and every action is logged.
Webhooks create a temptation to skip all of that. “It’s just an internal API call, right?” Wrong. The webhook is the new attack surface. An overly permissive webhook endpoint with a leaked API key is an unattended agent with full tool access and no identity trail.
ACP’s agent triggers enforce the same governance as interactive sessions:
- The API key identifies the caller. ABAC policies and rate limits apply per-key, not per-agent. If the key has limited scopes, the agent’s tool access is restricted accordingly — even if the agent profile allows more.
- Every tool call is governed. PII detection, policy enforcement, scope checking, and rate limiting happen on each tool call inside the run, not just at the entry point.
- Everything is logged. The trigger event, every tool call, and the final result are written to the audit log with the caller’s identity. Your compliance team can trace exactly which webhook triggered which agent action on which data.
This is the difference between “agent accessible via HTTP” and “governed agent accessible via HTTP.”
Passing runtime context
The same agent can handle different scenarios if you pass context with the trigger. Say you have a “Deal Researcher” agent — its profile says “Research a deal and draft a summary.” The context makes each run specific:
{
"input": "Research this deal and draft an executive summary",
"context": {
"dealId": "0061t00000XYZ",
"accountName": "Acme Corp",
"stage": "Negotiation",
"region": "EMEA"
}
}
Context values are injected into the agent’s system prompt. The agent sees them as additional instructions — it doesn’t need to be told how to parse JSON or extract fields. This keeps agent profiles generic and reusable while letting each trigger carry the specifics.
Example: Escalated Jira ticket triggers a research agent
Here’s a real workflow. When a Jira ticket is escalated to P1, an n8n workflow triggers an agent that pulls related tickets, checks the customer’s contract tier, and posts a summary to the incident Slack channel.
The agent profile (created in the ACP dashboard):
- Name: “Incident Researcher”
- System prompt: “You are an incident research agent. When triggered, investigate the incident by searching related tickets, checking the customer’s support tier, and summarizing findings. Post the summary to the designated Slack channel.”
- Enabled tools:
jira.search,salesforce.search,slack.postMessage - Model: GPT-4o
- Max tool rounds: 5
The n8n workflow:
- Jira Trigger node — fires when a ticket’s priority changes to P1
- HTTP Request node — calls the agent trigger:
{
"input": "Investigate this P1 incident and post a summary to #incidents",
"context": {
"ticketKey": "{{ $json.key }}",
"summary": "{{ $json.fields.summary }}",
"reporter": "{{ $json.fields.reporter.displayName }}",
"slackChannel": "#incidents"
}
}
- That’s it. The agent handles the rest: searches Jira for related tickets, looks up the customer in Salesforce, drafts a summary, and posts it to Slack.
The n8n workflow is three nodes. The agent profile is configured once. The governance — which tools can be called, who’s calling them, what data flows through — is enforced by ACP on every run.
Example: New lead in HubSpot triggers a qualification agent
A marketing team wants to auto-qualify inbound leads. When a new contact is created in HubSpot, a Zapier workflow triggers an agent that researches the company, scores the lead, and updates the HubSpot record.
Zapier setup:
- Trigger: New Contact in HubSpot
- Action: Webhooks by Zapier (POST)
- URL:
https://api.makeagents.run/acme/agents/PROFILE_ID/run - Headers:
Authorization: Bearer YOUR_API_KEY,Content-Type: application/json - Body:
- URL:
{
"input": "Research this lead's company and score them for sales readiness",
"context": {
"contactEmail": "jane@example.com",
"company": "Example Corp",
"source": "webinar-signup"
}
}
- Action: Update Contact in HubSpot — map the agent’s
outputfield back to a custom property on the contact.
The agent uses web search tools and the company’s internal CRM data to produce a qualification score. The Zapier workflow writes the result back. Total setup time: under 10 minutes.
Streaming for long-running agents
If your agent runs for more than a few seconds — complex research tasks, multi-step workflows — you can stream the response:
{
"input": "Audit all GitHub repos for outdated dependencies and create issues",
"stream": true
}
This returns Server-Sent Events as the agent works: text chunks, tool calls, governance decisions, and tool results. The final done event includes the full usage metadata.
Streaming is useful for webhook consumers that need to show progress (like a Slack bot that updates a thread as the agent works) or for monitoring long-running agents in real time.
Getting started
- Create an agent in the ACP dashboard — name, system prompt, model, tools, and limits
- Create an API key from Settings > API Keys
- Copy the trigger URL — it’s
https://api.makeagents.run/<workspace>/agents/<profileId>/run - Wire it into your automation — n8n, Zapier, Make, a cron job, a Slack bot, or a plain
curlcommand
Full API reference with request/response schemas, error codes, and more examples: Agent HTTP Triggers docs.
Every agent run triggered via webhook produces the same audit trail as an interactive session. Your security team doesn’t need a separate governance model for automated agents — it’s the same identity verification, the same policy engine, the same audit log. That’s the point of a control plane.