workflows.fit
Back to n8n workflows
n8n templateFreeBy Pramod Rathoure

Automate sponsored deal email responses with Gmail and GPT-4

Automate Sponsored Deal Emails with n8n + AI 🚀 Managing inbound emails can be exhausting — especially when your inbox is flooded with sponsored deal requests that don’t always fit your brand. Manually reading, filter...

CommunicationHITLAILangchainCore NodesGmail TriggerSetAgent
Loading interactive preview...

Template notes

Automate Sponsored Deal Emails with n8n + AI 🚀

Managing inbound emails can be exhausting — especially when your inbox is flooded with sponsored deal requests that don’t always fit your brand. Manually reading, filtering, and politely declining each one eats up valuable time.

That’s why I built a smart n8n workflow that automatically: - Detects sponsored deal inquiries, - Decides if they match my criteria, - Drafts a professional, courteous reply, - Or simply ignores irrelevant messages.

The best part? It runs on autopilot. Let’s break down every single node in this workflow.

🔔 1. Gmail Trigger – “Your Inbox Watchdog” - Polls your Gmail inbox every minute. - Detects new emails instantly. - Hands over each email to the next step for analysis.

✂️ 2. Edit Fields (Set Node) – “Extract the Essentials” - Pulls out the most important parts of the email: - From → Sender’s email address - Subject → The email subject line - Email Body → The main text content - Keeps data structured and ready for AI to process.

🧠 3. AI Agent – “The Smart Classifier” - Powered by LangChain + OpenAI. - Reads the email content carefully. - Outputs two things: - isSponsoredEmail → true/false - reason → why it decided that way - Example: json { "isSponsoredEmail": true, "reason": "The email mentions a paid collaboration opportunity." }

- Structured Output Parser – “Keep It Clean”