This guide walks you through a practical workflow: receive data via webhook, process it with AI, and return a result.
What we're building
Start (Webhook) → AI Agent → (workflow completes)
When someone POSTs JSON to your webhook URL, the AI node summarizes the payload and the workflow finishes.
Step 1 — Create the workflow
- Go to Workflows and click New Workflow.
- Name it
Webhook Summarizer.
Step 2 — Configure the Start node
- Click the Start node to open its configuration panel.
- Set Trigger Type to Webhook.
- Choose POST as the HTTP method.
- Copy the webhook URL shown in the panel — you'll use this to trigger the workflow.
- Under Authentication, choose how callers must authenticate (none, API key, or bearer token).
Step 3 — Add an AI Agent node
- Drag AI Agent from the toolbar onto the canvas.
- Connect the Start node's output handle to the AI node's input.
- Configure the AI node:
- Provider: OpenAI (or Anthropic / Gemini)
- Model:
gpt-4o-miniis a good default for speed and cost - Prompt:
Summarize the following data in 2-3 sentences:\n\n{{lastOutput}}
Step 4 — Add your API key
AI nodes need a provider API key. Add it in one of these ways:
- Organization Settings → Agent — set your default AI provider key
- Per-node — enter the key directly in the AI node configuration
Step 5 — Save and test
- Click Save.
- Click Run (for manual test) or send a POST request to your webhook URL:
curl -X POST https://api.togoflow.ai/api/v1/webhooks/YOUR_WEBHOOK_PATH \
-H "Content-Type: application/json" \
-d '{"message": "TogoFlow helps teams automate repetitive work with AI-powered workflows."}'
- Open the Executions panel to watch the run and inspect each node's output.
Step 6 — Use variables (optional)
Add workflow-level variables under the Variables tab in the workflow header:
| Key | Value |
|---|---|
tone | professional |
Then update your AI prompt:
Summarize in a {{variables.tone}} tone:
{{lastOutput}}
What's next?
- Add a Transform node to reshape the AI output before sending it elsewhere
- Add an Action node to post the summary to Slack or Gmail
- Switch the trigger to Schedule to run automatically every morning
See the Cookbook for more complete multi-step examples.