What This Workflow Does
Listens for button clicks from the Invoice → Slack Approval workflow. When someone clicks Approve, Reject, or Flag on an invoice in Slack, this workflow captures that decision, logs it to Google Sheets, and sends a confirmation notification.
How It Works
- Webhook Trigger – Receives POST request from Slack when a button is clicked
- Parse Payload – Extracts the JSON payload from Slack's request body
- Extract Decision Data – Pulls decision, user info, and invoice details from the message
- Route by Decision – Branches to Approved, Rejected, or Flagged path
- Log to Sheets – Appends invoice data to the appropriate sheet tab
- Notify via Slack – Sends confirmation DM to the approver
Decision Routes
- ✅ Approved → Logs to "Approved" sheet → DM confirmation
- ❌ Rejected → Logs to "Rejected" sheet → DM confirmation
- 🚩 Flagged → Logs to "Flagged" sheet → DM for manual review
Setup Guide
1. Create Google Sheet
- Create a new Google Sheet with 3 tabs:
Approved, Rejected, Flagged
- Add these column headers to each tab:
- Supplier Name
- Invoice Number
- Amount
- Date
- Copy the Sheet ID from the URL
2. Connect the Nodes in n8n
- Add your Google Sheets OAuth2 credential to all three logging nodes
- Update the Document ID in each Google Sheets node to your Sheet ID
- Add your Slack API credential to all three notification nodes
- Update the User ID in the notification nodes (or change to channel)
3. Configure Slack Interactivity
- Go to api.slack.com/apps → your app → Interactivity & Shortcuts
- Set the Request URL to this workflow's webhook URL
- Save Changes
4. Activate & Test
- Click Active in the top-right corner of n8n
- Trigger the Invoice Approval workflow to send a Slack message
- Click a button in Slack
- Check Google Sheets and Slack for results