Basic Automatic Gmail Email Labelling with OpenAI and Gmail API
n8n template #2740Summary
Use templateDescription This workflow automates email categorization in Gmail using the Gmail API and OpenAI's language model. It periodically checks for new emails, reads their content, and categorizes them based on existing Gmail labels. If no matching label is found, the workflow creates a new label and assigns it to the email. Key Features Polling for Emails: The workflow triggers every 5 minutes to check for new emails using the Gmail Trigger node. Reading Labels: Existing Gmail labels are fetched to determine the most relevant match for email categorization. Dynamic Labeling: If no existing label matches, a new label is created dynamically based on the email's content. OpenAI Integration: The work
Hand off to your agent
Prompt
Help me set up the n8n workflow "Basic Automatic Gmail Email Labelling with OpenAI and Gmail API" (https://n8n.io/workflows/2740). It uses: AI Agent, OpenAI Chat Model, Simple Memory. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.
Paste into Claude Code and it will do the rest.
Apps and nodes
Similar workflows
NameViews
- AI agent chat780K
- Building Your First WhatsApp Chatbot332K
- Angie, personal AI assistant with Telegram voice and text326K
- Build Your First AI Data Analyst Chatbot134K
- Create a Branded AI-Powered Website Chatbot88K
- Conversational Telegram Bot with GPT-5/GPT-4o for Text and Voice Messages82K
- Chat with Postgresql Database74K
- AI chatbot that can search the web72K