Label Gmail emails by priority with Groq Llama 3.3
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 8 nodes and runs on Gmail events. Along the way it connects Gmail. It also calls api.groq.com over HTTP.
How it runs
Trigger: On Gmail events.
- Post to AI Classifier API (HTTP Request): calls api.groq.com (POST)
- Parse Classification Response (Code): runs custom JavaScript code
- Check If Action Required (If): checks a condition and branches into true / false
- Add Label: Action Required (Gmail): add labels (message)
- Check If Promotions (If): checks a condition and branches into true / false
- Add Label: Promotions (Gmail): add labels (message)
- Add Label: Other (Gmail): add labels (message)
Services it uses
HTTP calls to: api.groq.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (When Email Received).
Nodes used (5)
- Gmail Trigger
n8n-nodes-base.gmailTrigger - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail
From the author
Quick overview This workflow polls Gmail for new emails, sends the email text to Groq’s OpenAI-compatible chat completions API (Llama 3.3) to classify it, and then applies the matching Gmail label for Action Required, Promotions, or Other. How it works 1.…