🇪🇸 Español 🇬🇧 English 🇧🇷 Português

Triggering a workflow from an AI agent (the trigger_workflow tool)

An AI agent can fire an existing workflow mid-conversation using the "Trigger workflows" tool.

Jul 11, 2026

The Trigger workflows tool (trigger_workflow) lets an AI agent fire, mid-conversation, any workflow you've already built in your workspace — send a WhatsApp template, hand off the conversation, add the contact to a campaign, and so on. The agent doesn't create new workflows; it only activates ones you built and left active.

Requirements

  • The target workflow must exist under Workflows and be Active (an inactive workflow is rejected).
  • The workflow and the agent must belong to the same workspace — an agent can never trigger another workspace's workflow, even if it somehow learns the ID.
  • The tool must be enabled on the agent's Tools tab.

Steps

  1. Build and activate the workflow under Workflows (give it a clear name; the kebab-case slug, e.g. vip-welcome, is generated automatically).
  2. Note the workflow's slug (it's listed under "Available workflows" in the tool's panel).
  3. Under Settings → AI Agents, open the agent, go to the Tools tab, and enable "Trigger workflows".
  4. In the agent's instructions, describe when to use it and which workflow, referencing the slug (e.g. "if the customer asks about renewal, trigger the renewal-reminder workflow").

Example

A customer messages the bot: "I want to renew my plan." The agent detects the intent, calls trigger_workflow with workflow_slug: "renewal-reminder", and the workflow takes over — sending the renewal template and tagging the contact — with no human intervention needed.

Tips

  • Always prefer workflow_slug (human-readable) over workflow_id (legacy numeric).
  • You can pass variables (key-value pairs) that the workflow receives as input variables.
  • Executions fired by an AI agent are tagged as ai_agent type in the execution history, so you can tell them apart from manual runs.

Troubleshooting

  • "workflow not found": double-check the slug and confirm the workflow belongs to the agent's workspace.
  • "workflow is not active": activate the workflow from the Workflows list before the agent can trigger it.
  • If the agent never calls the tool, confirm it's enabled under Tools and that the instructions explicitly mention the right slug.
Was this helpful?

Related articles