n8n recipe · ai
Gmail → OpenAI → Slack
Each new Gmail message is summarized by OpenAI and the summary is posted to Slack.
지메일에 새 메일이 오면 OpenAI가 요약해서 슬랙에 올려요.
Steps
- When when a new email arrives in gmail — Gmail node
- Then summarize it with openai — OpenAI node
- Then send the summary to slack — Slack node
Fields to fill (4)
The file has every node wired up. These are the blanks only you can fill (your form, your sheet, your words).
| Node | What to do |
|---|---|
| OpenAI | fill modelId (Model) |
| Slack | check select = 'channel' (first option; pick yours) |
| Slack | fill channelId (The Slack channel to send to) — only if select = channel |
| Slack | fill text (The message text to post) — the AI step's output: run that node once in n8n and pick its output field |
Accounts to connect (3)
In n8n, pick or add a credential on each node — one of the types below.
- Gmail:
googleApiorgmailOAuth2 - OpenAI:
openAiApi - Slack:
slackApiorslackOAuth2Api
Get the n8n file
Download gmail-summary-to-slack.json
- Open a new, empty workflow in n8n.
- Open the workflow menu (⋯) and choose Import from File — or copy the JSON below and paste it onto the canvas (Ctrl/Cmd+V).
- Connect the accounts, fill the fields above, run one test, then turn the workflow on.
Or copy the JSON
{
"name": "Each new Gmail message is summarized by OpenAI and the summary is posted to Slack",
"nodes": [
{
"id": "n1",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"typeVersion": 1.4,
"parameters": {
"event": "messageReceived"
},
"position": [
240,
300
],
"notes": "step: when a new email arrives in gmail"
},
{
"id": "n2",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 2.3,
"parameters": {
"resource": "text",
"operation": "response",
"responses": {
"values": [
{
"type": "text",
"role": "user",
"content": "=Summarize it:\n\n{{ JSON.stringify($json) }}"
}
]
},
"modelId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"position": [
460,
300
],
"notes": "step: summarize it with openai"
},
{
"id": "n3",
"name": "Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.7,
"parameters": {
"resource": "message",
"operation": "post",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": ""
},
"text": ""
},
"position": [
680,
300
],
"notes": "step: send the summary to slack"
}
],
"connections": {
"Gmail Trigger": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
},
"OpenAI": {
"main": [
[
{
"node": "Slack",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"active": false
}