Skip to main content
Send events from your tools to a named Flow automation. The webhook name becomes the request’s source; the context object carries the event data.

Before you start

Use an API key and workspace identifier, and identify the project that owns the automation. Use the variables and language setup from the quickstart, with PROJECT_ID set to that project’s ID.

Configure the automation

Requires you to act: In your project, open Agent → Automations → New automation and configure the trigger:
  1. Give the automation a descriptive Name, such as Review test results.
  2. Set Trigger to When a custom webhook is called.
  3. Set Webhook name to test-results-ready.
Use the exact webhook name in API requests, including capitalization. Choose a distinct name for each event type. Avoid built-in source names such as endpoint, github, or schedule. If multiple automations in the project share the same source, one request can start them all. Requires you to act: Define the work and save the automation:
  1. In Agent → Instructions, describe the expected input and the actions to take. For example: “Read the test report URL from context.report_url. Summarize failed tests and identify affected requirements. Return a concise summary without changing project data.”
  2. Select Create.
Webhook runs execute without an interactive approval step. Make the instructions explicit about what the automation should read, change, and return.

Send an event

Send an authenticated POST /ai/trigger request with the webhook name, project ID, and JSON context. Replace the sample report URL with one the automation can access. The event_id below is your correlation value; including it does not make repeated requests idempotent.
HTTP 202 means the request was accepted, not that the work has finished. Store each agent_id from results and poll for completion. An empty results array means no runs matched; check the saved webhook name and project ID.

Connect your event sender

Your sender must authenticate to Flow and produce the request body above. If an external service cannot set the required headers or transform its event into source and context, use a server-side handler that validates the incoming event and calls Flow with your API key. Keep credentials in the sender’s secret storage. Record the sender’s event ID alongside the returned run IDs so you can trace deliveries and suppress duplicates before triggering Flow. After a network timeout, check for an existing run before resending: the first request can still be executing. For apps already connected through Flow’s Integrations, use the corresponding app trigger. This custom webhook guide covers events you send through the customer API.

Next steps