Reads new support emails from Gmail, drafts a context-aware reply with GPT, and posts it to Slack with approve/edit buttons. Nothing is sent until a human signs off, so you get the speed of AI with the safety of review.
{
"name": "AI Support Email Auto-Responder",
"nodes": [
{
"id": "se01aa",
"name": "New Support Email",
"type": "n8n-nodes-base.gmailTrigger",
"typeVersion": 1.2,
"position": [
200,
300
],
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"filters": {
"labelIds": [
"INBOX"
],
"q": "label:support is:unread"
}
}
},
{
"id": "se02bb",
"name": "Draft Reply",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.4,
"position": [
420,
300
],
"parameters": {
"modelId": "gpt-4o",
"messages": {
"values": [
{
"role": "system",
"content": "You are a friendly support agent. Draft a concise, helpful reply."
},
{
"role": "user",
"content": "From: {{ $json.from }}\nSubject: {{ $json.subject }}\nBody: {{ $json.snippet }}"
}
]
}
}
},
{
"id": "se03cc",
"name": "Approve in Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
640,
300
],
"parameters": {
"resource": "message",
"operation": "post",
"select": "channel",
"channelId": "#support-approvals",
"text": "Draft reply to {{ $('New Support Email').item.json.from }}:\n\n{{ $json.message.content }}\n\nReact with white_check_mark to approve."
}
},
{
"id": "se04dd",
"name": "Send Reply",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
860,
300
],
"parameters": {
"resource": "message",
"operation": "reply",
"messageId": "={{ $('New Support Email').item.json.id }}",
"message": "={{ $('Draft Reply').item.json.message.content }}",
"options": {}
}
},
{
"id": "se05ee",
"name": "Label Handled",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
1080,
300
],
"parameters": {
"resource": "message",
"operation": "addLabels",
"messageId": "={{ $('New Support Email').item.json.id }}",
"labelIds": [
"handled"
]
}
}
],
"connections": {
"New Support Email": {
"main": [
[
{
"node": "Draft Reply",
"type": "main",
"index": 0
}
]
]
},
"Draft Reply": {
"main": [
[
{
"node": "Approve in Slack",
"type": "main",
"index": 0
}
]
]
},
"Approve in Slack": {
"main": [
[
{
"node": "Send Reply",
"type": "main",
"index": 0
}
]
]
},
"Send Reply": {
"main": [
[
{
"node": "Label Handled",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {},
"meta": {}
}