AI drafts replies to your emails

AI writes a reply draft for every new email — you just review and hit send.

Medium Saves ~12 hours/month ProductivityBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Gmail — new email in your inbox
  1. Receive the new email.
  2. Ask an AI model to write a short, polite reply in your tone.
  3. Save it as a draft in the same thread — nothing is sent automatically.

Diagram

GNew emailGmail TriggerWrite replyBasic LLM ChainClaude modelAnthropic Chat Mo…GSave as draftGmail
Trigger App AI

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder. AI steps use a Claude model node — swap it for OpenAI, Gemini or Ollama if you prefer.

Workflow JSON
Show code (139 lines)
{
  "name": "AI drafts replies to your emails (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## AI drafts replies to your emails\nAI writes a reply draft for every new email — you just review and hit send.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "292cf932-28a7-4ab7-a5b2-acbc1029bdae",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "simple": false,
        "filters": {
          "q": "category:primary"
        },
        "options": {}
      },
      "id": "292cf932-28a7-4ab7-a5b2-acbc1029bdae",
      "name": "New email",
      "type": "n8n-nodes-base.gmailTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Write a short, friendly reply to this email as YOUR_NAME. Match the sender's language. Don't invent facts, prices or dates — use [brackets] where I need to fill something in. Reply with the email body only.\n\nFrom: {{ $json.from.text }}\nSubject: {{ $json.subject }}\n\n{{ $json.text }}"
      },
      "id": "292cf932-28a7-4ab7-a5b2-acbc1029bdae",
      "name": "Write reply",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.5,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "claude-sonnet-5",
          "mode": "list"
        },
        "options": {}
      },
      "id": "292cf932-28a7-4ab7-a5b2-acbc1029bdae",
      "name": "Claude model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.3,
      "position": [
        300,
        220
      ]
    },
    {
      "parameters": {
        "resource": "draft",
        "operation": "create",
        "subject": "=Re: {{ $('New email').item.json.subject }}",
        "message": "={{ $json.text }}",
        "options": {
          "threadId": "={{ $('New email').item.json.threadId }}",
          "sendTo": "={{ $('New email').item.json.from.value[0].address }}"
        }
      },
      "id": "292cf932-28a7-4ab7-a5b2-acbc1029bdae",
      "name": "Save as draft",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        600,
        0
      ]
    }
  ],
  "connections": {
    "New email": {
      "main": [
        [
          {
            "node": "Write reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write reply": {
      "main": [
        [
          {
            "node": "Save as draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude model": {
      "ai_languageModel": [
        [
          {
            "node": "Write reply",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Limit the trigger with a search like category:primary to skip newsletters.

Related flows