Block 1 - Get Label Id's
- Type / Role
- n8n-nodes-base.gmail - gmail
- Config choices
- Version 2.1
This workflow is provided as-is. Please review and test before using in production.
An AI inbox labelling manager that has reasoning attached to the ChatGPT inbox manager within n8n. Super simple yet highly effective automation. How it works: • Monitors Gmail inbox → triggers work...
n8n-nodes-base.gmail, n8n-nodes-base.gmailtrigger, @n8n/n8n-nodes-langchain.toolthink, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Seb.
Original n8n.io sourceAn AI inbox labelling manager that has reasoning attached to the ChatGPT inbox manager within n8n. Super simple yet highly effective automation.
• Monitors Gmail inbox → triggers workflow when a new unread email is received.
• Fetches email details including subject, body, and sender information.
• Sends email content to OpenAI → uses AI to determine the most relevant label based on predefined rules.
• AI uses a think tool → justifies why it selected that specific label.
• Retrieves Gmail label IDs → matches AI’s choice to correct Gmail label for that email.
• Adds the chosen label (e.g., Positive reply, priority email, etc) to the email automatically → optionally marks it as read/starred.
• Continues monitoring → every new email is processed automatically, keeping the inbox organized.
• Connect Gmail account to the Gmail Node
• Create OpenAI account & API key → go to OpenAI and sign up or log in. Once logged in, click Dashboard in the top menu. On the left sidebar, find API Keys and click Create new key. Copy this key — you’ll need it for n8n.
Check your account balance → in the top-right, click your profile icon → Your Profile → Billing. Make sure your account has funds (e.g., $5 USD is enough for testing) so the API requests can run.
Do these steps through this link: https://platform.openai.com/
• Retrieve Gmail label IDs → use the Gmail “get labels” node to fetch IDs for all labels you want the AI to use.
• Use OpenAI (ChatGPT) node → set up system and user prompts with rules describing each label, and include the label IDs (Important).
• Test the workflow → send example emails, check labeling, and refine AI prompt or label rules if needed.
• Tip: Pin trigger data for testing (Gmail node "Watch Incoming Emails") → re-use the same email record to speed up testing without sending multiple emails.
Handles multiple labels → adding new labels only requires updating the AI prompt (no extra nodes).
Scales easily → works for any number of Gmail labels without cluttering the workflow.
For a complete rundown on how to set this up watch my YouTube tutorial linked below
https://www.youtube.com/watch?v=7nda4drHcWw
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Automate Gmail email categorization with GPT-4o AI and reasoning |
|---|---|
| Complexity | intermediate |
| Nodes | 13 |
| Categories | Support Chatbot, AI Summarization |
| Author | Seb |
| Published | 13 Oct 2025 |
Use the JSON export at /data/workflows/9583/9583.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
An AI inbox labelling manager that has reasoning attached to the ChatGPT inbox manager within n8n. Super simple yet highly effective automation. How it works: • Monitors Gmail inbox → triggers work...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Support Chatbot, AI Summarization use case.