Route human-in-the-loop approval requests with Slack and Postgres
Ready for 3.0What this workflow does
This workflow has 17 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Slack and Postgres.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Verify Slack Request Signature (Code): runs custom JavaScript code
- Determine Slack Request Type (Code): runs custom JavaScript code
- Route by Request Type (If): checks a condition and branches into true / false
- Create Slack Block Message (Code): runs custom JavaScript code
- Handle Slack Callback Data (Code): runs custom JavaScript code
- Send Message to Slack Channel (Slack): uses Slack
- Acknowledge Slack Callback Fast (Respond to Webhook): sends the response back to the webhook caller
- Check Slack Response Validity (Code): runs custom JavaScript code
- Retrieve Context from Database (Postgres): select
- Log Request in Database (Postgres): uses Postgres
…plus 6 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Slack
n8n-nodes-base.slack - Postgres
n8n-nodes-base.postgres - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow exposes a single webhook that either accepts new approval requests or handles Slack button callbacks, posting interactive Slack Block Kit messages and recording decisions in a PostgreSQL table. How it works 1. Receives a POST…