Approval Workflow Handler – SendGrid & Baserow
This workflow automates the end-to-end approval process for any request type (e.g., purchase orders, content sign-off, access permissions). It routes the request to designated approvers, records every decision in a Baserow table, and notifies requesters and stakeholders via SendGrid at each stage.
Pre-conditions/Requirements
Prerequisites
- n8n instance (self-hosted, desktop, or n8n cloud)
- SendGrid account with an API Key
- Baserow workspace & table set up to store approval records
- Basic understanding of n8n node configuration
Required Credentials
- SendGrid API Key – For sending transactional emails
- Baserow Personal API Token – For creating, updating, and querying table rows
Specific Setup Requirements
| Baserow Column |
Type |
Purpose |
Example Value |
request_id |
text |
Unique identifier for each request |
2542 |
title |
text |
Short description of the request |
“PO > $5K” |
status |
single select |
Tracks state (Pending, Approved, Rejected) |
“Pending” |
requester |
text |
Email of person creating the request |
[email protected] |
approver |
text |
Email of assigned approver |
[email protected] |
updated_at |
date |
Last status change timestamp |
|
How it works
This workflow automates the end-to-end approval process for any request type (e.g., purchase orders, content sign-off, access permissions). It routes the request to designated approvers, records every decision in a Baserow table, and notifies requesters and stakeholders via SendGrid at each stage.
Key Steps:
- Trigger: A Manual Trigger (or any upstream workflow) injects the initial request data.
- Create Record (Baserow): Store the new request as a “Pending” row.
- Notify Approver (SendGrid): Email the approver with approval/denial links.
- Wait for Action: Hold execution until the approver clicks a link that calls the workflow’s Webhook URL.
- Decision Branch (If node): Determine whether the request is Approved or Rejected.
- Update Record (Baserow): Write the new status and timestamp back to the row.
- Notify Requester (SendGrid): Send the final decision to the original requester.
- Error Handling: Error Trigger captures any unhandled failures and notifies ops.
Set up steps
Setup Time: 15-25 minutes
- Clone or import the template into your n8n instance.
- Add credentials
a. Go to Credentials → New → SendGrid and paste your API key.
b. Go to Credentials → New → Baserow and paste your Personal API Token.
- Configure environment variables (optional but recommended)
APPROVER_EMAILS – Comma-separated list of default approvers.
STAKEHOLDER_EMAILS – Comma-separated list of CC recipients.
- Edit the Baserow node
- Select your workspace and the “Approvals” table that matches the column schema above.
- Customize email templates in both SendGrid nodes (subject, HTML content, variables).
- Update Wait node’s webhook URL if running self-hosted behind a reverse proxy.
- Run a test execution using the Manual Trigger; confirm emails are delivered and the Baserow table updates correctly.
- Switch the trigger (optional) from Manual to Webhook or Schedule for production use.
- Enable workflow to begin processing live approval requests.
Node Descriptions
Core Workflow Nodes:
- Manual Trigger – Starts the workflow during testing or via UI.
- Set (Initialize Request) – Normalizes incoming data and generates a unique
request_id.
- Baserow (Create Row) – Inserts a new “Pending” record.
- SendGrid (Notify Approver) – Sends approval request email with dynamic links.
- Wait – Pauses execution until the approver responds.
- If (Decision) – Routes the flow based on
approved vs rejected.
- Baserow (Update Row) – Writes final status and timestamp.
- SendGrid (Notify Requester) – Communicates final decision.
- Merge – Consolidates parallel branches before ending.
- Error Trigger – Captures errors, logs them, and optionally notifies ops via email.
- Sticky Notes – Contain inline documentation for maintainers.
Data Flow:
- Manual Trigger → Set → Baserow (Create Row) → SendGrid (Notify Approver) → Wait
- Wait → If → (Approved ⬅︎ or ➡︎ Rejected) → Baserow (Update Row) → SendGrid (Notify Requester) → Merge
Customization Examples
1. Auto-assign approver based on request amount
// Code node: Dynamic approver selection
const amount = items[0].json.amount;
items[0].json.approver =
amount > 10000 ? '[email protected]' : '[email protected]';
return items;
2. Slack notification instead of email
// Replace SendGrid node with Slack node
{
"channel": "#approvals",
"text": `Request ${$json["request_id"]} was approved by ${$json["approver"]}`
}
Data Output Format
The workflow outputs structured JSON data:
{
"request_id": "2542",
"title": "PO > $5K",
"status": "Approved",
"requester": "[email protected]",
"approver": "[email protected]",
"updated_at": "2024-04-27T15:41:22.347Z"
}
Troubleshooting
Common Issues
- Emails not sending – Verify SendGrid API key and account sender verification; check node credentials.
- Baserow “permission denied” – Ensure the Personal API Token has access to the workspace and table.
- Wait node never resumes – Confirm the public webhook URL is reachable and correctly embedded in email links.
Performance Tips
- Batch approvals in a single workflow run when possible to reduce API overhead.
- Set up Baserow table indexing on
request_id for faster lookups.
Pro Tips:
- Use the Error Trigger to post incidents to a dedicated Slack or Microsoft Teams channel.
- Store reusable email templates in a separate “Settings” sheet or in n8n’s global static data.
- Add analytics by sending events to PostHog or Amplitude after each approval.
This is a community-contributed workflow template. It is provided “as-is” without warranty; review and test thoroughly before using in production.