Skip to content
Docs
flero.ai

Recipe 01, Slack notification on webhook

Goal: when an external system POSTs to a Flero URL, post a formatted message to a Slack channel.

Difficulty: Beginner Β· Time: ~10 minutes Β· Connectors: Slack

πŸ“Έ Screenshot needed: recipe-01__final.png, final canvas with three nodes: Webhook Trigger β†’ Transform β†’ Slack: Send Message, all green from a recent successful run.


Prerequisites

  • A Flero workspace.
  • A Slack credential, see Connector catalog β†’ Slack for setup.
  • A target Slack channel where you have permission to post (e.g. #flero-test).

Finished workflow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Webhook Trigger  │───▢│   Transform    │───▢│ Slack: Send Message β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Step-by-step

1. Create the workflow

  1. /workflows β†’ Create workflow.
  2. Name: Webhook to Slack.
  3. Click Create.

2. Add the Webhook Trigger

  1. Right-click the Start node β†’ Replace trigger β†’ Webhook Trigger.
  2. In the inspector:
    • Method: POST
    • Secret: leave empty for now (we'll add one in Variations)
    • Response mode: Immediately, response code 200
  3. Copy the generated Webhook URL, you'll need it later.

3. Add the Transform node

We'll shape the incoming data into a Slack-friendly message.

  1. Drag a Transform node from the palette β†’ place to the right of Webhook Trigger.
  2. Connect Webhook Trigger β†’ Transform.
  3. In Transform's inspector, add a map operation:
    map:
      channel:  "#flero-test"
      text:     ":bell: New event: *{{ $trigger.body.title }}* β€” {{ $trigger.body.description }}"
  4. Save.

4. Add the Slack node

  1. Drag the Slack connector node from the palette β†’ place to the right of Transform.
  2. Connect Transform β†’ Slack.
  3. In the Slack inspector:
    • Credential: your Slack credential
    • Operation: Send message
    • Channel: {{ $node["Transform"].json.channel }}
    • Text: {{ $node["Transform"].json.text }}
  4. Save.

5. Save and activate

  1. Click Save (⌘S).
  2. Status badge: change from draft to active.

The webhook URL is now live.


Try it

Send a test request from your terminal:

curl -X POST <your webhook URL> \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Hello, world",
    "description": "First webhook from outside Flero"
  }'

Switch to Slack β†’ you should see:

:bell: New event: Hello, world, First webhook from outside Flero

Switch back to Flero β†’ open the History tab β†’ confirm the run shows green.


Variations

Verify a webhook signature

If the source service signs requests (Stripe, GitHub, …):

  1. Configure the Webhook Trigger's Secret to match the service's signing secret.
  2. Or for HMAC-based signing: add an Encryption / Hashing node between the Webhook Trigger and Transform; verify the signature; route to Transform only if valid.

See Webhook trigger β†’ Security.

Add formatting

For richer messages, use Slack's Block Kit:

operation: Send message
text:      (fallback for notifications)
blocks:    a JSON array of blocks

Route by event type

Add an If or Switch node between Webhook Trigger and Transform to send different messages based on $trigger.body.eventType.

Skip duplicates

Add a Cache Storage node before Transform, see Common patterns β†’ Idempotency.


Troubleshooting

Symptom Likely cause Fix
Webhook URL returns 410 Workflow not active Set workflow status to active
Slack node fails with "channel_not_found" Channel doesn't exist or bot isn't in it Invite the bot to the channel; double-check spelling
Slack message shows [EXPR-ERROR: …] Node name mismatch in expression Verify the Transform node is named exactly "Transform"
Message says undefined Trigger payload missing the field Check the request body, title / description must be present

Next


Found something out of date? This page lives in the Flero docs content set.