Draft and approve Gmail replies with OpenAI and CustomJS
UnknownWhat this workflow does
This AI workflow has 11 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Gmail, OpenAI and Pdf Toolkit V2 (community).
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Get many messages (Gmail): get many
- Extract Reply Data (Code): runs custom JavaScript code
- Filter No Reply Emails (Code): runs custom JavaScript code
- Reply to a message (Gmail): reply
- Generate AI Draft Reply (OpenAI): uses OpenAI
- Mark a message as read (Gmail): mark as read
- Format Email Drafts (Code): runs custom JavaScript code
- Build Approval Page (Code): runs custom JavaScript code
- Upsert Approval Page (Pdf Toolkit): create or update (page)
Services it uses
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @custom-js/n8n-nodes-pdf-toolkit-v2 is verified or supports 3.0 (used in Upsert Approval Page).
Nodes used (6)
- Manual Trigger
n8n-nodes-base.manualTrigger - Pdf Toolkit
@custom-js/n8n-nodes-pdf-toolkit-v2.pdfToolkit - Gmail
n8n-nodes-base.gmail - Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - OpenAI
@n8n/n8n-nodes-langchain.openAi
From the author
Quick Overview This workflow drafts replies for unread Gmail messages using OpenAI, publishes a Tailwind/Alpine approval dashboard to CustomJS, and sends approved replies back through Gmail via a webhook submission. How it works 1. Starts manually and pulls…