> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowripple.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack Message

> Send rich messages to Slack channels with support for blocks, formatting, and workflow variables.

# Slack Message

The Slack Message step allows you to send messages to Slack channels from your workflows. Messages can include rich formatting, blocks, and dynamic content using workflow variables.

## Overview

Slack Message steps are useful for:

* Team notifications and alerts
* Status updates
* Automated reports
* Integration notifications
* Workflow execution updates

## Prerequisites

Before using Slack Message steps, you need to:

1. **Connect your Slack workspace** in the Integrations settings
2. **Authorize Flowripple** to access your Slack workspace
3. **Select a default channel** (optional, can be overridden per message)

<Note>
  Slack integration must be configured before you can use Slack Message steps. Visit your Integrations settings to connect Slack.
</Note>

## Configuration

When you add a Slack Message step, you'll configure:

### Channel

Select the Slack channel where the message will be sent:

* **Default channel**: Use the channel configured in your Slack integration
* **Specific channel**: Override with a different channel for this message

<Note>
  You can use workflow variables to dynamically set the channel, but the channel must exist in your connected Slack workspace.
</Note>

### Message Content

Configure the message content using Slack's Block Kit format:

#### Message Builder

Use the visual message builder to create rich Slack messages with:

* **Text blocks**: Formatted text content
* **Sections**: Structured content with fields
* **Buttons**: Interactive buttons with actions
* **Images**: Image attachments
* **Dividers**: Visual separators

#### JSON Format

For advanced formatting, you can write messages in Slack's Block Kit JSON format:

<CodeGroup>
  ```json Simple Text Message theme={null}
  {
    "text": "Hello from Flowripple! Your order #{{order.id}} has been processed."
  }
  ```

  ```json Rich Message with Blocks theme={null}
  {
    "blocks": [
      {
        "type": "header",
        "text": {
          "type": "plain_text",
          "text": "Order Notification"
        }
      },
      {
        "type": "section",
        "fields": [
          {
            "type": "mrkdwn",
            "text": "*Order ID:*\n{{order.id}}"
          },
          {
            "type": "mrkdwn",
            "text": "*Amount:*\n${{order.amount}}"
          }
        ]
      },
      {
        "type": "actions",
        "elements": [
          {
            "type": "button",
            "text": {
              "type": "plain_text",
              "text": "View Order"
            },
            "url": "https://example.com/orders/{{order.id}}"
          }
        ]
      }
    ]
  }
  ```
</CodeGroup>

#### Using Variables

Insert workflow variables into Slack messages using the `{{variable.name}}` syntax:

* **From triggers**: Use variables from your trigger event
* **From previous steps**: Use output from HTTP requests or other steps
* **System variables**: Access built-in variables like timestamps

<CodeGroup>
  ```json Example: Using Variables theme={null}
  {
    "text": "User {{user.name}} ({{user.email}}) just signed up!"
  }
  ```

  ```json Example: Dynamic Content theme={null}
  {
    "blocks": [
      {
        "type": "section",
        "text": {
          "type": "mrkdwn",
          "text": "*New Support Ticket*\n\n*From:* {{ticket.userName}}\n*Subject:* {{ticket.subject}}\n*Priority:* {{ticket.priority}}"
        }
      }
    ]
  }
  ```
</CodeGroup>

## Message Templates

Use pre-built message templates for common scenarios:

* **Notifications**: Standard notification format
* **Alerts**: Alert-style messages with emphasis
* **Reports**: Structured report format
* **Updates**: Status update format

<Tip>
  Start with a template and customize it with your specific content and variables. This saves time and ensures consistent formatting.
</Tip>

## Example Use Cases

### Order Notification

Notify your team when a new order is placed:

```
Trigger (Event: Order Created)
  ↓
Slack Message
  Channel: #orders
  Message: Rich message with order details, customer info, and action buttons
```

### Error Alerts

Send alerts when errors occur:

```
Trigger (Event: API Error)
  ↓
Slack Message
  Channel: #alerts
  Message: Alert message with error details, stack trace, and severity level
```

### Daily Reports

Send daily summary reports:

```
Trigger (Schedule: Daily at 9 AM)
  ↓
HTTP Request (Fetch Analytics Data)
  ↓
Slack Message
  Channel: #reports
  Message: Formatted report with metrics, charts, and insights
```

### User Activity Updates

Notify team of important user activities:

```
Trigger (Event: High-Value User Signs Up)
  ↓
Slack Message
  Channel: #sales
  Message: Notification with user details, signup source, and potential value
```

## Best Practices

<AccordionGroup>
  <Accordion title="Use Appropriate Channels">
    Route messages to the right channels based on content type. Use dedicated channels for different types of notifications (alerts, reports, updates).
  </Accordion>

  <Accordion title="Format for Readability">
    Use Slack's formatting options (bold, italic, code blocks) to make messages easy to scan and understand.
  </Accordion>

  <Accordion title="Include Action Buttons">
    Add interactive buttons to Slack messages when appropriate. This allows team members to take action directly from Slack.
  </Accordion>

  <Accordion title="Avoid Message Spam">
    Be mindful of message frequency. Too many messages can overwhelm channels. Consider batching notifications or using summary messages.
  </Accordion>

  <Accordion title="Test Message Formatting">
    Test your Slack messages to ensure they render correctly. Use the preview feature in the message builder to see how messages will appear.
  </Accordion>
</AccordionGroup>

<Tip>
  Use Slack's Block Kit builder for visual message creation, or write JSON directly for advanced formatting. The builder helps ensure valid Block Kit syntax.
</Tip>

<Warning>
  Ensure your Slack integration has permission to post to the selected channel. Private channels require the bot to be added as a member.
</Warning>

<Note>
  Slack message delivery status is tracked in workflow execution logs. Failed deliveries are logged with error details for debugging.
</Note>
