Auto-Label Gmail Messages with AI
detail.loadingPreview
Automatically categorize and label incoming Gmail messages using AI based on their content.
About This Workflow
This workflow leverages AI to analyze the content of incoming Gmail messages and automatically assign relevant labels. It fetches new emails, extracts their content, prompts an AI model (OpenAI Chat) to categorize them based on predefined labels, and then applies these labels back to the emails in Gmail. The workflow also handles merging AI-suggested labels with existing Gmail labels.
Key Features
- Gmail Trigger: Monitors your Gmail inbox for new emails.
- Content Extraction: Retrieves the full content of each new email.
- AI-Powered Labeling: Uses OpenAI (GPT-4 Turbo Preview) to suggest labels based on email content.
- Customizable Labels: Easily modify the AI prompt and JSON schema to define your own labels.
- Label Management: Merges AI-suggested labels with existing Gmail labels and applies them to the message.
- Structured Output: Parses AI output into a structured JSON format.
How To Use
- Set up Gmail Trigger: Configure the
Gmail triggernode to monitor your inbox. - Define AI Labels: Edit the
Assign labels for messagenode's system prompt and theJSON Parsernode's JSON schema to include your desired labels (e.g., 'Partnership', 'Inquiry', 'Notification'). Ensure label names are identical in both places. - Configure OpenAI: Ensure your
OpenAI Chatnode is correctly set up with your API credentials and a suitable model (e.g.,gpt-4-turbo-preview). - Gmail Credentials: Provide your Gmail OAuth2 credentials for all Gmail nodes.
- Run the Workflow: Enable the workflow to start automatically labeling incoming emails.
Apps Used
Workflow JSON
{
"id": "d2aa7e05-af4f-48b4-b81e-f3e5d02f42cb",
"name": "Auto-Label Gmail Messages with AI",
"nodes": 7,
"category": "Communication",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: d2aa7e05-af4f...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Related Workflows
Discover more workflows you might like
Bitrix24 Chatbot Application Workflow with Webhook Integration
A n8n workflow that integrates with Bitrix24 to handle chatbot events via webhooks, process messages, join events, installation, and deletion.
Send SMS with MessageBird
Send SMS messages using the MessageBird API.
Send SMS via Mocean
Trigger an SMS message using the Mocean node.