🔬 Handle approval requests with SendGrid email and Baserow records

⚡ 36 views · 🔬 Document Extraction & Analysis

Description

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

Required Credentials

Specific Setup Requirements

Baserow ColumnTypePurposeExample Value
request_idtextUnique identifier for each request2542
titletextShort description of the request“PO > $5K”
statussingle selectTracks state (Pending, Approved, Rejected)“Pending”
requestertextEmail of person creating the requestalice@acme.io
approvertextEmail of assigned approverbob@acme.io
updated_atdateLast 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:

Set up steps

Setup Time: 15-25 minutes

  1. Clone or import the template into your n8n instance.
  2. 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.
  3. Configure environment variables (optional but recommended)
    • APPROVER_EMAILS – Comma-separated list of default approvers.
    • STAKEHOLDER_EMAILS – Comma-separated list of CC recipients.
  4. Edit the Baserow node
    • Select your workspace and the “Approvals” table that matches the column schema above.
  5. Customize email templates in both SendGrid nodes (subject, HTML content, variables).
  6. Update Wait node’s webhook URL if running self-hosted behind a reverse proxy.
  7. Run a test execution using the Manual Trigger; confirm emails are delivered and the Baserow table updates correctly.
  8. Switch the trigger (optional) from Manual to Webhook or Schedule for production use.
  9. Enable workflow to begin processing live approval requests.

Node Descriptions

Core Workflow Nodes:

Data Flow:

  1. Manual Trigger → Set → Baserow (Create Row) → SendGrid (Notify Approver) → Wait
  2. 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 ? 'cfo@acme.io' : 'manager@acme.io';
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": "alice@acme.io",
  "approver": "bob@acme.io",
  "updated_at": "2024-04-27T15:41:22.347Z"
}

Troubleshooting

Common Issues

  1. Emails not sending – Verify SendGrid API key and account sender verification; check node credentials.
  2. Baserow “permission denied” – Ensure the Personal API Token has access to the workspace and table.
  3. Wait node never resumes – Confirm the public webhook URL is reachable and correctly embedded in email links.

Performance Tips

Pro Tips:


This is a community-contributed workflow template. It is provided “as-is” without warranty; review and test thoroughly before using in production.

đź”— Nodes Used

SendGrid, Baserow

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup