Keyflow

Search Keyflow

Find a shortcut, workflow, MCP server or skill

Auto-label incoming Gmail messages with AI nodes

n8n template #2197
This workflow uses AI to analyze the content of every new message in Gmail and then assigns specific labels, according to the context of the email. Default configuration of the workflow includes 3 labels: „Partnership” - email about sponsored content or cooperation, „Inquiry” - email about products, services, „Notification” - email that doesn't require response. You can add or edit labels and descriptions according to your use case. 🎬 See this workflow in action in my YouTube video about automating Gmail. How it works? Gmail trigger performs polling every minute for new messages (you can change the trigger interval according to your needs). The email content is then downloaded and forwarded

How to set it up

  1. Open template #2197 on n8n.io and click Use for free, or copy the template JSON and paste it onto an empty canvas in n8n.
  2. Create 2 credentials under Credentials → Add credential: Gmail, OpenAI Chat Model. Then open each of those nodes and pick the credential.
  3. Check the model in the OpenAI Chat Model node. The template may point at a model your account can't use; swap it for one you have access to.
  4. Click Execute workflow and step through each node's output to confirm the data looks right.
  5. Toggle the workflow to Active so its trigger runs on its own.

Hand off to your agent

Prompt

Help me set up the n8n workflow "Auto-label incoming Gmail messages with AI nodes" (https://n8n.io/workflows/2197). It uses: Gmail, Basic LLM Chain, OpenAI Chat Model, Structured Output Parser. 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

Questions

Yes. Oskar published it free on n8n.io as a verified creator, and it has 27K views. It runs on n8n Cloud or a self-hosted n8n instance.

Gmail, OpenAI Chat Model. The other 2 nodes are built into n8n.

Similar workflows

NameViews
  1. Gmail AI Auto-Responder: Create Draft Replies to incoming emails55K
  2. Automate social media content with AI for Instagram, Facebook, LinkedIn & X16K
  3. 🎨 AI Design Team - Generate and Review AI Images with Ideogram and OpenAI9,990
  4. Automate SEO blog creation + social media with GPT-4, Perplexity and WordPress5,798
  5. Automated Voice Appointment Reminders with Google Calendar GPT ElevenLabs Gmail5,335
  6. Explore n8n Nodes in a Visual Reference Library5,197
  7. ✨🤖Automate Multi-Platform Social Media Content Creation with AI205K
  8. Chat with PDF docs using AI (quoting sources)95K