Slack Notifications

Send automated messages to Slack channels when events occur using the CONNECTOR step type.

Time
Level
Prerequisites

15 minutes

Intermediate

Slack workspace admin access


What You'll Build

An automation that:

  1. Receives new order data via webhook trigger
  2. Uses CONNECTOR step to post to Slack
  3. Uses CONDITION step to route high-value orders to VIP channel

Step 1: Connect Slack

Create a Slack Connection

  1. Go to Connections
  2. Click + New Connection
  3. Search for Slack connector
  4. Click Connect

Authorize work.studio

  1. A Slack popup opens
  2. Select your workspace
  3. Click Allow
  4. The popup closes β€” you're connected!

Step 2: Create the Automation

  1. Go to Automations
  2. Click + New Automation
  3. Name: New Order Slack Alert
  4. Click Create

Step 3: Add Webhook Trigger

Configure Trigger

  1. Click Add Trigger
  2. Select Webhook
  3. Copy the webhook URL

Expected Payload

{
  "order_id": "ORD-12345",
  "customer": "Acme Corp",
  "amount": 499.99,
  "items": ["Widget Pro", "Widget Basic"]
}

Step 4: Add CONNECTOR Step for Slack

Add the Step

  1. Click + below the trigger
  2. Select CONNECTOR from the step palette

Configure the Connector Step

Field Value
Connector Slack
Connection Your Slack Connection
Operation chat.postMessage

Configure Parameters

Parameter Value
channel #orders
text See message template below

Message Template

πŸŽ‰ *New Order Received!*

*Order ID:* {{ input.order_id }}
*Customer:* {{ input.customer }}
*Amount:* ${{ input.amount }}

*Items:*
{{ input.items.join(", ") }}

Step 5: Add CONDITION for High-Value Orders

Add CONDITION Step

For large orders, send an additional alert to a VIP channel:

  1. Click + after the Slack CONNECTOR step
  2. Select CONDITION from the step palette
  3. Name it: Check High Value

Configure the Condition

{{ input.amount }} > 1000

True Branch: VIP Alert

In the "True" branch, add another CONNECTOR step:

Field Value
Connector Slack
Connection Your Slack Connection
Operation chat.postMessage
channel #vip-orders
text 🚨 *High-Value Order Alert!* ${{ input.amount }} from {{ input.customer }}

Your workflow now looks like:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Webhook Trigger    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CONNECTOR: Slack   β”‚
β”‚  Post to #orders    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  CONDITION          β”‚
β”‚  amount > 1000?     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ True     β”‚   False  β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
     β”‚          β”‚
     β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   (end)
β”‚CONNECTORβ”‚
β”‚#vip-ordersβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Step 6: Test the Integration

Save and Activate

  1. Click Save
  2. Toggle Active

Send Test Webhook

Use curl or any HTTP client:

curl -X POST api.work.studio/webhook/YOUR_WEBHOOK_ID \
  -H "Content-Type: application/json" \
  -d '{
    "order_id": "ORD-99999",
    "customer": "Test Corp",
    "amount": 1500.00,
    "items": ["Premium Widget", "Deluxe Addon"]
  }'

Verify in Slack

Check both channels:

  • #orders β€” Should have the order notification
  • #vip-orders β€” Should have the high-value alert (amount > 1000)

Advanced: Using Block Kit

For rich interactive messages, use Slack's Block Kit format:

CONNECTOR Configuration with Blocks

Set the blocks parameter instead of text:

[
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "πŸŽ‰ *New Order: {{ input.order_id }}*"
    }
  },
  {
    "type": "section",
    "fields": [
      {"type": "mrkdwn", "text": "*Customer:*\n{{ input.customer }}"},
      {"type": "mrkdwn", "text": "*Amount:*\n${{ input.amount }}"}
    ]
  },
  {
    "type": "actions",
    "elements": [
      {
        "type": "button",
        "text": {"type": "plain_text", "text": "View Order"},
        "url": "flow.work.studio/orders/{{ input.order_id }}"
      }
    ]
  }
]

Using Slack as a Trigger

You can also trigger automations FROM Slack using the Slack trigger type:

  1. Create a new automation
  2. Click Add Trigger β†’ Slack
  3. Configure:
    • Channel to monitor
    • Message pattern or slash command

When someone posts in that channel (or uses the command), your automation runs.


Best Practices


Next Steps

REST API Integration

Connect to any REST API.

API Tutorial β†’