This workflow corresponds to n8n.io template #14267 — we link there as the canonical source.
This workflow follows the Agent → Emailsend recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "HApWnFS5OFYeT2mU",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "EmailAutoReply",
"tags": [],
"nodes": [
{
"id": "a5d6cb90-5aee-4269-b9f2-71e11e68d6df",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"position": [
-96,
80
],
"parameters": {
"simple": false,
"filters": {
"labelIds": [
"Label_2862649459238172600"
]
},
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
}
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "0f62160f-d729-4f70-8a3b-783749fbf418",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
768,
240
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o",
"cachedResultName": "gpt-4o"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "83ca0c1b-1965-4385-8ffa-6f06e01768c0",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
800,
-16
],
"parameters": {
"text": "=You are an HR assistant at Luminar Technology. Your task is to generate professional and courteous email replies to job applicants based on their application details.\n\nHere are the rules:\n\n1. Address the applicant by their name from the email subject or body.\n2. Mention the position they applied for.\n3. Thank them for applying.\n4. Keep the tone friendly, professional, and concise.\n5. Do not include sensitive internal information.\n6. Provide a closing with \"Best regards\" or \"Sincerely\" from the hiring team.\n\nUse this JSON format in your output:\n\n{\n \"subject\": \"<email subject for reply>\",\n \"body\": \"<email body for reply>\"\n}\n\nThe inputs you will receive:\n{\n \"candidateEmail\": {{ $json.candidateEmail }},\n \"companyEmail\": {{ $json.companyEmail }},\n \"subject\": {{ $json.subject }}\n}\n\nGenerate the reply email based on this input.\nSpecial Note:Remove the name of the candidate from the subject.",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3.1
},
{
"id": "c59224b3-79e0-46a4-9e7e-e95c6df36850",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
448,
-16
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "61d9e339-0a62-42c6-8e1c-71c9d88e32b9",
"name": "candidateEmail",
"type": "string",
"value": "={{ $json.replyTo.text }}"
},
{
"id": "db19c417-706a-49f5-ae61-4badce206fd8",
"name": "subject",
"type": "string",
"value": "={{ $json.subject }}"
},
{
"id": "14d21a5e-0fae-4049-9420-cf3f29576ee0",
"name": "companyEmail",
"type": "string",
"value": "={{ $json.to.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "11f0387a-7249-407d-b196-ceb3f49d0b87",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1120,
240
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"subject\": {\n \"type\": \"string\",\n \"description\": \"The email subject for the reply\"\n },\n \"body\": {\n \"type\": \"string\",\n \"description\": \"The email body for the reply\"\n }\n },\n \"required\": [\"subject\", \"body\"]\n}"
},
"typeVersion": 1.3
},
{
"id": "8d429b4d-78a3-40fa-bd8d-e04beecc5885",
"name": "Send an Email",
"type": "n8n-nodes-base.emailSend",
"position": [
1168,
-16
],
"parameters": {
"text": "={{ $json.output.body }}",
"options": {
"appendAttribution": false
},
"subject": "={{ $json.output.subject }}",
"toEmail": "={{ $('Edit Fields').item.json.candidateEmail }}",
"fromEmail": "={{ $('Edit Fields').item.json.companyEmail }}",
"emailFormat": "text"
},
"credentials": {
"smtp": {
"name": "<your credential>"
}
},
"typeVersion": 2.1
},
{
"id": "37bc69a6-c64e-4a16-b599-52035522985c",
"name": "If",
"type": "n8n-nodes-base.if",
"position": [
160,
80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 3,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7cd82b1b-2fca-4d81-b45a-da69d1dd9a9d",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{$json.subject.toLowerCase().includes(\"job application\")}}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.3
},
{
"id": "64e652f4-eabb-43ec-bb5e-b423240a66ba",
"name": "No Operation, do nothing",
"type": "n8n-nodes-base.noOp",
"position": [
448,
176
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7daa6bb4-f21f-49d0-b897-e53568fc5fcc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-976
],
"parameters": {
"color": 4,
"height": 1024,
"content": "\ud83d\udce9 Gmail Trigger \u2013 Receive Job Applications\n\nThis node monitors incoming emails from Gmail.\n\n\u26a0\ufe0f IMPORTANT SETUP (Forwarding Required):\n\nSince this workflow is designed for custom domain emails (e.g. hello@luminartechnology.com),\nyou must forward those emails to Gmail.\n\n\ud83d\udc49 Steps:\n1. Go to your email provider (e.g. Titan Email)\n2. Enable forwarding:\n hello@yourdomain.com \u2192 yourgmail@gmail.com\n\n\u26a0\ufe0f Gmail Filtering Setup (REQUIRED):\n\nForwarded emails may:\n- Skip Inbox\n- Be marked as read\n- Not trigger n8n\n\n\ud83d\udc49 Fix this using Gmail Filters:\n\n1. Go to Gmail \u2192 Settings \u2192 Filters \u2192 Create Filter\n2. Set:\n To: hello@yourdomain.com\n\n3. Select:\n \u2714 Apply label \u2192 \"job-applications\"\n \u2714 Mark as UNREAD\n \u2714 Never send to spam\n \u2714 Apply to existing messages\n\n\ud83d\udc49 In this node:\n- Set Label = job-applications\n\nThis ensures n8n correctly detects forwarded job applications."
},
"typeVersion": 1
},
{
"id": "26ed7790-76b6-4599-a400-089b876b58ce",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-464
],
"parameters": {
"color": 4,
"width": 176,
"height": 496,
"content": "\ud83d\udd0d Filter Job Application Emails\n\nThis node checks if the incoming email is a job application.\n\nCondition:\n- Subject contains \"Job Application\"\n\n\ud83d\udc49 You can customize this to match your hiring format:\nExamples:\n- \"New Job Application\"\n- \"Application for\"\n- \"CV Submission\"\n\nOnly matching emails will continue in the workflow."
},
"typeVersion": 1
},
{
"id": "4eefe12a-8082-4391-8707-5c93f5a6d1b6",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
384,
-576
],
"parameters": {
"color": 4,
"width": 208,
"height": 528,
"content": "\ud83e\uddf9 Prepare Email Data for AI Processing\n\nThis node extracts and prepares required fields:\n\n- candidateEmail \u2192 extracted from email data\n- subject \u2192 original email subject\n- companyEmail \u2192 your receiving email\n\n\ud83d\udc49 This simplifies the data before sending it to the AI Agent.\n\n\u26a0\ufe0f Note:\nFor forwarded emails, the actual candidate email may not be in the \"From\" field.\nAI will help extract the correct email from the email body."
},
"typeVersion": 1
},
{
"id": "cfa624dc-c620-4afb-86c4-99521f6cd11b",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
784,
-544
],
"parameters": {
"color": 4,
"height": 496,
"content": "\ud83e\uddf9 Prepare Email Data for AI Processing\n\nThis node extracts and prepares required fields:\n\n- candidateEmail \u2192 extracted from email data\n- subject \u2192 original email subject\n- companyEmail \u2192 your receiving email\n\n\ud83d\udc49 This simplifies the data before sending it to the AI Agent.\n\n\u26a0\ufe0f Note:\nFor forwarded emails, the actual candidate email may not be in the \"From\" field.\nAI will help extract the correct email from the email body."
},
"typeVersion": 1
},
{
"id": "c37e284d-629b-48d3-846b-d593a72ace3a",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
368
],
"parameters": {
"color": 3,
"height": 272,
"content": "\ud83e\udde0 OpenAI Model\n\nThis node powers the AI Agent.\n\nModel used:\n- GPT-4o (can be changed)\n\n\ud83d\udc49 Requires:\n- OpenAI API Key\n\nYou can switch to other models depending on cost/performance needs."
},
"typeVersion": 1
},
{
"id": "49c09219-5775-4b34-bbb9-b161634b5d46",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1040,
384
],
"parameters": {
"color": 3,
"height": 272,
"content": "\ud83d\udce6 Structured Output \n\nThis node ensures AI returns clean JSON output.\n\nExpected format:\n{\n \"subject\": \"...\",\n \"body\": \"...\"\n}\n\n\ud83d\udc49 Why important?\n- Prevents broken responses\n- Ensures compatibility with Send Email node\n- Makes workflow stable and production-ready"
},
"typeVersion": 1
},
{
"id": "ffad9b90-4419-4502-b4f2-0c3cd383fba1",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1104,
-448
],
"parameters": {
"color": 4,
"height": 400,
"content": "\u2709\ufe0f Send Auto Reply to Candidate\n\nThis node sends the AI-generated response.\n\nConfiguration:\n- Uses SMTP (e.g. Titan Email)\n- Sends from your company email\n- Sends to candidate email\n\n\u2699\ufe0f Requirements:\n- SMTP credentials must be configured\n- Example:\n Host: smtp.titan.email\n Port: 465\n Secure: SSL\n\n\u26a0\ufe0f Important:\n- Disable \"Append Attribution\" to remove n8n footer\n- Use HTML format for better email styling"
},
"typeVersion": 1
},
{
"id": "b0bed43b-da68-4599-a3b7-02746028c077",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
336
],
"parameters": {
"color": 3,
"height": 288,
"content": "\ud83d\udeab No Operation (Ignore Non-Matching Emails)\n\nThis node is used when:\n- Email is NOT a job application\n\n\ud83d\udc49 Prevents unnecessary processing\n\nKeeps workflow clean and efficient."
},
"typeVersion": 1
},
{
"id": "a8c90617-0be4-409c-b64d-2f304547cfb8",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
-64
],
"parameters": {
"width": 480,
"height": 512,
"content": "\ud83e\udd16 AI Job Application Auto-Reply System(Company Email)\n\nThis workflow automates HR email responses using AI.\n\nFlow:\n1. Receive job applications via Gmail (forwarded from domain email)\n2. Filter relevant emails\n3. Extract data\n4. Generate AI-based reply\n5. Send response automatically\n\n\ud83d\udca1 Ideal for:\n- Startups\n- HR teams\n- Recruitment automation\n\n\u26a0\ufe0f Setup Required:\n- Gmail forwarding + filtering\n- OpenAI API key\n- SMTP configuration"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "f09d0172-79ce-4512-94a3-171458be52e2",
"connections": {
"If": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Send an Email",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Gmail Trigger": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
gmailOAuth2openAiApismtp
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automatically replies to job applications received via email using AI.
Source: https://n8n.io/workflows/14267/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Stop reading job listings that aren't a fit. This workflow automatically crawls five major job boards (LinkedIn, Indeed, WeAreDevelopers, Stepstone, and Xing) and scores every listing against your per
Code Schedule. Uses memoryBufferWindow, agent, stickyNote, outputParserStructured. Event-driven trigger; 45 nodes.
3790. Uses memoryBufferWindow, agent, outputParserStructured, lmChatOpenAi. Event-driven trigger; 45 nodes.
Stock Analysis Agent (Hebrew, RTL, GPT-4o)
This n8n workflow automates sales processes using AI agents integrated with Airtable as a CRM and Gmail for email handling. It consists of two main workflows: one for handling Airtable status changes