Your First Workflow

Build a webhook-to-AI workflow step by step in the TogoFlow editor.

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

  1. Go to Workflows and click New Workflow.
  2. Name it Webhook Summarizer.

Step 2 — Configure the Start node

  1. Click the Start node to open its configuration panel.
  2. Set Trigger Type to Webhook.
  3. Choose POST as the HTTP method.
  4. Copy the webhook URL shown in the panel — you'll use this to trigger the workflow.
  5. Under Authentication, choose how callers must authenticate (none, API key, or bearer token).

Step 3 — Add an AI Agent node

  1. Drag AI Agent from the toolbar onto the canvas.
  2. Connect the Start node's output handle to the AI node's input.
  3. Configure the AI node:
    • Provider: OpenAI (or Anthropic / Gemini)
    • Model: gpt-4o-mini is 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

  1. Click Save.
  2. 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."}'
  1. 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:

KeyValue
toneprofessional

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.