Skip to content

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


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. /workflowsCreate workflow.
  2. Name: Webhook to Slack.
  3. Click Create.

2. Add the Webhook Trigger

  1. Right-click the Start node → Replace triggerWebhook 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.