Keyflow

Search Keyflow

Find a shortcut, workflow, MCP server or skill

Compose reply draft in Gmail with OpenAI Assistant

n8n template #2198
This workflow uses OpenAI Assistant to compose draft replies for labeled email messages. It automatically connects the drafts to Gmail threads. πŸ’‘ You can add knowledge base to your OpenAI Assistant and make your reply drafts very customized (e.g. compose response with product information in response to inquiry from customer). 🎬 See this workflow in action in my YouTube video about automating Gmail. How it works? The workflow is triggered at regular intervals (default: every 1 minute – you can change this value) to check for messages with a specific label (e.g., "AI"). The content of the retrieved email message is then forwarded to the OpenAI Assistant node, and a reply draft is generated.

How to set it up

  1. Open template #2198 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. Then open each of those nodes and pick the credential.
  3. Check the model in the OpenAI 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 "Compose reply draft in Gmail with OpenAI Assistant" (https://n8n.io/workflows/2198). It uses: HTTP Request, Gmail, Code, OpenAI. 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 17K views. It runs on n8n Cloud or a self-hosted n8n instance.

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

Similar workflows

NameViews
  1. βœ¨πŸ€–Automate Multi-Platform Social Media Content Creation with AI205K
  2. AI Timesheet Generator with Gmail, Calendar & GitHub to Google Sheets20K
  3. Daily Podcast Summary15K
  4. Automate SEO blog creation + social media with GPT-4, Perplexity and WordPress5,798
  5. Explore n8n Nodes in a Visual Reference Library5,197
  6. Fully Automated AI Video Generation & Multi-Platform Publishing191K
  7. AI-Powered Short-Form Video Generator with OpenAI, Flux, Kling, and ElevenLabs93K
  8. Clone Viral TikToks with AI Avatars & Auto-Post to 9 Platforms using Perplexity & Blotato84K