This workflow follows the Gmail → Postgres recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "W5: Execution",
"nodes": [
{
"parameters": {
"operation": "createDraft",
"messageId": "={{ $node[\"Fetch Case Details\"].json.source_provider_id }}",
"threadId": "={{ $node[\"Fetch Case Details\"].json.thread_id }}",
"emailType": "reply",
"text": "Hello, \n\nI have found the requested receipt for {{ $node[\"Fetch Case Details\"].json.period }}. Please find it attached.\n\nBest regards,\nAssistant",
"attachments": "={{ $node[\"Fetch Candidate Attachment\"].json.attachment_id }}"
},
"id": "w5-gmail-draft",
"name": "Create Gmail Draft",
"type": "n8n-nodes-base.gmail",
"typeVersion": 1,
"position": [
400,
300
]
},
{
"parameters": {
"operation": "executeQuery",
"query": "UPDATE bookkeeping_cases SET status = 'done' WHERE id = $1;",
"queryParams": "={{ $json.case_id }}"
},
"id": "w5-db-update",
"name": "Mark Done",
"type": "n8n-nodes-base.postgres",
"typeVersion": 1,
"position": [
600,
300
]
}
],
"connections": {
"Create Gmail Draft": {
"main": [
[
{
"node": "Mark Done",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
W5: Execution. Uses gmail, postgres. Manual trigger; 2 nodes.
Source: https://github.com/perttu/workforce/blob/63589768519d1828d7fae6a1d31563f24eeb4afb/workflows/w5_execution.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This is a high-security enterprise solution for LegalOps and Compliance departments. It automates the high-stakes process of decrypting batches of legacy, password-protected PDF assets to facilitate f
AEJaCA — Newsletter Signup (10% discount). Uses postgres, gmail. Webhook trigger; 6 nodes.
Gmail Googledrive. Uses gmail, googleDrive. Manual trigger; 3 nodes.
Ts Order Ingest. Uses httpRequest, itemLists, stopAndError, airtable. Manual trigger; 52 nodes.
Suspicious_login_detection. Uses postgres, httpRequest, noOp, html. Webhook trigger; 43 nodes.