AI と人間による共同フォローアラート(Gmail)
上級
これはAI分野の自動化ワークフローで、22個のノードを含みます。主にSet, Gmail, Filter, GoogleCalendar, SplitInBatchesなどのノードを使用、AI技術を活用したスマート自動化を実現。 Gmail を使った AI と人間の協働による自動フォローアラート
前提条件
- •Googleアカウント + Gmail API認証情報
- •OpenAI API Key
使用ノード (22)
カテゴリー
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"meta": {
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "cbc2ee05-3bb9-4064-ac26-fed7241e673f",
"name": "スケジュールトリガー",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-460,
0
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 6
}
]
}
},
"typeVersion": 1.2
},
{
"id": "4a18dea4-9eda-4b8e-9d0c-fff9793802c5",
"name": "過去イベントの取得",
"type": "n8n-nodes-base.googleCalendar",
"position": [
-280,
0
],
"parameters": {
"options": {},
"timeMax": "={{ $now.minus({ day: 2 }) }}",
"timeMin": "={{ $now.minus({ day: 4 }) }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "<your-calendar>"
},
"operation": "getAll"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "kWMxmDbMDDJoYFVK",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "df2ef6d0-5fcb-43c5-8ba9-2d094dffb4e1",
"name": "アイテムのループ処理",
"type": "n8n-nodes-base.splitInBatches",
"position": [
200,
40
],
"parameters": {
"options": {}
},
"typeVersion": 3
},
{
"id": "bedc77ad-f0c9-47ae-9609-48ceda47a224",
"name": "フォローアップフラグ",
"type": "n8n-nodes-base.set",
"position": [
580,
200
],
"parameters": {
"mode": "raw",
"options": {},
"jsonOutput": "={{\n{\n ...$('Loop Over Items').first().json,\n followUp: $json.isEmpty()\n}\n}}",
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "b332ca5d-45d5-4a79-a028-baa1728aea78",
"name": "フォローアップのみ",
"type": "n8n-nodes-base.filter",
"position": [
400,
40
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "73f38d1b-75c6-4372-8e81-a2db61b045a8",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "1b8a6510-f1c5-4969-a68d-143874b5737d",
"name": "以降のメール取得",
"type": "n8n-nodes-base.gmail",
"position": [
400,
200
],
"webhookId": "08fbccff-cce6-461a-b040-f5a74920c803",
"parameters": {
"limit": 1,
"filters": {
"q": "=(from:{{ $json.attendees.find(attendee => !attendee.self)?.email }} OR to:{{ $json.attendees.find(attendee => !attendee.self)?.email }})",
"receivedAfter": "={{ $json.end.dateTime }}"
},
"resource": "thread"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1,
"alwaysOutputData": true
},
{
"id": "4ce7ac3f-bad8-4822-b166-fd164d733734",
"name": "出力",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1140,
220
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"slots\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"start\": { \"type\": \"string\" },\n \"end\": { \"type\": \"string\" }\n }\n }\n }\n }\n}"
},
"typeVersion": 1.2
},
{
"id": "a22c5b78-d213-4e37-b2c6-f3d1dac96858",
"name": "空き状況",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
1020,
220
],
"parameters": {
"options": {
"timezone": {
"__rl": true,
"mode": "id",
"value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Timezone', ``, 'string') }}",
"__regex": "([-+/_a-zA-Z0-9]*)"
}
},
"timeMax": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End_Time', ``, 'string') }}",
"timeMin": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start_Time', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "<your-calendar>"
},
"resource": "calendar"
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "kWMxmDbMDDJoYFVK",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "690c79d3-cf0e-4d15-9419-dafb7d86025b",
"name": "モデル",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
900,
220
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "4e9d23c0-f9a0-4e71-b1b8-1011313942ba",
"name": "ミーティング空き状況エージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
920,
40
],
"parameters": {
"text": "=### Details of the previous call as following\ntitle: {{ $json.summary }}\ndate: {{ $json.start.dateTime }} {{ $json.start.timeZone }}\nduration: {{ DateTime.fromISO($json.end.dateTime).diffTo(DateTime.fromISO($json.start.dateTime), 'minutes') }} minutes",
"options": {
"systemMessage": "=You are a calendar availability assistant. Analyse the previous meeting and help me find a similar available slot for the next meeting.\n* take into consideration the day, time of day and duration of the previous meeting and try to set the same or similar for the next\n* next meeting should be in the future.\n* return a list of available slots so that I can forward them to the user.\n\nToday's date is {{ $now }}."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "851728bf-7f94-4434-9dc6-23569544cdb7",
"name": "メッセージ生成",
"type": "n8n-nodes-base.set",
"position": [
1260,
40
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "cf09c95c-f25e-4fd7-bade-a0feaeaffb3b",
"name": "message",
"type": "string",
"value": "=Hey, just noticed there wasn't a follow-up email to {{ $('Only Follow Ups').item.json.attendees.find(x => !x.self).email }} after your last call a few days ago.\n\nHere's are a few available slots to book the next call.\n{{\n$json.output.slots\n .filter(slot => !DateTime.fromISO(slot.start).isWeekend())\n .map(slot => `* ${DateTime.fromISO(slot.start).format('cccc, DDD @ hh:mm')} - ${DateTime.fromISO(slot.end).format('hh:mm')}`)\n.join('\\n')\n}}\n\nLet me know which I should book or let me know if it's okay to dismiss."
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7e45eddc-8c34-402a-86a2-ed89ff463095",
"name": "ミーティング",
"type": "n8n-nodes-base.googleCalendarTool",
"position": [
2360,
240
],
"parameters": {
"end": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}",
"start": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "<your-calendar>"
},
"additionalFields": {
"summary": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Summary', ``, 'string') }}",
"description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}"
}
},
"credentials": {
"googleCalendarOAuth2Api": {
"id": "kWMxmDbMDDJoYFVK",
"name": "Google Calendar account"
}
},
"typeVersion": 1.3
},
{
"id": "74618cf0-1fe5-4abb-ba38-6818162ce826",
"name": "モデル1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2180,
240
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "790cc7ee-fe1b-434f-8736-38952bffbb85",
"name": "ミーティング予約エージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2180,
60
],
"parameters": {
"text": "={{ $json.data.text }}",
"options": {
"systemMessage": "=You are a meeting booking agent. Your task is to book the meeting requested if confirmed by the user or otherwise do nothing if the user wants to disregard. No need to ask for further approval.\n\nAI: {{ $('Generate Message').first().json.message }}"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "7ed171b2-08ee-49b0-9f9b-b4943549b2f6",
"name": "既読マーク",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
-100,
0
],
"parameters": {
"options": {},
"operation": "removeItemsSeenInPreviousExecutions",
"dedupeValue": "={{ $json.id }}"
},
"typeVersion": 2
},
{
"id": "c8198538-4e02-429d-9fef-4cc2cb0bb7d0",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
-540,
-200
],
"parameters": {
"color": 7,
"width": 620,
"height": 420,
"content": "## 1. Get Recent Meetings\n[Learn more about the GCalendar node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlecalendar)\n\nFor this template, a scheduled trigger is set to fire every morning to pull in past meetings from 2-3 days ago. A \"Remove Duplicates\" node ensures we don't double process events more than once between runs."
},
"typeVersion": 1
},
{
"id": "ef4888e2-249f-4501-a731-4dc8886dfa1a",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
100,
-160
],
"parameters": {
"color": 7,
"width": 680,
"height": 600,
"content": "## 2. Check If Any Messages Since\n[Read more about the Gmail node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail)\n\nNext, we want to check if there has been any messages/contact between the lead and the user since the meeting ended. Where there is not, it could be a good opportunity to remind the user to reengage the lead as to not lose them."
},
"typeVersion": 1
},
{
"id": "d9ccc4d5-2ccb-4f85-ada1-6a6fc5374ff2",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
800,
-160
],
"parameters": {
"color": 7,
"width": 620,
"height": 580,
"content": "## 3. Suggest Availability For Next Call\n[Read more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nOnce filtered for applicable leads, we can use an AI Agent to suggest another meeting slot for them. An AI Agent can analyse the previous meeting details and use that information to suggest a similar date and time."
},
"typeVersion": 1
},
{
"id": "851b15f6-ea6a-4d30-a45b-f9ed087a37fa",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1440,
-200
],
"parameters": {
"color": 7,
"width": 540,
"height": 520,
"content": "## 4. Get Human Approval\n[Learn more about n8n's Human-in-the-loop features](https://docs.n8n.io/advanced-ai/examples/human-fallback/)\n\nOf course, we don't want the AI to actually book the meeting unless the user confirms it is something he/she wants to do and the best way to confirm is just to ask the user directly! Thanks for n8n's Human-in-the-loop feature, we can achieve this with a number of messaging protocols.\n\nHere, we're using the Gmail node's **Send-and-wait-for-approval** mode. This will send an email to the user and give them a textbox to tell our agent what they want to do next."
},
"typeVersion": 1
},
{
"id": "725b187f-d59b-4a7d-bf11-6265a4c995ed",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
2000,
-160
],
"parameters": {
"color": 7,
"width": 640,
"height": 560,
"content": "## 5. Book the meeting If Accepted\n[Learn more about the AI Agent node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/)\n\nFinally, the response from the user combined with the suggested availability slots are given to another AI agent which can book meetings. If the user accepted and confirmed a date, this agent will book the meeting on behalf of the user. If the user declined, then the agent takes no action."
},
"typeVersion": 1
},
{
"id": "ae59a45a-01e9-42be-99da-f75ed90f881b",
"name": "付箋5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
-700
],
"parameters": {
"width": 420,
"height": 980,
"content": "## Try it out!\n### This n8n template extends the idea of sales leads follow-up reminders by having an AI agent suggest and book the next call or message to reengage the prospect.\n\nWhat makes this template practical for use is that it uses the Human-in-the-loop approach to wait for a user's approval before actually making the booking. Without, this could be annoying for both the user and the recipient!\n\n### How it works\n* A scheduled trigger checks your google calendar for sales meetings which happened a few days ago.\n* For each event, gmail search is used to figure out if a follow-up message has been sent or received from the other party since the meeting. If none, we want to remind ourselves to reengage the lead.\n* For leads applicable for follow-up, we first get an AI Agent to find available meeting slots in the calendar.\n* These slots and reminder are sent to the user via send-and-approval mode of the gmail node. The user replies in natural language either picking a slot, suggesting an entirely new slot or declines the request.\n* When accepted, another AI Agent books the meeting in the calendar with the proposed dates and lead.\n\n### How to use\n* Update all calendar nodes (+subnodes) to point to the right calendar. If this is a shared-purpose calendar, you may need to either filter or create a new calendar.\n* Update the gmail nodes to point to the right accounts.\n\n### Customising the template\n* Not using Google? Swap out for Microsoft or otherwise.\n* Try swapping out or adding in additional send-for-approval methods such as telegram or whatsapp.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!"
},
"typeVersion": 1
},
{
"id": "46ef7220-49ea-4dfc-8e4c-ce7da5119daf",
"name": "人間承認依頼",
"type": "n8n-nodes-base.gmail",
"position": [
1660,
80
],
"webhookId": "76b88312-1c54-482e-abdd-e699159577f0",
"parameters": {
"sendTo": "=<your-email-here>",
"message": "={{ $json.message }}",
"options": {},
"subject": "=Book a follow-up meeting with {{ $('Only Follow Ups').item.json.attendees.find(x => !x.self).email }}?",
"operation": "sendAndWait",
"responseType": "freeText"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
}
],
"pinData": {},
"connections": {
"690c79d3-cf0e-4d15-9419-dafb7d86025b": {
"ai_languageModel": [
[
{
"node": "4e9d23c0-f9a0-4e71-b1b8-1011313942ba",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"74618cf0-1fe5-4abb-ba38-6818162ce826": {
"ai_languageModel": [
[
{
"node": "790cc7ee-fe1b-434f-8736-38952bffbb85",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"4ce7ac3f-bad8-4822-b166-fd164d733734": {
"ai_outputParser": [
[
{
"node": "4e9d23c0-f9a0-4e71-b1b8-1011313942ba",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"7e45eddc-8c34-402a-86a2-ed89ff463095": {
"ai_tool": [
[
{
"node": "790cc7ee-fe1b-434f-8736-38952bffbb85",
"type": "ai_tool",
"index": 0
}
]
]
},
"a22c5b78-d213-4e37-b2c6-f3d1dac96858": {
"ai_tool": [
[
{
"node": "4e9d23c0-f9a0-4e71-b1b8-1011313942ba",
"type": "ai_tool",
"index": 0
}
]
]
},
"7ed171b2-08ee-49b0-9f9b-b4943549b2f6": {
"main": [
[
{
"node": "df2ef6d0-5fcb-43c5-8ba9-2d094dffb4e1",
"type": "main",
"index": 0
}
]
]
},
"4a18dea4-9eda-4b8e-9d0c-fff9793802c5": {
"main": [
[
{
"node": "7ed171b2-08ee-49b0-9f9b-b4943549b2f6",
"type": "main",
"index": 0
}
]
]
},
"df2ef6d0-5fcb-43c5-8ba9-2d094dffb4e1": {
"main": [
[
{
"node": "b332ca5d-45d5-4a79-a028-baa1728aea78",
"type": "main",
"index": 0
}
],
[
{
"node": "1b8a6510-f1c5-4969-a68d-143874b5737d",
"type": "main",
"index": 0
}
]
]
},
"b332ca5d-45d5-4a79-a028-baa1728aea78": {
"main": [
[
{
"node": "4e9d23c0-f9a0-4e71-b1b8-1011313942ba",
"type": "main",
"index": 0
}
]
]
},
"851728bf-7f94-4434-9dc6-23569544cdb7": {
"main": [
[
{
"node": "46ef7220-49ea-4dfc-8e4c-ce7da5119daf",
"type": "main",
"index": 0
}
]
]
},
"1b8a6510-f1c5-4969-a68d-143874b5737d": {
"main": [
[
{
"node": "bedc77ad-f0c9-47ae-9609-48ceda47a224",
"type": "main",
"index": 0
}
]
]
},
"cbc2ee05-3bb9-4064-ac26-fed7241e673f": {
"main": [
[
{
"node": "4a18dea4-9eda-4b8e-9d0c-fff9793802c5",
"type": "main",
"index": 0
}
]
]
},
"bedc77ad-f0c9-47ae-9609-48ceda47a224": {
"main": [
[
{
"node": "df2ef6d0-5fcb-43c5-8ba9-2d094dffb4e1",
"type": "main",
"index": 0
}
]
]
},
"46ef7220-49ea-4dfc-8e4c-ce7da5119daf": {
"main": [
[
{
"node": "790cc7ee-fe1b-434f-8736-38952bffbb85",
"type": "main",
"index": 0
}
]
]
},
"4e9d23c0-f9a0-4e71-b1b8-1011313942ba": {
"main": [
[
{
"node": "851728bf-7f94-4434-9dc6-23569544cdb7",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 人工知能
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
Googleカレンダーのイベント自動作成とAI駆動型フォローアップ提案
WhatsAppとメールを介したGoogleカレンダーのイベントとGemini AIでのフォローアップ提案
Set
Code
Wait
+
Set
Code
Wait
33 ノードRapiwa
リードナーチャリング
JIRA、Supabase、AIを使ってサポートチケットを自動割り当て
JIRA、Supabase、AIでサポートチケットを自動割り当て
If
Set
Jira
+
If
Set
Jira
36 ノードJimleuk
サポート
サポートチケットの徴火速報と解決自動化
JIRAとAIを使用したサポートチケットトリアージ&解決の自動化
Set
Jira
Aggregate
+
Set
Jira
Aggregate
27 ノードJimleuk
サポート
Discord のスパムを自動審査
AI とヒューマンチェックを組み合わせた自動 Discord スパム審査
If
Set
Code
+
If
Set
Code
30 ノードJimleuk
人工知能
Gmail、OpenAI、そしてGoogleスプレッドシートを使った敏捷開発の細化準備の自動化
Gmail、OpenAI、そしてGoogleシートを使った敏捷な振り返り準備の自動化
If
Set
Gmail
+
If
Set
Gmail
51 ノードWillemijn
プロダクト
ワークフロー情報
難易度
上級
ノード数22
カテゴリー1
ノードタイプ12
作成者
Jimleuk
@jimleukFreelance consultant based in the UK specialising in AI-powered automations. I work with select clients tackling their most challenging projects. For business enquiries, send me an email at hello@jimle.uk LinkedIn: https://www.linkedin.com/in/jimleuk/ X/Twitter: https://x.com/jimle_uk
外部リンク
n8n.ioで表示 →
このワークフローを共有