Receive Slack alerts, publish to X, and archive in Postgres
Workflow Description
Enterprise automation that captures messages through webhooks, broadcasts them to X platform with formatted content, and maintains a complete audit trail in Postgres. Features intelligent conditional routing to ensure only relevant alerts reach appropriate channels with proper formatting and verification.
How it works
- 1.Receive webhook request and parse incoming Slack message content and metadata
- 2.Evaluate configured conditions and route data through appropriate processing branches
- 3.Post formatted message to X account with required hashtags and context
- 4.Archive complete transaction record and message details in Postgres database
- 5.Send Slack confirmation notification to verify successful execution
Use cases
- Automatically broadcast DevOps alerts and infrastructure updates to X while maintaining audit logs for compliance
- Centralize critical notifications from multiple Slack channels with automatic public posting and permanent archival
- Create incident management workflow that notifies team via Slack and announces status updates on X simultaneously
Requirements
- Active Slack workspace with webhook creation permissions and channel access for receiving and sending messages
- X (Twitter) developer account with API credentials configured for authenticated message posting
- PostgreSQL database with proper schema and tables configured for logging transaction records
Service Value
Ready-made workflow template for automation delivery and service execution.
Apps Used
Details
How to Use
- 1.Click "Download Template"
- 2.Open your n8n dashboard
- 3.Go to Workflows > Import from File
- 4.Select downloaded file and configure credentials
Nodes Used (34)
Start thread
Slack
send help
HTTP Request
Validate Slack token
If
Sticky Note3
Sticky Note
Reply to user that command was received
HTTP Request
if has workflow
If
Set config
Set
Send debug url
HTTP Request
if create thread
If
Alert user that thread was created
HTTP Request
Add debug info
Slack
Execute target workflow
Execute Workflow
Add thread info
Merge
Handle other commands
Switch
Set thread info
Set
Unknown command
HTTP Request
Set vars
Set
Webhook to call for Slack command
Webhook
Reply to user directly
HTTP Request
Sticky Note
Sticky Note
Command workflow trigger
Execute Workflow Trigger
if has flag
If
If matches env variable
If
Found user
HTTP Request
Format data into nice structure
Code
REPLACE ME WITH TRIGGER
Set
Delete user here for example
Postgres
Get user here for example
Postgres
Confirm user was deleted
Slack
Replying to thread
Slack
Sticky Note2
Sticky Note
Sticky Note1
Sticky Note
parse command
Code
Validate webhook signature
Code