メール購読サービス - n8nフォーム、Airtable、そしてAI
上級
これはAI, Marketing分野の自動化ワークフローで、32個のノードを含みます。主にSet, Code, Gmail, Filter, Airtableなどのノードを使用、AI技術を活用したスマート自動化を実現。 メール購読サービス - n8nフォーム、Airtable、AIの統合
前提条件
- •Googleアカウント + Gmail API認証情報
- •Airtable API Key
- •OpenAI API Key
使用ノード (32)
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
"nodes": [
{
"id": "4dd52c72-9a9b-4db4-8de5-5b12b1e5c4be",
"name": "スケジュールトリガー",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
180,
1480
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"typeVersion": 1.2
},
{
"id": "9226181c-b84c-4ea1-a5b4-eedb6c62037b",
"name": "日次検索",
"type": "n8n-nodes-base.airtable",
"position": [
440,
1480
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appL3dptT6ZTSzY9v",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v",
"cachedResultName": "Scheduled Emails"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblzR9vSuFUzlQNMI",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v/tblzR9vSuFUzlQNMI",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search",
"filterByFormula": "AND({Status} = 'active', {Interval} = 'daily')"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "1a3b6224-2f66-41c6-8b3d-be286cf16370",
"name": "週次検索",
"type": "n8n-nodes-base.airtable",
"position": [
440,
1660
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appL3dptT6ZTSzY9v",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v",
"cachedResultName": "Scheduled Emails"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblzR9vSuFUzlQNMI",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v/tblzR9vSuFUzlQNMI",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search",
"filterByFormula": "=AND(\n {Status} = 'active', \n {Interval} = 'weekly', \n {Last Sent} <= DATEADD(TODAY(), -7, 'days')\n)"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "1ea47e14-0a28-4780-95c7-31e24eb724d5",
"name": "確認メール1",
"type": "n8n-nodes-base.gmail",
"position": [
620,
820
],
"webhookId": "dd8bd6df-2013-4f8d-a2cc-cd9b3913e3d2",
"parameters": {
"sendTo": "={{ $('Subscribe Form').item.json.email }}",
"message": "=This is to confirm your request to subscribe to \"Learn something every day!\" - a free service to send you facts about your favourite topics.\n\nTopic: {{ $('Subscribe Form').item.json.topic }}\nSchedule: {{ $('Subscribe Form').item.json.frequency }}",
"options": {
"appendAttribution": false
},
"subject": "Learn something every day confirmation"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "d95262af-1b52-4f9c-8346-183b4eee8544",
"name": "ワークフロー実行",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
1140,
1480
],
"parameters": {
"mode": "each",
"options": {
"waitForSubWorkflow": false
},
"workflowId": {
"__rl": true,
"mode": "id",
"value": "={{ $workflow.id }}"
}
},
"typeVersion": 1.1
},
{
"id": "075292af-7a66-4275-ac2d-3c392189a10c",
"name": "イベント作成",
"type": "n8n-nodes-base.set",
"position": [
980,
1480
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b28a0142-a028-471a-8180-9883e930feea",
"name": "email",
"type": "string",
"value": "={{ $json.Email }}"
},
{
"id": "970f5495-05df-42b6-a422-b2ac27f8eb95",
"name": "topic",
"type": "string",
"value": "={{ $json.Topic }}"
},
{
"id": "e871c431-948f-4b80-aa17-1e4266674663",
"name": "interval",
"type": "string",
"value": "={{ $json.Interval }}"
},
{
"id": "9b72597d-1446-4ef3-86e5-0a071c69155b",
"name": "id",
"type": "string",
"value": "={{ $json.id }}"
},
{
"id": "b17039c2-14a2-4811-9528-88ae963e44f7",
"name": "created_at",
"type": "string",
"value": "={{ $json.Created }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "28776aaf-6bd9-4f9f-bcf0-3d4401a74219",
"name": "ワークフロートリガー実行",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
1360,
1480
],
"parameters": {},
"typeVersion": 1
},
{
"id": "0eb62e75-228b-452b-80ab-f9ef3ad33204",
"name": "購読解除フォーム",
"type": "n8n-nodes-base.formTrigger",
"position": [
180,
1160
],
"webhookId": "e64db96d-5e61-40d5-88fb-761621a829ab",
"parameters": {
"options": {
"path": "free-factoids-unsubscribe"
},
"formTitle": "Unsubscribe from Learn Something Every Day",
"formFields": {
"values": [
{
"fieldLabel": "ID",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Reason For Unsubscribe",
"multiselect": true,
"fieldOptions": {
"values": [
{
"option": "Emails not relevant"
},
{
"option": "Too many Emails"
},
{
"option": "I did not sign up to this service"
}
]
}
}
]
},
"formDescription": "We're sorry to see you go! Please take a moment to help us improve the service."
},
"typeVersion": 2.2
},
{
"id": "f889efe9-dc3c-428b-ad8e-4f7d17f23e75",
"name": "メール変数設定",
"type": "n8n-nodes-base.set",
"position": [
2500,
1480
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "62a684fb-16f9-4326-8eeb-777d604b305a",
"name": "to",
"type": "string",
"value": "={{ $('Execute Workflow Trigger').first().json.email }},jim@height.io"
},
{
"id": "4270849e-c805-4580-9088-e8d1c3ef2fb4",
"name": "subject",
"type": "string",
"value": "=Your {{ $('Execute Workflow Trigger').first().json.interval }} factoid"
},
{
"id": "81d0e897-2496-4a3c-b16c-9319338f899f",
"name": "message",
"type": "string",
"value": "=<p>\n<strong>You asked about \"{{ $('Execution Data').first().json.topic.replace('\"','') }}\"</strong>\n</p>\n<p>\n<i>{{ $('Content Generation Agent').first().json.output }}</i>\n</p>"
},
{
"id": "ee05de7b-5342-4deb-8118-edaf235d92cc",
"name": "unsubscribe_link",
"type": "string",
"value": "=https://<MY_HOST>/form/inspiration-unsubscribe?ID={{ $('Execute Workflow Trigger').first().json.id }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "84741e6d-f5be-440d-8633-4eb30ccce170",
"name": "最終送信ログ",
"type": "n8n-nodes-base.airtable",
"position": [
2860,
1480
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appL3dptT6ZTSzY9v",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v",
"cachedResultName": "Scheduled Emails"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblzR9vSuFUzlQNMI",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v/tblzR9vSuFUzlQNMI",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"id": "={{ $('Execute Workflow Trigger').first().json.id }}",
"Last Sent": "2024-11-29T13:34:11"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "options",
"display": true,
"options": [
{
"name": "inactive",
"value": "inactive"
},
{
"name": "active",
"value": "active"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Interval",
"type": "options",
"display": true,
"options": [
{
"name": "daily",
"value": "daily"
},
{
"name": "weekly",
"value": "weekly"
},
{
"name": "surprise",
"value": "surprise"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Interval",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Start Day",
"type": "options",
"display": true,
"options": [
{
"name": "Mon",
"value": "Mon"
},
{
"name": "Tue",
"value": "Tue"
},
{
"name": "Wed",
"value": "Wed"
},
{
"name": "Thu",
"value": "Thu"
},
{
"name": "Fri",
"value": "Fri"
},
{
"name": "Sat",
"value": "Sat"
},
{
"name": "Sun",
"value": "Sun"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Start Day",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Topic",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Created",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Modified",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Last Modified",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Sent",
"type": "dateTime",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Last Sent",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
]
},
"options": {},
"operation": "update"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "88f864d6-13fb-4f09-b22d-030d016678e1",
"name": "サプライズ検索",
"type": "n8n-nodes-base.airtable",
"position": [
440,
1840
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appL3dptT6ZTSzY9v",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v",
"cachedResultName": "Scheduled Emails"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblzR9vSuFUzlQNMI",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v/tblzR9vSuFUzlQNMI",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search",
"filterByFormula": "=AND(\n {Status} = 'active', \n {Interval} = 'surprise'\n)"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "28238d9a-7bc0-4a22-bb4e-a7a2827e4da3",
"name": "送信可否 = True",
"type": "n8n-nodes-base.filter",
"position": [
800,
1840
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "9aaf9ae2-8f96-443a-8294-c04270296b22",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.should_send }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "3a46dd3d-48a6-40ca-8823-0516aa9f73a4",
"name": "送信可否?",
"type": "n8n-nodes-base.code",
"position": [
620,
1840
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const luckyPick = Math.floor(Math.random() * 10) + 1;\n$input.item.json.should_send = luckyPick == 8;\nreturn $input.item;"
},
"typeVersion": 2
},
{
"id": "3611da19-920b-48e6-84a4-f7be0b3a78fc",
"name": "購読者作成",
"type": "n8n-nodes-base.airtable",
"position": [
440,
820
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appL3dptT6ZTSzY9v",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v",
"cachedResultName": "Scheduled Emails"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblzR9vSuFUzlQNMI",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v/tblzR9vSuFUzlQNMI",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"Email": "={{ $json.email }}",
"Topic": "={{ $json.topic }}",
"Status": "active",
"Interval": "={{ $json.frequency }}",
"Start Day": "={{ $json.submittedAt.toDateTime().format('EEE') }}"
},
"schema": [
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "options",
"display": true,
"options": [
{
"name": "inactive",
"value": "inactive"
},
{
"name": "active",
"value": "active"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Interval",
"type": "options",
"display": true,
"options": [
{
"name": "daily",
"value": "daily"
},
{
"name": "weekly",
"value": "weekly"
},
{
"name": "surprise",
"value": "surprise"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Interval",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Start Day",
"type": "options",
"display": true,
"options": [
{
"name": "Mon",
"value": "Mon"
},
{
"name": "Tue",
"value": "Tue"
},
{
"name": "Wed",
"value": "Wed"
},
{
"name": "Thu",
"value": "Thu"
},
{
"name": "Fri",
"value": "Fri"
},
{
"name": "Sat",
"value": "Sat"
},
{
"name": "Sun",
"value": "Sun"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Start Day",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Topic",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Created",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Modified",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Last Modified",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Sent",
"type": "dateTime",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Last Sent",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"Email"
]
},
"options": {},
"operation": "upsert"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "2213a81f-53a9-4142-9586-e87b88710eec",
"name": "購読者更新",
"type": "n8n-nodes-base.airtable",
"position": [
440,
1160
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appL3dptT6ZTSzY9v",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v",
"cachedResultName": "Scheduled Emails"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblzR9vSuFUzlQNMI",
"cachedResultUrl": "https://airtable.com/appL3dptT6ZTSzY9v/tblzR9vSuFUzlQNMI",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"id": "={{ $json.ID }}",
"Status": "inactive"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Status",
"type": "options",
"display": true,
"options": [
{
"name": "inactive",
"value": "inactive"
},
{
"name": "active",
"value": "active"
}
],
"removed": false,
"readOnly": false,
"required": false,
"displayName": "Status",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Interval",
"type": "options",
"display": true,
"options": [
{
"name": "daily",
"value": "daily"
},
{
"name": "weekly",
"value": "weekly"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Interval",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Start Day",
"type": "options",
"display": true,
"options": [
{
"name": "Mon",
"value": "Mon"
},
{
"name": "Tue",
"value": "Tue"
},
{
"name": "Wed",
"value": "Wed"
},
{
"name": "Thu",
"value": "Thu"
},
{
"name": "Fri",
"value": "Fri"
},
{
"name": "Sat",
"value": "Sat"
},
{
"name": "Sun",
"value": "Sun"
}
],
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Start Day",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Topic",
"type": "string",
"display": true,
"removed": true,
"readOnly": false,
"required": false,
"displayName": "Topic",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Created",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Created",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Last Modified",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "Last Modified",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"id"
]
},
"options": {},
"operation": "update"
},
"credentials": {
"airtableTokenApi": {
"id": "Und0frCQ6SNVX3VV",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "c94ec18b-e0cf-4859-8b89-23abdd63739c",
"name": "付箋",
"type": "n8n-nodes-base.stickyNote",
"position": [
900,
1280
],
"parameters": {
"color": 7,
"width": 335,
"height": 173,
"content": "### 4. Using Subworkflows to run executions concurrently\nThis configuration is desired when sequential execution is slow and unnecessary. Also if one email fails, it doesn't fail the execution for everyone else."
},
"typeVersion": 1
},
{
"id": "c14cab28-13eb-4d91-8578-8187a95a8909",
"name": "付箋1",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
700
],
"parameters": {
"color": 7,
"width": 380,
"height": 80,
"content": "### 1. Subscribe flow\nUse a form to allow users to subscribe to the service."
},
"typeVersion": 1
},
{
"id": "0e44ada0-f8a7-440e-aded-33b446190a08",
"name": "付箋2",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
1020
],
"parameters": {
"color": 7,
"width": 355,
"height": 115,
"content": "### 2. Unsubscribe flow\n* Uses Form's pre-fill field feature to identify user\n* Doesn't use \"email\" as identifier so you can't unsubscribe others"
},
"typeVersion": 1
},
{
"id": "e67bdffe-ccfc-4818-990d-b2a5ab613035",
"name": "付箋3",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
1340
],
"parameters": {
"color": 7,
"width": 347,
"height": 114,
"content": "### 3. Scheduled Trigger\n* Runs every day at 9am\n* Handles all 3 frequency types\n* Send emails concurrently"
},
"typeVersion": 1
},
{
"id": "ce7d5310-7170-46d3-b8d8-3f97407f9dfd",
"name": "購読フォーム",
"type": "n8n-nodes-base.formTrigger",
"position": [
180,
820
],
"webhookId": "c6abe3e3-ba87-4124-a227-84e253581b58",
"parameters": {
"options": {
"path": "free-factoids-subscribe",
"appendAttribution": false,
"respondWithOptions": {
"values": {
"formSubmittedText": "Thanks! Your factoid is on its way!"
}
}
},
"formTitle": "Learn something every day!",
"formFields": {
"values": [
{
"fieldType": "textarea",
"fieldLabel": "topic",
"placeholder": "What topic(s) would you like to learn about?",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "email",
"placeholder": "eg. jim@example.com",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "frequency",
"fieldOptions": {
"values": [
{
"option": "daily"
},
{
"option": "weekly"
},
{
"option": "surprise me"
}
]
},
"requiredField": true
}
]
},
"formDescription": "Get a fact a day (or week) about any subject sent to your inbox."
},
"typeVersion": 2.2
},
{
"id": "a5d50886-7d6b-4bf8-b376-b23c12a60608",
"name": "実行データ",
"type": "n8n-nodes-base.executionData",
"position": [
1560,
1480
],
"parameters": {
"dataToSave": {
"values": [
{
"key": "email",
"value": "={{ $json.email }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "69b40d8d-7734-47f1-89fe-9ea0378424b7",
"name": "ウィンドウバッファメモリ",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1860,
1680
],
"parameters": {
"sessionKey": "=scheduled_send_{{ $json.email }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "f83cff18-f41f-4a63-9d43-7e3947aae386",
"name": "Wikipedia",
"type": "@n8n/n8n-nodes-langchain.toolWikipedia",
"position": [
2020,
1680
],
"parameters": {},
"typeVersion": 1
},
{
"id": "77457037-e3ab-42f1-948b-b994d42f2f6e",
"name": "コンテンツ生成エージェント",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1780,
1460
],
"parameters": {
"text": "=Generate an new factoid on the following topic: \"{{ $json.topic.replace('\"','') }}\"\nEnsure it is unique and not one generated previously.",
"options": {},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "cdfdd870-48b6-4c7d-a7d1-a22d70423e37",
"name": "Groqチャットモデル",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
1720,
1680
],
"parameters": {
"model": "llama-3.3-70b-versatile",
"options": {}
},
"credentials": {
"groqApi": {
"id": "02xZ4o87lUMUFmbT",
"name": "Groq account"
}
},
"typeVersion": 1
},
{
"id": "87df322d-a544-476f-b2ff-83feb619fe7f",
"name": "画像生成",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2120,
1460
],
"parameters": {
"prompt": "=Generate a child-friendly illustration which compliments the following paragraph:\n{{ $json.output }}",
"options": {},
"resource": "image"
},
"credentials": {
"openAiApi": {
"id": "8gccIjcuf3gvaoEr",
"name": "OpenAi account"
}
},
"typeVersion": 1.7
},
{
"id": "5c8d9e72-4015-44da-b5d5-829864d33672",
"name": "画像リサイズ",
"type": "n8n-nodes-base.editImage",
"position": [
2280,
1460
],
"parameters": {
"width": 480,
"height": 360,
"options": {},
"operation": "resize"
},
"typeVersion": 1
},
{
"id": "a9939fad-98b3-4894-aae0-c11fa40d09da",
"name": "メッセージ送信",
"type": "n8n-nodes-base.gmail",
"position": [
2680,
1480
],
"webhookId": "dd8bd6df-2013-4f8d-a2cc-cd9b3913e3d2",
"parameters": {
"sendTo": "={{ $json.to }}",
"message": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>{{ $json.subject }}</title>\n</head>\n<body>\n {{ $json.message }}\n<p>\n<a href=\"{{ $json.unsubscribe_link }}\">Unsubscribe</a>\n</p>\n</body>\n</html>\n",
"options": {
"attachmentsUi": {
"attachmentsBinary": [
{}
]
},
"appendAttribution": false
},
"subject": "={{ $json.subject }}"
},
"credentials": {
"gmailOAuth2": {
"id": "Sf5Gfl9NiFTNXFWb",
"name": "Gmail account"
}
},
"typeVersion": 2.1
},
{
"id": "10b6ad35-fc1c-47a2-b234-5de3557d1164",
"name": "付箋4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
1660
],
"parameters": {
"color": 7,
"width": 335,
"height": 113,
"content": "### 5. Use Execution Data to Filter Logs\nIf you've registered for community+ or are on n8n cloud, best practice is to use execution node to allow filtering of execution logs."
},
"typeVersion": 1
},
{
"id": "e3563fae-ff35-457b-9fb1-784eda637518",
"name": "付箋5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1780,
1280
],
"parameters": {
"color": 7,
"width": 340,
"height": 140,
"content": "### 6. Use AI to Generate Factoid and Image\nUse an AI agent to automate the generation of factoids as requested by the user. This is a simple example but we recommend a adding a unique touch to stand out from the crowd!"
},
"typeVersion": 1
},
{
"id": "d1016c5d-c855-44c5-8ad3-a534bedaa8cf",
"name": "付箋6",
"type": "n8n-nodes-base.stickyNote",
"position": [
2500,
1040
],
"parameters": {
"color": 7,
"width": 460,
"height": 400,
"content": "### 7. Send Email to User\nFinally, send a message to the user with both text and image.\nLog the event in the Airtable for later analysis if required.\n\n"
},
"typeVersion": 1
},
{
"id": "773075fa-e5a2-4d4f-8527-eb07c7038b00",
"name": "付箋7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
680
],
"parameters": {
"width": 480,
"height": 900,
"content": "## Try It Out!\n\n### This n8n templates demonstrates how to build a simple subscriber service entirely in n8n using n8n forms as a frontend, n8n generally as the backend and Airtable as the storage layer.\n\nThis template in particular shows a fully automated service to send automated messages containing facts about a topic the user requested for.\n\n### How it works\n* An n8n form is setup up to allow users to subscribe with a desired topic and interval of which to recieve messages via n8n forms which is then added to the Airtable.\n* A scheduled trigger is executed every morning and searches for subscribers to send messages for based on their desired intervals.\n* Once found, Subscribers are sent to a subworkflow which performs the text content generation via an AI agent and also uses a vision model to generate an image.\n* Both are attached to an email which is sent to the subscriber. This email also includes an unsubscribe link.\n* The unsubscribe flow works similarly via n8n form interface which when submitted disables further scheduled emails to the user.\n\n## How to use\n* Make a copy of sample Airtable here: https://airtable.com/appL3dptT6ZTSzY9v/shrLukHafy5bwDRfD\n* Make sure the workflow is \"activated\" and the forms are available and reachable by your audience.\n\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"f83cff18-f41f-4a63-9d43-7e3947aae386": {
"ai_tool": [
[
{
"node": "77457037-e3ab-42f1-948b-b994d42f2f6e",
"type": "ai_tool",
"index": 0
}
]
]
},
"075292af-7a66-4275-ac2d-3c392189a10c": {
"main": [
[
{
"node": "d95262af-1b52-4f9c-8346-183b4eee8544",
"type": "main",
"index": 0
}
]
]
},
"5c8d9e72-4015-44da-b5d5-829864d33672": {
"main": [
[
{
"node": "f889efe9-dc3c-428b-ad8e-4f7d17f23e75",
"type": "main",
"index": 0
}
]
]
},
"9226181c-b84c-4ea1-a5b4-eedb6c62037b": {
"main": [
[
{
"node": "075292af-7a66-4275-ac2d-3c392189a10c",
"type": "main",
"index": 0
}
]
]
},
"a9939fad-98b3-4894-aae0-c11fa40d09da": {
"main": [
[
{
"node": "84741e6d-f5be-440d-8633-4eb30ccce170",
"type": "main",
"index": 0
}
]
]
},
"3a46dd3d-48a6-40ca-8823-0516aa9f73a4": {
"main": [
[
{
"node": "28238d9a-7bc0-4a22-bb4e-a7a2827e4da3",
"type": "main",
"index": 0
}
]
]
},
"1a3b6224-2f66-41c6-8b3d-be286cf16370": {
"main": [
[
{
"node": "075292af-7a66-4275-ac2d-3c392189a10c",
"type": "main",
"index": 0
}
]
]
},
"a5d50886-7d6b-4bf8-b376-b23c12a60608": {
"main": [
[
{
"node": "77457037-e3ab-42f1-948b-b994d42f2f6e",
"type": "main",
"index": 0
}
]
]
},
"87df322d-a544-476f-b2ff-83feb619fe7f": {
"main": [
[
{
"node": "5c8d9e72-4015-44da-b5d5-829864d33672",
"type": "main",
"index": 0
}
]
]
},
"f889efe9-dc3c-428b-ad8e-4f7d17f23e75": {
"main": [
[
{
"node": "a9939fad-98b3-4894-aae0-c11fa40d09da",
"type": "main",
"index": 0
}
]
]
},
"ce7d5310-7170-46d3-b8d8-3f97407f9dfd": {
"main": [
[
{
"node": "3611da19-920b-48e6-84a4-f7be0b3a78fc",
"type": "main",
"index": 0
}
]
]
},
"cdfdd870-48b6-4c7d-a7d1-a22d70423e37": {
"ai_languageModel": [
[
{
"node": "77457037-e3ab-42f1-948b-b994d42f2f6e",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"88f864d6-13fb-4f09-b22d-030d016678e1": {
"main": [
[
{
"node": "3a46dd3d-48a6-40ca-8823-0516aa9f73a4",
"type": "main",
"index": 0
}
]
]
},
"4dd52c72-9a9b-4db4-8de5-5b12b1e5c4be": {
"main": [
[
{
"node": "88f864d6-13fb-4f09-b22d-030d016678e1",
"type": "main",
"index": 0
},
{
"node": "9226181c-b84c-4ea1-a5b4-eedb6c62037b",
"type": "main",
"index": 0
},
{
"node": "1a3b6224-2f66-41c6-8b3d-be286cf16370",
"type": "main",
"index": 0
}
]
]
},
"0eb62e75-228b-452b-80ab-f9ef3ad33204": {
"main": [
[
{
"node": "2213a81f-53a9-4142-9586-e87b88710eec",
"type": "main",
"index": 0
}
]
]
},
"3611da19-920b-48e6-84a4-f7be0b3a78fc": {
"main": [
[
{
"node": "1ea47e14-0a28-4780-95c7-31e24eb724d5",
"type": "main",
"index": 0
}
]
]
},
"28238d9a-7bc0-4a22-bb4e-a7a2827e4da3": {
"main": [
[
{
"node": "075292af-7a66-4275-ac2d-3c392189a10c",
"type": "main",
"index": 0
}
]
]
},
"69b40d8d-7734-47f1-89fe-9ea0378424b7": {
"ai_memory": [
[
{
"node": "77457037-e3ab-42f1-948b-b994d42f2f6e",
"type": "ai_memory",
"index": 0
}
]
]
},
"77457037-e3ab-42f1-948b-b994d42f2f6e": {
"main": [
[
{
"node": "87df322d-a544-476f-b2ff-83feb619fe7f",
"type": "main",
"index": 0
}
]
]
},
"28776aaf-6bd9-4f9f-bcf0-3d4401a74219": {
"main": [
[
{
"node": "a5d50886-7d6b-4bf8-b376-b23c12a60608",
"type": "main",
"index": 0
}
]
]
}
}
}よくある質問
このワークフローの使い方は?
上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。
このワークフローはどんな場面に適していますか?
上級 - 人工知能, マーケティング
有料ですか?
このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。
関連ワークフロー
n8nノードの探索(可視化リファレンスライブラリ内)
n8nノードを可視化リファレンスライブラリで探索
If
Ftp
Set
+
If
Ftp
Set
113 ノードI versus AI
その他
ブログ投稿自動化とSNSプロモーションエージェント
GPT-4、Perplexity、WordPressを使用したSEOブログ作成の自動化+ソーシャルメディア
Set
Code
Gmail
+
Set
Code
Gmail
79 ノードLukaszB
デザイン
n8n、Apify、OpenAI o3 を使用したセルフホスト型 AI ディープリサーチエージェント
n8n、Apify、OpenAI o3を使用したセルフホスト型AI深度リサーチエージェント
If
Set
Code
+
If
Set
Code
87 ノードJimleuk
人工知能
Discord のスパムを自動審査
AI とヒューマンチェックを組み合わせた自動 Discord スパム審査
If
Set
Code
+
If
Set
Code
30 ノードJimleuk
人工知能
カスタムn8nワーキ Flow MCPサーバー
カスタムn8nワークフローMCPサーバーを構築する
If
N8n
Set
+
If
N8n
Set
46 ノードJimleuk
その他
WordPress コンテンツジェネレータ v3
WordPress コンテンツジェネレーター v3
If
Set
Code
+
If
Set
Code
102 ノードAlex Kim
人工知能
ワークフロー情報
難易度
上級
ノード数32
カテゴリー2
ノードタイプ17
作成者
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で表示 →
このワークフローを共有