Send Slack Message
The Send Slack Message activity sends a message to a Slack channel from your workflow.
Purpose
Use the Send Slack Message activity to:
- Send notifications to team Slack channels
- Post workflow status updates
- Share results or alerts with teams
- Integrate workflows with team communication
Prerequisites
Slack Connection Required
Before using this activity, you must configure a Slack connection:
- Navigate to Settings → Connections
- Create a new Slack Connection
- Configure OAuth token from your Slack workspace
- Save the connection
Slack Workspace Configuration
- Must be done by your organization's IT team or Slack administrator
- Requires creating a Slack App in your workspace
- Generate an OAuth token with appropriate permissions
- Required permissions:
chat:write,channels:read
Configuration
Connection Settings
- Slack Connection: Select a pre-configured Slack connection from the dropdown
Channel Settings
- Channel Name: The name of the Slack channel (e.g., "products")
- Channel ID: Alternative to channel name (found in Slack channel details)
- Either channel name or ID can be used
Message Settings
- Message Text: The message content to send
Formatting
- Markdown Support: Slack supports markdown formatting
- Enable Markdown: Check the markdown option to enable formatting
Context Variable (Optional)
- Message Timestamp: Store the message timestamp in a workflow variable
- Used for tracking the message or reading replies later
Channel Identification
Using Channel Name
Channel: products
Using Channel ID
Channel: C01234ABCDE
To find Channel ID in Slack:
- Open the channel
- Click the channel name at the top
- Scroll to the bottom of the channel details
- Copy the Channel ID
Markdown Formatting
When markdown is enabled, you can use Slack's markdown syntax:
Basic Formatting
- Bold:
*bold text* - Italic:
_italic text_ - Strikethrough:
~strikethrough~ - Code:
`code` - Code Block:
```code block```
Links
- URL:
<https://example.com|Link Text> - User Mention:
<@U12345678> - Channel Mention:
<#C12345678>
Lists
- Bullet point:
• Item - Numbered:
1. Item
Example Formatted Message
*Workflow Completed* ✓
Data load finished for client: _{ClientName}_
Results:
• Records processed: `{RecordCount}`
• Status: ~pending~ *approved*
View details: <https://app.unasoftware.com/workflows|Workflow Dashboard>
Parameter References
Include workflow variables in messages using {ParameterName}:
Message: Workflow {WorkflowName} completed with {RecordCount} records processed.
Context Variable Usage
Storing Message Timestamp
Context Key: MySlackMessageTimestamp
This stores the timestamp of the sent message, which can be used:
- To read replies in a later activity (see Read Slack Message)
- To track which message was sent
- For message threading
Example Configurations
Simple Notification
Slack Connection: Company Slack
Channel: general
Message: Workflow completed successfully!
Markdown: [unchecked]
Formatted Status Update
Slack Connection: Company Slack
Channel: data-team
Message:
*Data Load Complete* ✓
Client: _{ClientName}_
Records: `{RecordCount}`
Status: *Success*
Markdown: [checked]
Context Key: SlackTimestamp
Error Alert
Slack Connection: Company Slack
Channel: alerts
Message:
⚠️ *Workflow Error*
Workflow: {WorkflowName}
Error: {ErrorMessage}
Please review immediately.
Markdown: [checked]
Common Use Cases
Workflow Start Notification
Message: 🚀 Starting daily data load workflow for {Date}
Completion Notification
Message: ✅ Daily data load completed. {RecordCount} records processed.
Approval Request
Message: 📋 Approval needed for {DocumentName}. Review at: <{ApprovalURL}|Click here>
Status Updates
Message: 📊 Processing batch {BatchNumber} of {TotalBatches}
Best Practices
- Use Meaningful Channels: Send messages to appropriate channels
- Include Context: Add relevant workflow parameters
- Use Emojis: Slack emojis make messages more visible
- Format for Readability: Use markdown for structure
- Avoid Spam: Don't send too many messages to busy channels
- Test First: Test in a private or test channel before production
OAuth Token Setup Guide
Your IT team or Slack admin needs to:
-
Create Slack App
- Go to https://api.slack.com/apps
- Click "Create New App"
- Choose "From scratch"
- Name the app (e.g., "Una Workflows")
- Select your workspace
-
Configure Permissions
- Go to "OAuth & Permissions"
- Add Bot Token Scopes:
chat:write- Send messageschannels:read- Read channel informationfiles:write- Send files (if using Send Slack File)
-
Install App
- Install app to workspace
- Copy the "Bot User OAuth Token"
- Paste token into Una Slack Connection settings
-
Add Bot to Channels
- In Slack, invite the bot to channels where it should post
/invite @Una Workflowsin each channel
Troubleshooting
Message Not Appearing
- Verify bot is added to the channel
- Check OAuth token has
chat:writepermission - Verify channel name/ID is correct
- Review workflow execution log for errors
Formatting Not Working
- Ensure markdown checkbox is enabled
- Verify you're using Slack markdown syntax (not HTML)
- Test formatting in Slack directly first
Connection Failed
- Verify OAuth token is valid
- Check token permissions in Slack App settings
- Ensure app is installed to the workspace
- Confirm connection settings in Una
Security Notes
- OAuth token provides access to your Slack workspace
- Restrict token permissions to minimum required
- Rotate tokens periodically
- Monitor bot activity in Slack audit logs
- Don't share tokens in workflow parameters or logs