This workflow follows the Gmail Trigger → OpenAI 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 →
{
"name": "Gmail\u53d7\u4fe1\u30e1\u30fc\u30eb\u51e6\u7406\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\uff08Step3\uff09",
"nodes": [
{
"parameters": {
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"simple": false,
"filters": {
"labelIds": [
"Label_3"
]
},
"options": {}
},
"id": "fa3af6c1-fe8d-4ce5-8fbb-455f177829b6",
"name": "Gmail Trigger",
"type": "n8n-nodes-base.gmailTrigger",
"typeVersion": 1.2,
"position": [
1088,
352
],
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"id": "ee153ce1-2819-444c-af6e-4466612361c7",
"name": "\u30e1\u30fc\u30eb\u60c5\u5831\u62bd\u51fa",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1312,
352
]
},
{
"parameters": {
"resource": "document",
"operation": "create",
"driveId": "myDrive",
"folderId": "1cCiiz5tMpoGxzVRAWFgJNKPJ3tvzPyDN",
"title": "{{ $('Gmail Trigger').item.json.payload.headers.find(h => h.name === 'From').value.split('<')[0].trim() }} - \u30e1\u30fc\u30eb\u8a18\u9332"
},
"id": "d6528bd9-8a3c-4c04-b719-42c7ecbe29f8",
"name": "Google Docs\u4f5c\u6210",
"type": "n8n-nodes-base.googleDocs",
"typeVersion": 2,
"position": [
1968,
352
],
"credentials": {
"googleDocsOAuth2Api": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"options": {}
},
"id": "b6383654-998a-486e-a952-b3a02d85d384",
"name": "\u8981\u7d04\u7d50\u679c\u7d71\u54081",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1760,
352
]
},
{
"parameters": {
"model": "chatgpt-4o-latest",
"prompt": "\u4ee5\u4e0b\u306e\u30e1\u30fc\u30eb\u5185\u5bb9\u3092\u8981\u7d04\u3057\u3066\u3001\u4ee5\u4e0b\u306e\u5f62\u5f0f\u3067\u65e5\u672c\u8a9e\u3067\u8fd4\u3057\u3066\u304f\u3060\u3055\u3044\uff1a\n\n\u3010\u8981\u7d04\u3011\n\u30fb[\u7b87\u6761\u66f8\u304d\u3067\u8981\u7d04]\n\n\u3010\u9001\u4fe1\u8005\u3011{{ $json.payload.headers.find(h => h.name === 'From').value.split('<')[0].trim() }}\n\u3010\u4ef6\u540d\u3011{{ $json.payload.headers.find(h => h.name === 'Subject').value }}\n\u3010\u65e5\u6642\u3011{{ new Date($json.internalDate * 1).toISOString() }}\n\u3010\u30b9\u30c6\u30fc\u30bf\u30b9\u3011\u672a\u5bfe\u5fdc\n\u3010\u6b21\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3011\n\u30fb[\u5fc5\u8981\u306a\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u3042\u308c\u3070\u8a18\u8f09\u3001\u306a\u3051\u308c\u3070\u300c\u306a\u3057\u300d]\n\u3010\u7de0\u5207/\u65e5\u4ed8\u3011\n\u30fb[\u671f\u9650\u3084\u91cd\u8981\u306a\u65e5\u4ed8\u304c\u3042\u308c\u3070\u8a18\u8f09\u3001\u306a\u3051\u308c\u3070\u300c\u306a\u3057\u300d]\n\n\u3010\u30e1\u30fc\u30eb\u672c\u6587\u3011\n{{ $json.snippet }}",
"options": {},
"requestOptions": {}
},
"id": "653aaac9-b1c5-4239-a343-d07f2a40fac3",
"name": "OpenAI\u8981\u7d04\u51e6\u7406",
"type": "n8n-nodes-base.openAi",
"typeVersion": 1.1,
"position": [
1536,
352
],
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
}
}
],
"connections": {
"Gmail Trigger": {
"main": [
[
{
"node": "\u30e1\u30fc\u30eb\u60c5\u5831\u62bd\u51fa",
"type": "main",
"index": 0
}
]
]
},
"\u30e1\u30fc\u30eb\u60c5\u5831\u62bd\u51fa": {
"main": [
[
{
"node": "OpenAI\u8981\u7d04\u51e6\u7406",
"type": "main",
"index": 0
}
]
]
},
"\u8981\u7d04\u7d50\u679c\u7d71\u54081": {
"main": [
[
{
"node": "Google Docs\u4f5c\u6210",
"type": "main",
"index": 0
}
]
]
},
"OpenAI\u8981\u7d04\u51e6\u7406": {
"main": [
[
{
"node": "\u8981\u7d04\u7d50\u679c\u7d71\u54081",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "a57a65dc-d2f5-4bc4-a44b-79062be880dc",
"meta": {
"templateCredsSetupCompleted": true
},
"id": "1y35KXgIoSjYFZyY",
"tags": [
{
"createdAt": "2025-09-29T09:08:04.735Z",
"updatedAt": "2025-09-29T09:08:04.735Z",
"id": "CoueiOmq51e8qA0q",
"name": "Gmail\u81ea\u52d5\u5316"
}
]
}
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.
gmailOAuth2googleDocsOAuth2ApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Gmail受信メール処理ワークフロー(Step3). Uses gmailTrigger, googleDocs, openAi. Event-driven trigger; 5 nodes.
Source: https://github.com/omksds/sandbox/blob/0fd8c76d36d3411b3d119fba17bd68dde0abe9a4/20250929_mail-to-dashboard/gmail_workflow_step3.json — 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.
Gmail受信メール処理ワークフロー(Step4). Uses googleDocs, gmailTrigger, openAi, googleSheets. Event-driven trigger; 11 nodes.
Gmail受信メール処理ワークフロー. Uses gmailTrigger, openAi, googleDocs, googleSheets. Event-driven trigger; 10 nodes.
🎂 Генератор відповідей — Торти. Uses gmailTrigger, openAi, googleDocs, gmail. Event-driven trigger; 8 nodes.
This workflow converts emailed timesheets into structured invoice rows in Google Sheets and stores them in the correct Google Drive folder structure.
Complete AI-powered sales system Automates lead capture, qualification, and follow-up from multiple channels. AI INTELLIGENCE: