n8n automations part 8
This commit is contained in:
@@ -0,0 +1,436 @@
|
||||
{
|
||||
"id": "Nvn78tMRNnKji7Fg",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Very simple Human in the loop system email with AI e IMAP",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "271bb16f-9b62-41d9-ab76-114cd7ba915a",
|
||||
"name": "Email Trigger (IMAP)",
|
||||
"type": "n8n-nodes-base.emailReadImap",
|
||||
"position": [
|
||||
-1300,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"imap": {
|
||||
"id": "k31W9oGddl9pMDy4",
|
||||
"name": "IMAP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "42d150d8-d574-49f9-9c0e-71a2cdea3b79",
|
||||
"name": "Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
-1040,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.textHtml }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e9498a60-0078-4581-b269-7ff552f4047a",
|
||||
"name": "Send Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"position": [
|
||||
920,
|
||||
1320
|
||||
],
|
||||
"webhookId": "a79ae1b4-648c-4cb4-b6cd-04ea3c1d9314",
|
||||
"parameters": {
|
||||
"html": "={{ $('Set Email text').item.json.email }}",
|
||||
"options": {},
|
||||
"subject": "=Re: {{ $('Email Trigger (IMAP)').item.json.subject }}",
|
||||
"toEmail": "={{ $('Email Trigger (IMAP)').item.json.from }}",
|
||||
"fromEmail": "={{ $('Email Trigger (IMAP)').item.json.to }}"
|
||||
},
|
||||
"credentials": {
|
||||
"smtp": {
|
||||
"id": "hRjP3XbDiIQqvi7x",
|
||||
"name": "SMTP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "ab9f6ac3-2095-44df-aeba-2eab96ecf425",
|
||||
"name": "Email Summarization Chain",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
-780,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"binaryDataKey": "={{ $json.data }}",
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "=Write a concise summary of the following in max 100 words:\n\n\"{{ $json.data }}\"\n\nDo not enter the total number of words used.",
|
||||
"combineMapPrompt": "=Write a concise summary of the following in max 100 words:\n\n\"{{ $json.data }}\"\n\nDo not enter the total number of words used."
|
||||
}
|
||||
}
|
||||
},
|
||||
"operationMode": "nodeInputBinary"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "86b7c3d0-e1f2-4e2f-b293-8042700d6816",
|
||||
"name": "Write email",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
-340,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Write the text to reply to the following email:\n\n{{ $json.response.text }}",
|
||||
"options": {
|
||||
"systemMessage": "You are an expert at answering emails. You need to answer them professionally based on the information you have. This is a business email. Be concise and never exceed 100 words. Only the body of the email, not create the subject"
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "5d5a397f-f9c3-4691-afd0-9a6102679eac",
|
||||
"name": "OpenAI",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-400,
|
||||
1560
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini",
|
||||
"cachedResultName": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "5b36a295-fda6-4174-9078-0a8ec57620d2",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-800,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"width": 320,
|
||||
"height": 240,
|
||||
"content": "Chain that summarizes the received email"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7110fe1f-0099-49aa-9095-96e733aa468f",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-360,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"width": 340,
|
||||
"height": 240,
|
||||
"content": "Agent that retrieves business information from a vector database and processes the response"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e2bdbd64-3c37-4867-ae2c-0f6937d82b81",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1100,
|
||||
1260
|
||||
],
|
||||
"parameters": {
|
||||
"height": 240,
|
||||
"content": "Convert email to Markdown format for better understanding of LLM models"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8ae5d216-5897-4c33-800a-27ff939b174a",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
620,
|
||||
1300
|
||||
],
|
||||
"parameters": {
|
||||
"height": 180,
|
||||
"content": "If the feedback is OK send email"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4cfce63c-5931-45c5-99ca-eb85dca962b5",
|
||||
"name": "Approve Email",
|
||||
"type": "n8n-nodes-base.emailSend",
|
||||
"position": [
|
||||
380,
|
||||
1340
|
||||
],
|
||||
"webhookId": "4f9f06e7-9b2b-4896-9b51-245972341d12",
|
||||
"parameters": {
|
||||
"message": "=<h3>MESSAGE</h3>\n{{ $('Email Trigger (IMAP)').item.json.textHtml }}\n\n<h3>AI RESPONSE</h3>\n{{ $json.email }}",
|
||||
"options": {},
|
||||
"subject": "=[Approval Required] {{ $('Email Trigger (IMAP)').item.json.subject }}",
|
||||
"toEmail": "info@n3witalia.com",
|
||||
"fromEmail": "info@n3witalia.com",
|
||||
"operation": "sendAndWait"
|
||||
},
|
||||
"credentials": {
|
||||
"smtp": {
|
||||
"id": "hRjP3XbDiIQqvi7x",
|
||||
"name": "SMTP info@n3witalia.com"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "d6c8acd2-ebc1-4aaa-bfcc-cdb18fcc8715",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-820,
|
||||
1560
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "deepseek-chat",
|
||||
"cachedResultName": "deepseek-chat"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "97Cz4cqyiy1RdcQL",
|
||||
"name": "DeepSeek"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "33bbedeb-129a-4e99-ab5a-9e0ec4456156",
|
||||
"name": "Set Email text",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
100,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "35d7c303-42f4-4dd1-b41e-6eb087c23c3d",
|
||||
"name": "email",
|
||||
"type": "string",
|
||||
"value": "={{ $json.output }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "2293e0e6-4f2a-4622-a610-64b65f34e1e5",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
320,
|
||||
1300
|
||||
],
|
||||
"parameters": {
|
||||
"height": 180,
|
||||
"content": "Human in the loop"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "510196ec-adaf-4e6c-aac0-8ca8b754438a",
|
||||
"name": "Sticky Note11",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1100,
|
||||
940
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 540,
|
||||
"height": 260,
|
||||
"content": "# How it works\nThis workflow automates the handling of incoming emails, summarizes their content, generates appropriate responses and validate it through send IMAP email with \"Human in the loop\" system. \n\nYou can quickly integrate Gmail and Outlook via the appropriate nodes"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c4c9157d-4d05-47a1-a5eb-63865e838d39",
|
||||
"name": "Approved?",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
680,
|
||||
1340
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "62e26bc5-1732-4699-a602-99490c7406fd",
|
||||
"operator": {
|
||||
"type": "boolean",
|
||||
"operation": "true",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.data.approved }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "47e79286-00f4-48e8-a0d1-e0f56d9ba0d5",
|
||||
"connections": {
|
||||
"OpenAI": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Email Summarization Chain",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Approved?": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[]
|
||||
]
|
||||
},
|
||||
"Write email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Email text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Approve Email": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Approved?",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Email text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Approve Email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Email Summarization Chain",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Trigger (IMAP)": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Email Summarization Chain": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Write email",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
913
Auto-Tag Blog Posts in WordPress with AI.txt
Normal file
913
Auto-Tag Blog Posts in WordPress with AI.txt
Normal file
@@ -0,0 +1,913 @@
|
||||
{
|
||||
"id": "siXUnQhJpCJ9rHzu",
|
||||
"meta": {
|
||||
"instanceId": "a9f3b18652ddc96459b459de4fa8fa33252fb820a9e5a1593074f3580352864a",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Auto-Tag Blog Posts in WordPress with AI",
|
||||
"tags": [
|
||||
{
|
||||
"id": "ijuVOmJpw5mCrzQX",
|
||||
"name": "marketing",
|
||||
"createdAt": "2025-01-28T16:42:03.029Z",
|
||||
"updatedAt": "2025-01-28T16:42:03.029Z"
|
||||
}
|
||||
],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "0561d80b-f360-4a8e-930d-49b778833991",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
3260,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "yWpagxp5s8o3dlBp",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d71aec64-299c-4258-8eb4-95821d15b758",
|
||||
"name": "Auto-fixing Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
|
||||
"position": [
|
||||
3460,
|
||||
540
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1468a001-ca7b-4726-ae31-02b28d78b07e",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
3360,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "yWpagxp5s8o3dlBp",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bb4221ad-94d7-4543-850f-87b83735d2a6",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
3560,
|
||||
760
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchemaExample": "{\n\t\"tags\": [\"Germany\", \"Technology\", \"Workflow Automation\"]\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "2380c4ea-d804-45b2-8341-417afa2ae21f",
|
||||
"name": "RSS Feed Trigger",
|
||||
"type": "n8n-nodes-base.rssFeedReadTrigger",
|
||||
"position": [
|
||||
3140,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "782e9c61-7d51-499b-89b2-888415c5116e",
|
||||
"name": "Return article details",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
4140,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "ebe28fc7-f166-4428-b3f3-b319f2d080df",
|
||||
"name": "tag_ids",
|
||||
"type": "array",
|
||||
"value": "={{ $json.tag_ids }}"
|
||||
},
|
||||
{
|
||||
"id": "bc296683-2a93-42b4-a9a7-90a2bc22f37b",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $('MOCK article').item.json.title }}"
|
||||
},
|
||||
{
|
||||
"id": "32dc0950-3708-447e-a3b6-a5c5ae9bdcd0",
|
||||
"name": "content",
|
||||
"type": "string",
|
||||
"value": "={{ $('MOCK article').item.json.content }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "6b5ce61f-8351-40ab-9e63-51c3e85ce53d",
|
||||
"name": "Split Out",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
2200,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"destinationFieldName": "missing_tag"
|
||||
},
|
||||
"fieldToSplitOut": "missing_tags"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2338e3e8-cba4-48c8-8c1a-50019af70932",
|
||||
"name": "Loop over articles",
|
||||
"type": "n8n-nodes-base.splitInBatches",
|
||||
"position": [
|
||||
1980,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "39b89004-6032-4d22-8bcc-3dfd1d793ed0",
|
||||
"name": "SET initial record",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2200,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"includeOtherFields": true
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "ec0b93cb-de9d-41be-9d4b-6846d3ee14a2",
|
||||
"name": "GET WP tags",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2440,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.example.com/wp-json/wp/v2/tags",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "wordpressApi"
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "XXXXXXX",
|
||||
"name": "Example"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 4.2,
|
||||
"alwaysOutputData": true
|
||||
},
|
||||
{
|
||||
"id": "cbabadef-9f5f-4402-8bd7-255f5c237ff9",
|
||||
"name": "POST WP tags",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2420,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.example.com/wp-json/wp/v2/tags",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "slug",
|
||||
"value": "={{ $json.missing_tag }}"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"value": "={{ $json.missing_tag.replaceAll(\"-\",\" \").toTitleCase() }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "wordpressApi"
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "XXXXXXX",
|
||||
"name": "Example"
|
||||
}
|
||||
},
|
||||
"executeOnce": false,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "6bf40d39-4b42-413f-9502-3ca494f75bcb",
|
||||
"name": "GET updated WP tags",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2700,
|
||||
840
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://www.example.com/wp-json/wp/v2/tags",
|
||||
"options": {},
|
||||
"authentication": "predefinedCredentialType",
|
||||
"nodeCredentialType": "wordpressApi"
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "XXXXXXX",
|
||||
"name": "Example"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "aea9a631-0cd8-4ed8-9fb1-981b8e11f3dd",
|
||||
"name": "Keep matches",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
2200,
|
||||
1040
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "8ec4fdfc-73f3-4d7b-96e4-f42a18252599",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "contains",
|
||||
"rightType": "any"
|
||||
},
|
||||
"leftValue": "={{ $('SET initial record').first().json.tags.map(item => item.toLowerCase().replaceAll(\" \",\"-\")) }}",
|
||||
"rightValue": "={{ $json.slug }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "6d71d7a5-495d-4809-b66f-9f1cba0d11c6",
|
||||
"name": "Combine tag_ids",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2420,
|
||||
1040
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tag_ids",
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "dc3cac68-dee8-4821-963b-b0594d1a7e0e",
|
||||
"name": "Combine slugs",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
2700,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "tags",
|
||||
"fieldToAggregate": "slug"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8e0f668c-e3ac-4d70-9ffb-5515e6221c62",
|
||||
"name": "If",
|
||||
"type": "n8n-nodes-base.if",
|
||||
"position": [
|
||||
2440,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"version": 2,
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "8d77d072-cb47-4fbb-831a-0e6f3ecefc71",
|
||||
"operator": {
|
||||
"type": "array",
|
||||
"operation": "empty",
|
||||
"singleValue": true
|
||||
},
|
||||
"leftValue": "={{ $json.missing_tags }}",
|
||||
"rightValue": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "7988188d-07e6-4a36-94f2-e21d7677802e",
|
||||
"name": "MOCK article",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
3740,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "4a69cf1b-341a-40bc-a36a-b76c05bdd819",
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"value": "={{ $('RSS Feed Trigger').item.json.title }}"
|
||||
},
|
||||
{
|
||||
"id": "63097eb0-6165-4365-a5b5-e9f3de65d715",
|
||||
"name": "content",
|
||||
"type": "string",
|
||||
"value": "={{ $('RSS Feed Trigger').item.json.content }}"
|
||||
},
|
||||
{
|
||||
"id": "ae4859ec-ad14-403e-b5b6-53703fefe3f3",
|
||||
"name": "categories",
|
||||
"type": "array",
|
||||
"value": "={{ $('RSS Feed Trigger').item.json.categories }}"
|
||||
},
|
||||
{
|
||||
"id": "3f94d5ac-5196-4ad0-acea-79c07b0ee2c6",
|
||||
"name": "tags",
|
||||
"type": "array",
|
||||
"value": "={{ $json.output.tags }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "4578cb14-dc86-4bc4-8d59-f0c088574164",
|
||||
"name": "Return missing tags",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
2200,
|
||||
640
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "const new_ary = $('SET initial record').first().json.tags.map(x => x.toLowerCase().replaceAll(\" \",\"-\")).filter(x => !$input.first().json.tags.includes(x))\n\nreturn {\"missing_tags\": new_ary};"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "91c8dde5-58ce-4bf6-ac3c-0062cbf0046e",
|
||||
"name": "Wordpress",
|
||||
"type": "n8n-nodes-base.wordpress",
|
||||
"position": [
|
||||
4360,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"title": "=Demo tagging post: {{ $json.title }}",
|
||||
"additionalFields": {
|
||||
"tags": "={{ $json.tag_ids }}",
|
||||
"content": "=This is a post to demo automatic tagging a WordPress postvia n8n. The following content could be rewritten in full or part with commentary using AI.\n\n{{ $json.content }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "XXXXXXX",
|
||||
"name": "Example"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8257534e-f433-4225-a795-230fd367cc01",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3000,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1673.0029952487134,
|
||||
"height": 1061.6563737812796,
|
||||
"content": "## Demo Usage in Another Workflow (Tagging an article discovered with an RSS feed)"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b14e6fda-c569-4ada-90d9-77b61049c531",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1680,
|
||||
198.96245932022566
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 1243.102096674096,
|
||||
"height": 1077.24135750937,
|
||||
"content": "## Auto-Tag Posts in WordPress\n\nThis workflow allows you to hand off the responsibility of tagging content for WordPress to an AI Agent in n8n with no data entry required."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "21420d0f-a5c9-4eac-b6d9-06d3a6de5fb9",
|
||||
"name": "Demo Usage in Another Workflow",
|
||||
"type": "n8n-nodes-base.executeWorkflowTrigger",
|
||||
"position": [
|
||||
1780,
|
||||
320
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7571b196-3827-478f-b032-84d99adf4aa8",
|
||||
"name": "Auto-Tag Posts in WordPress",
|
||||
"type": "n8n-nodes-base.executeWorkflow",
|
||||
"position": [
|
||||
3940,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "each",
|
||||
"options": {},
|
||||
"workflowId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "siXUnQhJpCJ9rHzu"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "e5b63f63-09a6-452d-9d26-8501fc49d7fe",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2640,
|
||||
140
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 256.62869115182394,
|
||||
"height": 146.4958582739091,
|
||||
"content": "## Copy this workflow\n\nYou can use it inline by removing the Called by Another Workflow trigger, or as-is as a subworkflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2ea9fbdd-b492-4030-b640-227a163d70ef",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3040,
|
||||
980
|
||||
],
|
||||
"parameters": {
|
||||
"width": 409.8780943583022,
|
||||
"height": 248.2919292392927,
|
||||
"content": "Handing off tagging and categorization fully to AI lets you **put your WordPress account on autopilot** without a human-in-the-loop.\n\nIn this example the application is use-case agnostic, but with this workflow you can:\n1. Use AI to rewrite content with original thoughts and tags\n2. Ensure healthy information architecture on your site\n3. Quickly generate multivariate tag and category combinations for optimal SEO"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "57cfa462-fc71-4173-b7c9-8253c4e240d1",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3900,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 369.61896876326364,
|
||||
"height": 103.91486928512641,
|
||||
"content": "### To ensure data can be passed to subsequent nodes, make sure to select \"Run Once for Each Item\" if executing a subworkflow"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7f1dfade-07be-49b7-b5ee-99b58f1e6cc7",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2640,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 211.8330719827787,
|
||||
"content": "## What's this? \nIf there are missing tags we create them in WP, otherwise we keep get them all from WP and keep the relevant ones."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "61711c71-3e45-4b06-80a8-b651177b585d",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1960,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 174.33565557367925,
|
||||
"height": 251.80401948434695,
|
||||
"content": "## What's this? \nOne of the few potential failure points in this workflow, when checking for missing tags it's important that both the generated tags and the existing tags are in the same case (snake, dash, title)."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "31db85c9-e4c2-4409-9d92-7eb005223de0",
|
||||
"name": "Generate tags for article",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
3360,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Please provide 3-5 suitable tags for the following article:\n\n{{ $json.content }}\n\nTag Formatting Rules:\n1. Tags should be in title case",
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "7d6eac92-6f6f-44a4-8dce-0830440a9dff",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1600,
|
||||
1040
|
||||
],
|
||||
"parameters": {
|
||||
"width": 285.2555025627061,
|
||||
"content": "## ! A note about cases !\nIf you want your tags to follow a different case than I am using (dash case for slug, title case for name), then you will need to update a few nodes in this workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "133be2f7-071b-4651-b3b5-8052a64b7f49",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2600,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 296.01271681531176,
|
||||
"content": "## Ready for a challenge?\n\nMake this subworkflow executable for both categories and tags, accounting for different API calls to different endpoints."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7807e967-ac3d-4a4d-bd9d-f123d57e1676",
|
||||
"name": "Sticky Note9",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
4400,
|
||||
1155.7364351382535
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 244.3952545193282,
|
||||
"height": 87.34661077350344,
|
||||
"content": "## About the maker\n**[Find Ludwig Gerdes on LinkedIn](https://www.linkedin.com/in/ludwiggerdes)**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {
|
||||
"Generate tags for article": [
|
||||
{
|
||||
"json": {
|
||||
"output": {
|
||||
"tags": [
|
||||
"Team Achievements",
|
||||
"Global Community",
|
||||
"Product Growth",
|
||||
"2024 Highlights",
|
||||
"Reflecting on Progress"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "3acdf19c-288e-4a3b-87ae-5adbf44285fe",
|
||||
"connections": {
|
||||
"If": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GET updated WP tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
"node": "Split Out",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "POST WP tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"GET WP tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine slugs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Keep matches": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine tag_ids",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"MOCK article": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Auto-Tag Posts in WordPress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"POST WP tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GET updated WP tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine slugs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Return missing tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine tag_ids": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over articles",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"RSS Feed Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate tags for article",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Generate tags for article",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Loop over articles": {
|
||||
"main": [
|
||||
[],
|
||||
[
|
||||
{
|
||||
"node": "SET initial record",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Auto-fixing Output Parser",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"SET initial record": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "GET WP tags",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"GET updated WP tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Keep matches",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Return missing tags": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "If",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Return article details": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Wordpress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Auto-fixing Output Parser",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Auto-fixing Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Generate tags for article",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate tags for article": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "MOCK article",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Auto-Tag Posts in WordPress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Return article details",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Demo Usage in Another Workflow": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Loop over articles",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
475
Auto-label incoming Gmail messages with AI nodes.txt
Normal file
475
Auto-label incoming Gmail messages with AI nodes.txt
Normal file
@@ -0,0 +1,475 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "8141ffad-df2a-403b-a869-799c036f9733",
|
||||
"name": "Gmail trigger",
|
||||
"type": "n8n-nodes-base.gmailTrigger",
|
||||
"position": [
|
||||
-600,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"filters": {},
|
||||
"options": {},
|
||||
"pollTimes": {
|
||||
"item": [
|
||||
{
|
||||
"mode": "everyMinute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6d9aa398-e2de-4fd0-b939-2a12d0c9fe14",
|
||||
"name": "Get message content",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
-340,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"simple": false,
|
||||
"options": {},
|
||||
"messageId": "={{ $json.id }}",
|
||||
"operation": "get"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "cd86bc09-8c7f-4c85-9cb3-6dbd42420672",
|
||||
"name": "Set label values",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
300,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"fields": {
|
||||
"values": [
|
||||
{
|
||||
"name": "labels",
|
||||
"type": "arrayValue",
|
||||
"arrayValue": "={{ $json.labels }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 3.2
|
||||
},
|
||||
{
|
||||
"id": "329435a6-51d1-416e-9aa9-5fe9a8dce74f",
|
||||
"name": "Get all labels",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
580,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"resource": "label",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "7ae2dd15-472d-4a4b-b036-f80ebd7e3c28",
|
||||
"name": "Split out assigned labels",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
580,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "labels"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "744c7afa-75b1-4b3b-8ccb-e2106c01f387",
|
||||
"name": "Merge corresponding labels",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
860,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"mergeByFields": {
|
||||
"values": [
|
||||
{
|
||||
"field1": "name",
|
||||
"field2": "labels"
|
||||
}
|
||||
]
|
||||
},
|
||||
"outputDataFrom": "input1"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "e47424dc-f43e-41a9-b1e5-ab3e08cbf395",
|
||||
"name": "Aggregate label IDs",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1120,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"renameField": true,
|
||||
"outputFieldName": "label_ids",
|
||||
"fieldToAggregate": "id"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "22ba8297-8efc-463e-8ae0-385fd94a205f",
|
||||
"name": "Add labels to message",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1340,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"labelIds": "={{ $json.label_ids }}",
|
||||
"messageId": "={{ $('Gmail trigger').item.json[\"id\"] }}",
|
||||
"operation": "addLabels"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "uBcIMfsTtKjexw7I",
|
||||
"name": "Gmail (workfloowstutorial@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "7ebb1aad-00ad-43fa-9e07-e5f324864a74",
|
||||
"name": "Assign labels for message",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
-80,
|
||||
580
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "={{ $json.text }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "Your task is to categorize the message according to the following labels.\n\nPartnership - email about sponsored content, cooperation etc.\nInquiry - email about products, services.\nNotification - email that doesn't require response. \n\nOne email can have more than one label. Return only label names in JSON format, nothing else. Do not make things up. "
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "2f82db6a-422c-4697-a629-cc782d88209d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1100,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 420.4803040774015,
|
||||
"height": 240.57943708322733,
|
||||
"content": "## Add AI labels to Gmail messages\nWith this workflow you can automatically set labels for your Gmail message according to its content. \n\nIn this workflow available are 3 labels: \"Partnership\", \"Inquiry\" and \"Notification\". Feel free to adjust labels according to your needs. \n\n**Please remember to set label names both in your Gmail account and workflow.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4a10fb2b-aebb-4735-bbdb-7f07f1136d95",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-1100,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"width": 421.0932411886662,
|
||||
"height": 257.42916378714597,
|
||||
"content": "## ⚠️ Note\n\n1. Complete video guide for this workflow is available [on my YouTube](https://youtu.be/a8Dhj3Zh9vQ). \n2. Remember to add your credentials and configure nodes (covered in the video guide).\n3. If you like this workflow, please subscribe to [my YouTube channel](https://www.youtube.com/@workfloows) and/or [my newsletter](https://workfloows.com/).\n\n**Thank you for your support!**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "76e62351-d502-4377-9df2-fe92df00fe03",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-660,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.4602598584674,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Gmail Trigger\nReceive data from Gmail about new incoming message. \n\n⚠️ Set polling interval according to your needs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c10702db-211f-4638-bcf0-fbbe18251cb7",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
60,
|
||||
780
|
||||
],
|
||||
"parameters": {
|
||||
"width": 241.53974014153226,
|
||||
"height": 319.3323098457962,
|
||||
"content": "###\n\n\n\n\n\n\n\n\n\n\n### JSON schema\nEdit JSON schema and label names according to your needs.\n\n⚠️ **Label names in system prompt and JSON schema should be the same.**"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cb6e3573-3d4d-4313-a97e-86a017438399",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 226.14233872620645,
|
||||
"height": 347.0476323933831,
|
||||
"content": "### Merge labels\nCombine labels retrieved from Gmail account and assigned by AI together."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8cfb4341-98e6-4944-b26c-15e39184f468",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1060,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 452.48413953150185,
|
||||
"height": 347.0476323933831,
|
||||
"content": "### Aggregarte labels and add to message\nCreate array of label IDs and add to the desired email message in Gmail."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bb9766e8-0b72-47f8-9a8e-0b291609e814",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-400,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 238.4602598584674,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Get message content\nBased on Gmail message ID retrieve body content of the email and pass it to AI chain."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "48630cbd-8336-4577-928e-37341f09ef9b",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-140,
|
||||
400
|
||||
],
|
||||
"parameters": {
|
||||
"width": 378.57661273793565,
|
||||
"height": 348.5873725349161,
|
||||
"content": "### Assign labels\nLet the AI decide which labels suit the best content of the message.\n\n⚠️ **Remember to edit system prompt** - modify label names and instructions according to your needs."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "60a9d75e-1564-4b1d-b3f2-acc2e3bf2411",
|
||||
"name": "JSON Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
140,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"jsonSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"labels\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"Inquiry\", \"Partnership\", \"Notification\"]\n }\n }\n },\n \"required\": [\"labels\"]\n}\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "2bdf3fed-8a7f-411a-bad4-266bfea5cede",
|
||||
"name": "OpenAI Chat",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
-120,
|
||||
800
|
||||
],
|
||||
"parameters": {
|
||||
"model": "gpt-4-turbo-preview",
|
||||
"options": {
|
||||
"temperature": 0,
|
||||
"responseFormat": "json_object"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "jazew1WAaSRrjcHp",
|
||||
"name": "OpenAI (workfloows@gmail.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"connections": {
|
||||
"JSON Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Gmail trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get message content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get all labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge corresponding labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set label values": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get all labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Split out assigned labels",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Aggregate label IDs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Add labels to message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get message content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Assign labels for message",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Assign labels for message": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set label values",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split out assigned labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge corresponding labels",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Merge corresponding labels": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Aggregate label IDs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
691
Automate Blog Creation in Brand Voice with AI.txt
Normal file
691
Automate Blog Creation in Brand Voice with AI.txt
Normal file
@@ -0,0 +1,691 @@
|
||||
{
|
||||
"nodes": [
|
||||
{
|
||||
"id": "d3159589-dbb7-4cca-91f5-09e8b2e4cba8",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
240,
|
||||
500
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b4b42b3f-ef30-4fc8-829d-59f8974c4168",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2180,
|
||||
700
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "032c3012-ed8d-44eb-94f0-35790f4b616f",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2980,
|
||||
460
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "bf922785-7e8f-4f93-bfff-813c16d93278",
|
||||
"name": "OpenAI Chat Model2",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
2020,
|
||||
520
|
||||
],
|
||||
"parameters": {
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "8gccIjcuf3gvaoEr",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d8d4b26f-270f-4b39-a4cd-a6e4361da591",
|
||||
"name": "Extract Voice Characteristics",
|
||||
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
|
||||
"position": [
|
||||
2160,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=### Analyse the given content\n\n{{ $json.data.map(item => item.replace(/\\n/g, '')).join('\\n---\\n') }}",
|
||||
"options": {
|
||||
"systemPromptTemplate": "You help identify and define a company or individual's \"brand voice\". Using the given content belonging to the company or individual, extract all voice characteristics from it along with description and examples demonstrating it."
|
||||
},
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n\t\"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \t\"properties\": {\n \"characteristic\": { \"type\": \"string\" },\n \"description\": { \"type\": \"string\" },\n \"examples\": { \"type\": \"array\", \"items\": { \"type\": \"string\" } }\n }\n\t}\n}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8cca272c-b912-40f1-ba08-aa7c5ff7599c",
|
||||
"name": "Get Blog",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
480,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://blog.n8n.io",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "aa1e2a02-2e2b-4e8d-aef8-f5f7a54d9562",
|
||||
"name": "Get Article",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1120,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://blog.n8n.io{{ $json.article }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "78ae3dfc-5afd-452f-a2b6-bdb9dbd728bd",
|
||||
"name": "Extract Article URLs",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
640,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "extractHtmlContent",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "article",
|
||||
"attribute": "href",
|
||||
"cssSelector": ".item.post a.global-link",
|
||||
"returnArray": true,
|
||||
"returnValue": "attribute"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "3b2b6fea-ed2f-43ba-b6d1-e0666b88c65b",
|
||||
"name": "Split Out URLs",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
800,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "article"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "68bb20b1-2177-4c0f-9ada-d1de69bdc2a0",
|
||||
"name": "Latest Articles",
|
||||
"type": "n8n-nodes-base.limit",
|
||||
"position": [
|
||||
960,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"maxItems": 5
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "f20d7393-24c9-4a51-872e-0dce391f661c",
|
||||
"name": "Extract Article Content",
|
||||
"type": "n8n-nodes-base.html",
|
||||
"position": [
|
||||
1280,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"operation": "extractHtmlContent",
|
||||
"extractionValues": {
|
||||
"values": [
|
||||
{
|
||||
"key": "data",
|
||||
"cssSelector": ".post-section",
|
||||
"returnValue": "html"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "299a04be-fe9b-47d9-b2c6-e2e4628f77e0",
|
||||
"name": "Combine Articles",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1780,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"mergeLists": true
|
||||
},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "data"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8480ece7-0dc1-4682-ba9e-ded2c138d8b8",
|
||||
"name": "Article Style & Brand Voice",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
2560,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combineBy": "combineByPosition"
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "024efee2-5a2f-455c-a150-4b9bdce650b2",
|
||||
"name": "Save as Draft",
|
||||
"type": "n8n-nodes-base.wordpress",
|
||||
"position": [
|
||||
3460,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $json.output.title }}",
|
||||
"additionalFields": {
|
||||
"slug": "={{ $json.output.title.toSnakeCase() }}",
|
||||
"format": "standard",
|
||||
"status": "draft",
|
||||
"content": "={{ $json.output.body }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "YMW8mGrekjfxKJUe",
|
||||
"name": "Wordpress account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71f4ab1e-ef61-48f3-92e8-70691f7d0750",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
480,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 606,
|
||||
"height": 264,
|
||||
"content": "## 1. Import Existing Content\n[Read more about the HTML node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.html/)\n\nFirst, we'll need to gather existing content for the brand voice we want to replicate. This content can be blogs, social media posts or internal documents - the idea is to use this content to \"train\" our AI to produce content from the provided examples. One call out is that the quality and consistency of the content is important to get the desired results.\n\nIn this demonstration, we'll grab the latest blog posts off a corporate blog to use as an example. Since, the blog articles are likely consistent because of the source and narrower focus of the medium, it'll serve well to showcase this workflow."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3d3a55a5-4b4a-4ea2-a39c-82b366fb81e6",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1440,
|
||||
240
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 434,
|
||||
"height": 230,
|
||||
"content": "## 2. Convert HTML to Markdown\n[Learn more about the Markdown node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.markdown)\n\nMarkdown is a great way to optimise the article data we're sending to the LLM because it reduces the amount of tokens required but keeps all relevant writing structure information.\n\nAlso useful to get Markdown output as a response because typically it's the format authors will write in."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "08c0b683-ec06-47ce-871c-66265195ca29",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1980,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 446,
|
||||
"height": 233,
|
||||
"content": "## 3. Using AI to Analyse Article Structure and Writing Styles\n[Read more about the Basic LLM Chain node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nOur approach is to first perform a high-level analysis of all available articles in order to replicate their content layout and writing styles. This will act as a guideline to help the AI to structure our future articles."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "515fe69f-061e-4dfc-94ed-4cf2fbe10b7b",
|
||||
"name": "Capture Existing Article Structure",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
2020,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.data.join('\\n---\\n') }}",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "=Given the following one or more articles (which are separated by ---), describe how best one could replicate the common structure, layout, language and writing styles of all as aggregate."
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "ba4e68fb-eccc-4efa-84be-c42a695dccdb",
|
||||
"name": "Markdown",
|
||||
"type": "n8n-nodes-base.markdown",
|
||||
"position": [
|
||||
1600,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"html": "={{ $json.data }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d459ff5b-0375-4458-a49f-59700bb57e12",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2340,
|
||||
740
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 446,
|
||||
"height": 253,
|
||||
"content": "## 4. Using AI to Extract Voice Characteristics and Traits\n[Read more about the Information Extractor node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor/)\n\nSecond, we'll use AI to analysis the brand voice characteristics of the previous articles. This picks out the tone, style and choice of language used and identifies them into categories. These categories will be used as guidelines for the AI to keep the future article consistent in tone and voice. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "71fe32a9-1b8a-446c-a4ff-fb98c6a68e1b",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2720,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 626,
|
||||
"height": 633,
|
||||
"content": "## 5. Automate On-Brand Articles Using AI\n[Read more about the Information Extractor node](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.information-extractor)\n\nFinally with this approach, we can feed both content and voice guidelines into our final LLM - our content generation agent - to produce any number of on-brand articles, social media posts etc.\n\nWhen it comes to assessing the output, note the AI does a pretty good job at simulating format and reusing common phrases and wording for the target article. However, this could become repetitive very quickly! Whilst AI can help speed up the process, a human touch may still be required to add a some variety."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4e6fbe4e-869e-4bef-99ba-7b18740caecf",
|
||||
"name": "Content Generation Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
|
||||
"position": [
|
||||
3000,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.instruction }}",
|
||||
"options": {
|
||||
"systemPromptTemplate": "=You are a blog content writer who writes using the following article guidelines. Write a content piece as requested by the user. Output the body as Markdown. Do not include the date of the article because the publishing date is not determined yet.\n\n## Brand Article Style\n{{ $('Article Style & Brand Voice').item.json.text }}\n\n##n Brand Voice Characteristics\n\nHere are the brand voice characteristic and examples you must adopt in your piece. Pick only the characteristic which make sense for the user's request. Try to keep it as similar as possible but don't copy word for word.\n\n|characteristic|description|examples|\n|-|-|-|\n{{\n$('Article Style & Brand Voice').item.json.output.map(item => (\n`|${item.characteristic}|${item.description}|${item.examples.map(ex => `\"${ex}\"`).join(', ')}|`\n)).join('\\n')\n}}"
|
||||
},
|
||||
"attributes": {
|
||||
"attributes": [
|
||||
{
|
||||
"name": "title",
|
||||
"required": true,
|
||||
"description": "title of article"
|
||||
},
|
||||
{
|
||||
"name": "summary",
|
||||
"required": true,
|
||||
"description": "summary of article"
|
||||
},
|
||||
{
|
||||
"name": "body",
|
||||
"required": true,
|
||||
"description": "body of article"
|
||||
},
|
||||
{
|
||||
"name": "characteristics",
|
||||
"required": true,
|
||||
"description": "comma delimited string of characteristics chosen"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "022de44c-c06c-41ac-bd50-38173dae9b37",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
3460,
|
||||
480
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 406,
|
||||
"height": 173,
|
||||
"content": "## 6. Save Draft to Wordpress\n[Learn more about the Wordpress node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.wordpress/)\n\nTo close out the template, we'll simple save our generated article as a draft which could allow human team members to review and validate the article before publishing."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fe54c40e-6ddd-45d6-a938-f467e4af3f57",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2900,
|
||||
660
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 440,
|
||||
"height": 120,
|
||||
"content": "### Q. Do I need to analyse Brand Voice for every article?\nA. No! I would recommend storing the results of the AI's analysis and re-use for a list of planned articles rather than generate anew every time."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1832131e-21e8-44fc-9370-907f7b5a6eda",
|
||||
"name": "Sticky Note7",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1000,
|
||||
680
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 380,
|
||||
"height": 120,
|
||||
"content": "### Q. Can I use other media than blog articles?\nA. Yes! This approach can use other source materials such as PDFs, as long as they can be produces in a text format to give to the LLM."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8e8706a3-122d-436b-9206-de7a6b2f3c39",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-220,
|
||||
-120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 400,
|
||||
"height": 800,
|
||||
"content": "## Try It Out!\n### This n8n template demonstrates how to use AI to generate new on-brand written content by analysing previously published content.\n\nWith such an approach, it's possible to generate a steady stream of blog article drafts quickly with high consistency with your brand and existing content.\n\n### How it works\n* In this demonstration, the n8n.io blog is used as the source of existing published content and 5 of the latest articles are imported via the HTTP node.\n* The HTML node is extract the article bodies which are then converted to markdown for our LLMs.\n* We use LLM nodes to (1) understand the article structure and writing style and (2) identify the brand voice characteristics used in the posts.\n* These are then used as guidelines in our final LLM node when generating new articles.\n* Finally, a draft is saved to Wordpress for human editors to review or use as starting point for their own articles.\n\n### How to use\n* Update Step 1 to fetch data from your desired blog or change to fetch existing content in a different way.\n* Update Step 5 to provide your new article instruction. For optimal output, theme topics relevant to your brand.\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
|
||||
},
|
||||
{
|
||||
"id": "1510782d-0f88-40ca-99a8-44f984022c8e",
|
||||
"name": "New Article Instruction",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
2820,
|
||||
320
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "2c7e2a28-30f9-4533-a394-a5e967ebf4ec",
|
||||
"name": "instruction",
|
||||
"type": "string",
|
||||
"value": "=Write a comprehensive guide on using AI for document classification and document extraction. Explain the benefits of using vision models over traditional OCR. Close out with a recommendation of using n8n as the preferred way to get started with this AI use-case."
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Get Blog": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Article URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Markdown": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine Articles",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Get Article": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Article Content",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Latest Articles",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Latest Articles": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Article",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine Articles": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Capture Existing Article Structure",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Extract Voice Characteristics",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Extract Voice Characteristics",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Content Generation Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model2": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Capture Existing Article Structure",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Article URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Article Content": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Markdown",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"New Article Instruction": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Content Generation Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Content Generation Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Save as Draft",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Article Style & Brand Voice": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "New Article Instruction",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Extract Voice Characteristics": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Article Style & Brand Voice",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Blog",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Capture Existing Article Structure": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Article Style & Brand Voice",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1359
Automate Competitor Research with Exa.ai, Notion and AI Agents.txt
Normal file
1359
Automate Competitor Research with Exa.ai, Notion and AI Agents.txt
Normal file
File diff suppressed because it is too large
Load Diff
568
Automate Content Generator for WordPress with DeepSeek R1.txt
Normal file
568
Automate Content Generator for WordPress with DeepSeek R1.txt
Normal file
@@ -0,0 +1,568 @@
|
||||
{
|
||||
"id": "p5bfwpcRy6LK33Io",
|
||||
"meta": {
|
||||
"instanceId": "a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Automate Content Generator for WordPress with DeepSeek R1",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "c4a6995f-7769-4b77-80ca-1e6bccef77c1",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
-20,
|
||||
200
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c76b1458-5130-41e7-b2f2-1cfe22eab536",
|
||||
"name": "Get Ideas",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
200,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=Sheet1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "YOURDOCUMENT"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "JYR6a64Qecd6t8Hb",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "8d17a640-3e15-42e9-9481-e3291d395ccd",
|
||||
"name": "Set your prompt",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
420,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "3e8d2523-66aa-46fe-adcc-39dc78b9161e",
|
||||
"name": "prompt",
|
||||
"type": "string",
|
||||
"value": "={{ $json.PROMPT }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "4f0e9065-b331-49ed-acd9-77c7c43e89a5",
|
||||
"name": "Create post on Wordpress",
|
||||
"type": "n8n-nodes-base.wordpress",
|
||||
"position": [
|
||||
0,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"title": "={{ $json.message.content }}",
|
||||
"additionalFields": {
|
||||
"status": "draft",
|
||||
"content": "={{ $('Generate article with DeepSeek').item.json.message.content }}"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "OE4AgquSkMWydRqn",
|
||||
"name": "Wordpress (wp.test.7hype.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "cb85d980-9d60-4c85-8574-b46e4cc14341",
|
||||
"name": "Upload image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
420,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://YOURSITE.com/wp-json/wp/v2/media",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "binaryData",
|
||||
"sendHeaders": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Content-Disposition",
|
||||
"value": "=attachment; filename=\"copertina-{{ $('Create post on Wordpress').item.json.id }}.jpg\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"inputDataFieldName": "data",
|
||||
"nodeCredentialType": "wordpressApi"
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "OE4AgquSkMWydRqn",
|
||||
"name": "Wordpress (wp.test.7hype.com)"
|
||||
},
|
||||
"wooCommerceApi": {
|
||||
"id": "vYYrjB5kgHQ0XByZ",
|
||||
"name": "WooCommerce (wp.test.7hype.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "bc71ed8a-fe35-487a-b4cd-6b8c1b256763",
|
||||
"name": "Set Image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
640,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://wp.test.7hype.com/wp-json/wp/v2/posts/{{ $('Create post on Wordpress').item.json.id }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendQuery": true,
|
||||
"authentication": "predefinedCredentialType",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "featured_media",
|
||||
"value": "={{ $json.id }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"nodeCredentialType": "wordpressApi"
|
||||
},
|
||||
"credentials": {
|
||||
"wordpressApi": {
|
||||
"id": "OE4AgquSkMWydRqn",
|
||||
"name": "Wordpress (wp.test.7hype.com)"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "fbed2813-cc64-42a2-994f-3696e9d8d8fe",
|
||||
"name": "Update Sheet",
|
||||
"type": "n8n-nodes-base.googleSheets",
|
||||
"position": [
|
||||
880,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"columns": {
|
||||
"value": {
|
||||
"DATA": "={{ $now.format('dd/LL/yyyy') }}",
|
||||
"TITOLO": "={{ $('Generate title with DeepSeek').item.json.message.content }}",
|
||||
"ID POST": "={{ $('Create post on Wordpress').item.json.id }}",
|
||||
"row_number": "={{ $('Get Ideas').item.json.row_number }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "DATA",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "DATA",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "PROMPT",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "PROMPT",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "TITOLO",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "TITOLO",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "ID POST",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"required": false,
|
||||
"displayName": "ID POST",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "row_number",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "row_number",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"row_number"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "update",
|
||||
"sheetName": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gid=0",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16VFeCrE5BkMBoA_S5HD-9v7C0sxcXAUiDbq5JvkDqnI/edit#gid=0",
|
||||
"cachedResultName": "Foglio1"
|
||||
},
|
||||
"documentId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "16VFeCrE5BkMBoA_S5HD-9v7C0sxcXAUiDbq5JvkDqnI",
|
||||
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/16VFeCrE5BkMBoA_S5HD-9v7C0sxcXAUiDbq5JvkDqnI/edit?usp=drivesdk",
|
||||
"cachedResultName": "Plan Blog wp.test.7hype.com"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"googleSheetsOAuth2Api": {
|
||||
"id": "JYR6a64Qecd6t8Hb",
|
||||
"name": "Google Sheets account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.5
|
||||
},
|
||||
{
|
||||
"id": "8db2b0cb-6d61-4e2d-bfac-e25a0385296d",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-60,
|
||||
-360
|
||||
],
|
||||
"parameters": {
|
||||
"color": 3,
|
||||
"width": 800,
|
||||
"height": 380,
|
||||
"content": "## Target\nThis workflow is designed to automatically generate seo-friendly content for wordpress through DeepSeek R1 by giving input ideas on how to structure the article. A cover image is also generated and uploaded with OpenAI DALL-E 3. This flow is designed to be executed automatically (ad \"On a schedule\" node) and thus have a complete editorial plan.\n\nThis process is useful for blog managers who want to automate content creation and publishing.\n\n## Preliminary step\nCreate a google sheet with the following columns:\n- Date\n- Prompt\n- Title\n- Post ID\n\nFill in only the \"Prompt\" column with basic ideas that DeepSeek will work on to generate the content."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ab620659-558d-46f0-ab85-e061af99b743",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
140,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"height": 260,
|
||||
"content": "Connect with your Google Sheet. This node select only rows for which no content has been generated yet in WordPress"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "73b0e640-8ccf-4e29-a0cd-6340db907bbd",
|
||||
"name": "Generate article with DeepSeek",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
640,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=deepseek-reasoner"
|
||||
},
|
||||
"options": {
|
||||
"maxTokens": 2048
|
||||
},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=You are an SEO expert, write an article based on this topic:\n{{ $json.prompt }}\n\nInstructions:\n- In the introduction, introduce the topic that will be explored in the rest of the text\n- The introduction should be about 120 words\n- The conclusions should be about 120 words\n- Use the conclusions to summarize everything said in the article and offer a conclusion to the reader\n- Write a maximum of 4-5 chapters and argue them.\n- The chapters should follow a logical flow and not repeat the same concepts.\n- The chapters should be related to each other and not isolated blocks of text. The text should flow and follow a linear logic.\n- Do not start chapters with \"Chapter 1\", \"Chapter 2\", \"Chapter 3\" ... write only the chapter title\n- For the text, use HTML for formatting, but limit yourself to bold, italics, paragraphs and lists.\n- Don't put the output in ```html but only text\n- Don't use markdown for formatting.\n- Go deeper into the topic you're talking about, don't just throw superficial information there\n- In output I want only the HTML format"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "97Cz4cqyiy1RdcQL",
|
||||
"name": "DeepSeek"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "6ef4e0d1-6123-4f47-94fb-c06c785ddd92",
|
||||
"name": "Generate title with DeepSeek",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
880,
|
||||
200
|
||||
],
|
||||
"parameters": {
|
||||
"modelId": {
|
||||
"__rl": true,
|
||||
"mode": "id",
|
||||
"value": "=deepseek-reasoner"
|
||||
},
|
||||
"options": {
|
||||
"maxTokens": 2048
|
||||
},
|
||||
"messages": {
|
||||
"values": [
|
||||
{
|
||||
"content": "=You are an SEO Copywriter and you need to think of a title of maximum 60 characters for the following article:\n{{ $json.message.content }}\n\nInstructions:\n- Use keywords contained in the article\n- Do not use any HTML characters\n- Output only the string containing the title.\n- Do not use quotation marks. The only special characters allowed are \":\" and \",\""
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "97Cz4cqyiy1RdcQL",
|
||||
"name": "DeepSeek"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "2ecc8514-c04e-4f8b-9ab3-560f2cf910b0",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
580,
|
||||
100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 420,
|
||||
"height": 260,
|
||||
"content": "Add your DeepSeek API credential. If you want you can change the model with \"deepseek-chat\""
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "196f7799-a6ab-429b-afd3-bcbcbd65da3b",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-20,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 160,
|
||||
"height": 260,
|
||||
"content": "Add your WordPress API credential\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "93c2d359-531a-4cc9-8a18-870c2d6ec62c",
|
||||
"name": "Generate Image with DALL-E",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
200,
|
||||
500
|
||||
],
|
||||
"parameters": {
|
||||
"prompt": "=Generate a real photographic image used as a cover for a blog post:\n\nImage prompt:\n{{ $('Generate title with DeepSeek').item.json.message.content }}, photography, realistic, sigma 85mm f/1.4",
|
||||
"options": {
|
||||
"size": "1792x1024",
|
||||
"style": "natural",
|
||||
"quality": "hd"
|
||||
},
|
||||
"resource": "image"
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "CDX6QM4gLYanh0P4",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.8
|
||||
},
|
||||
{
|
||||
"id": "eec14cd7-fb2b-4f7d-ad94-bcffc1249353",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
180,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 160,
|
||||
"height": 260,
|
||||
"content": "Add your OpenAI API credential\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4f15679b-bc8f-45b8-b3c4-8b43d7f9bb6f",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
380,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 180,
|
||||
"height": 260,
|
||||
"content": "Upload the image on your WordPress via APIs\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "abe32434-671a-4ac3-a788-fcf5fd0e9435",
|
||||
"name": "Sticky Note6",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
600,
|
||||
420
|
||||
],
|
||||
"parameters": {
|
||||
"width": 180,
|
||||
"height": 260,
|
||||
"content": "Set the uploaded image with the newly created article\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "315cc8df-bca2-4180-806e-a01407dccc79",
|
||||
"connections": {
|
||||
"Get Ideas": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set your prompt",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update Sheet",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Set your prompt": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate article with DeepSeek",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Create post on Wordpress": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate Image with DALL-E",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate Image with DALL-E": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate title with DeepSeek": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create post on Wordpress",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Generate article with DeepSeek": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Generate title with DeepSeek",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Get Ideas",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
284
Automate Image Validation Tasks using AI Vision.txt
Normal file
284
Automate Image Validation Tasks using AI Vision.txt
Normal file
@@ -0,0 +1,284 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "6c78b4c7-993b-410d-93e7-e11b3052e53b",
|
||||
"name": "When clicking ‘Test workflow’",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
0,
|
||||
420
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "c2ab6497-6d6d-483b-bd43-494ae95394c0",
|
||||
"name": "Structured Output Parser",
|
||||
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
|
||||
"position": [
|
||||
1440,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"schemaType": "manual",
|
||||
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"is_valid\": { \"type\": \"boolean\" },\n \"photo_description\": {\n \"type\": \"string\",\n \"description\": \"describe the appearance of the person(s), object(s) if any and the background in the image. Mention any colours of each if possible.\"\n },\n\t\t\"reasons\": {\n \"type\": \"array\",\n \"items\": { \"type\": \"string\" }\n }\n\t}\n}"
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "b23f5298-17c7-49ac-a8ca-78e006b2d294",
|
||||
"name": "Photo URLs",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
360,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "6baa3e08-8957-454e-8ee9-d5414a0ff990",
|
||||
"name": "data",
|
||||
"type": "array",
|
||||
"value": "={{\n[\n{\n \"name\": \"portrait_1\",\n \"url\": \"https://drive.google.com/file/d/1zs963iFkO-3g2rKak8Hcy555h55D8gjF/view?usp=sharing\"\n},\n{\n \"name\": \"portrait_2\",\n \"url\": \"https://drive.google.com/file/d/19FyDcs68dZauQSEf6SEulJMag51SPsFy/view?usp=sharing\"\n},\n{\n \"name\": \"portrait_3\",\n \"url\": \"https://drive.google.com/file/d/1gbXjfNYE7Tvuw_riFmHMKoqPPu696VfW/view?usp=sharing\",\n\n},\n{\n \"name\": \"portrait_4\",\n \"url\": \"https://drive.google.com/file/d/1s19hYdxgfMkrnU25l6YIDq-myQr1tQMa/view?usp=sharing\"\n},\n{\n \"name\": \"portrait_5\",\n \"url\": \"https://drive.google.com/file/d/193FqIXJWAKj6O2SmOj3cLBfypHBkgdI5/view?usp=sharing\"\n}\n]\n}}"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.4
|
||||
},
|
||||
{
|
||||
"id": "8d445f73-dff7-485b-87e2-5b64da09cbf0",
|
||||
"name": "Photos To List",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
520,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "data"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "7fb3b829-88a7-42ec-abfd-3ddaa042c916",
|
||||
"name": "Download Photos",
|
||||
"type": "n8n-nodes-base.googleDrive",
|
||||
"position": [
|
||||
680,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"fileId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "={{ $json.url }}"
|
||||
},
|
||||
"options": {},
|
||||
"operation": "download"
|
||||
},
|
||||
"credentials": {
|
||||
"googleDriveOAuth2Api": {
|
||||
"id": "yOwz41gMQclOadgu",
|
||||
"name": "Google Drive account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 3
|
||||
},
|
||||
{
|
||||
"id": "b8644f6d-691f-49bc-b0fe-33a68c59638d",
|
||||
"name": "Resize For AI",
|
||||
"type": "n8n-nodes-base.editImage",
|
||||
"position": [
|
||||
1060,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"width": 1024,
|
||||
"height": 1024,
|
||||
"options": {},
|
||||
"operation": "resize",
|
||||
"resizeOption": "onlyIfLarger"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ecb266f2-0d2d-4cbe-a641-26735f0bdf18",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
280,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 594,
|
||||
"height": 438,
|
||||
"content": "## 1. Import Photos To Validate\n[Read more about using Google Drive](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive)\n\nIn this demonstration, we'll import 5 different portraits to test our AI vision model. For convenience, we'll use Google Drive but feel free to swap this out for other sources such as other storage or by using webhooks."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "a1034923-0905-4cdd-a6bf-21d28aa3dd71",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
900,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 774,
|
||||
"height": 589.25,
|
||||
"content": "## 2. Verify Passport Photo Validity Using AI Vision Model\n[Learn more about Basic LLM Chain](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.chainllm)\n\nVerifying if a photo is suitable for a passport photo is a great use-case for AI vision and to automate the process is an equally great use-case for using n8n. Here's we've pasted in the UK governments guidelines copied from gov.uk and have asked the AI to validate the incoming photos following those rules. A structured output parser is used to simplify the AI response which can be used to update a database or backend of your choosing."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "af231ee5-adff-4d27-ba5f-8c04ddd4892d",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-140,
|
||||
0
|
||||
],
|
||||
"parameters": {
|
||||
"width": 386,
|
||||
"height": 610.0104651162792,
|
||||
"content": "## Try It Out!\n\n### This workflow takes a portrait and verifies if it makes for a valid passport photo. It achieves this by using an AI vision model following the UK government guidance.\n\nOpenAI's vision model was found to perform well for understanding photographs and so is recommended for this type of workflow. However, any capable vision model should work.\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "e07e1655-2683-4e21-b2b7-e0c0bfb569c0",
|
||||
"name": "Passport Photo Validator",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainLlm",
|
||||
"position": [
|
||||
1240,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"text": "Assess if the image is a valid according to the passport photo criteria as set by the UK Government.",
|
||||
"messages": {
|
||||
"messageValues": [
|
||||
{
|
||||
"message": "=You help verify passport photo validity.\n\n## Rules for digital photos\nhttps://www.gov.uk/photos-for-passports\n\n### The quality of your digital photo\nYour photo must be:\n* clear and in focus\n* in colour\n* unaltered by computer software\n* at least 600 pixels wide and 750 pixels tall\n* at least 50KB and no more than 10MB\n\n### What your digital photo must show\nThe digital photo must:\n* contain no other objects or people\n* be taken against a plain white or light-coloured background\n* be in clear contrast to the background\n* not have ‘red eye’\n* If you’re using a photo taken on your own device, include your head, shoulders and upper body. Do not crop your photo - it will be done for you.\n\nIn your photo you must:\n* be facing forwards and looking straight at the camera\n* have a plain expression and your mouth closed\n* have your eyes open and visible\n* not have hair in front of your eyes\n* not have a head covering (unless it’s for religious or medical reasons)\n* not have anything covering your face\n* not have any shadows on your face or behind you - shadows on light background are okay\n* Do not wear glasses in your photo unless you have to do so. If you must wear glasses, they cannot be sunglasses or tinted glasses, and you must make sure your eyes are not covered by the frames or any glare, reflection or shadow.\n\n### Photos of babies and children\n* Children must be on their own in the picture. Babies must not be holding toys or using dummies.\n* Children under 6 do not have to be looking directly at the camera or have a plain expression.\n* Children under one do not have to have their eyes open. You can support their head with your hand, but your hand must not be visible in the photo.\n* Children under one should lie on a plain light-coloured sheet. Take the photo from above.\n\n"
|
||||
},
|
||||
{
|
||||
"type": "HumanMessagePromptTemplate",
|
||||
"messageType": "imageBinary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"promptType": "define",
|
||||
"hasOutputParser": true
|
||||
},
|
||||
"typeVersion": 1.4
|
||||
},
|
||||
{
|
||||
"id": "0a36ba22-90b2-4abf-943b-c1cc8e7317d5",
|
||||
"name": "Google Gemini Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
|
||||
"position": [
|
||||
1240,
|
||||
600
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"modelName": "models/gemini-1.5-pro-latest"
|
||||
},
|
||||
"credentials": {
|
||||
"googlePalmApi": {
|
||||
"id": "dSxo6ns5wn658r8N",
|
||||
"name": "Google Gemini(PaLM) Api account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Photo URLs": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Photos To List",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Resize For AI": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Passport Photo Validator",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Photos To List": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Download Photos",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Download Photos": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Resize For AI",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Google Gemini Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Passport Photo Validator",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Structured Output Parser": {
|
||||
"ai_outputParser": [
|
||||
[
|
||||
{
|
||||
"node": "Passport Photo Validator",
|
||||
"type": "ai_outputParser",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking ‘Test workflow’": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Photo URLs",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
362
Automate LinkedIn Outreach with Notion and OpenAI.txt
Normal file
362
Automate LinkedIn Outreach with Notion and OpenAI.txt
Normal file
@@ -0,0 +1,362 @@
|
||||
{
|
||||
"id": "mb2MU4xOaT3NrvqN",
|
||||
"meta": {
|
||||
"instanceId": "e7a28cc5c8c9de1976820e0f309940cf456344d9daf5360a4975186f3d8a107f",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Automate LinkedIn Posts with AI",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "7e8ec5cc-0216-4897-8a40-c44f9bbe5a9b",
|
||||
"name": "Schedule Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
580,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"triggerAtHour": 15
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "dbde804d-9c84-4023-9e05-7506cd38a460",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
760,
|
||||
225.26841303066982
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 652.1201853643956,
|
||||
"height": 542.0867486896091,
|
||||
"content": "## Fetch the day's post from my Notion database\nA Notion _\"database\"_ is just a table on a Notion Page.\nThis table will have various rows, for which a minimum of three columns are required:\n- Name\n- Status\n- Date\n\nThe Date column is the most important, which will dictate when that row from your Notion table containing the text should be posted.\n\nNOTE: each post is required to have a copy and pasted image!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "95205e81-e28d-48f9-b3fb-bcf361f7799e",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1520,
|
||||
220
|
||||
],
|
||||
"parameters": {
|
||||
"width": 860.9829802912225,
|
||||
"height": 540.7357881640437,
|
||||
"content": "## Format Post\nSend the post to OpenAI, where it will attempt to ask your assistant how to take the incoming blob of text, and soup it up into something more palpable for LinkedIn engagement."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "4bc2a550-a8ad-4b25-ac53-01413277e068",
|
||||
"name": "Set post status to \"Done\"",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
2760,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"pageId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "={{ $('query entries from Notion table for today').item.json.url }}"
|
||||
},
|
||||
"options": {},
|
||||
"resource": "databasePage",
|
||||
"operation": "update",
|
||||
"propertiesUi": {
|
||||
"propertyValues": [
|
||||
{
|
||||
"key": "Status|status",
|
||||
"statusValue": "Done"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "nBu4zRArkldtNypO",
|
||||
"name": "Notion account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "31116f06-72ca-4219-9575-8efaefbff24b",
|
||||
"name": "Post on LinkedIn",
|
||||
"type": "n8n-nodes-base.linkedIn",
|
||||
"position": [
|
||||
2500,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"text": "={{ $json.output }}",
|
||||
"person": "_RmSSZc0jB",
|
||||
"additionalFields": {},
|
||||
"shareMediaCategory": "IMAGE"
|
||||
},
|
||||
"credentials": {
|
||||
"linkedInOAuth2Api": {
|
||||
"id": "fozSa4dLS6Jgbn4e",
|
||||
"name": "LinkedIn account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "1bf0540d-a180-457a-a7d7-fb74c8119a52",
|
||||
"name": "Combine text+image",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
2100,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "f1fdf6f7-a75c-451b-8bce-ea581b4b6197",
|
||||
"name": "Fetch image from post",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1640,
|
||||
620
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.url[0] }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "00e2bbcb-bac0-4a7e-9892-59f41a26ce9d",
|
||||
"name": "Reformat Post Text",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1620,
|
||||
440
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Thank you kindly for your help, please refer to the following LinkedIn post, and output a reformatted version employing thoroughly thought-out paragraph breaks, and lists if present:\n```\n{{ $json.content.join(\" \") }}\n```",
|
||||
"prompt": "define",
|
||||
"options": {},
|
||||
"resource": "assistant",
|
||||
"assistantId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "asst_J1KuOx5wTLrjEHuy5q94jEgh",
|
||||
"cachedResultName": "LinkedIn Post Reviewer"
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "Gxn0kNMCREcTNGcB",
|
||||
"name": "OpenAi account 2"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.3
|
||||
},
|
||||
{
|
||||
"id": "119d7fc7-ed62-4a73-916e-8baf19ab1d86",
|
||||
"name": "get all content from post page",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
1020,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"blockId": {
|
||||
"__rl": true,
|
||||
"mode": "url",
|
||||
"value": "={{ $json.url }}"
|
||||
},
|
||||
"resource": "block",
|
||||
"operation": "getAll",
|
||||
"returnAll": true
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "nBu4zRArkldtNypO",
|
||||
"name": "Notion account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
},
|
||||
{
|
||||
"id": "461d4dd2-a91a-4219-bd20-6dd3398d4274",
|
||||
"name": "Pull together all text blocks + image",
|
||||
"type": "n8n-nodes-base.aggregate",
|
||||
"position": [
|
||||
1240,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldsToAggregate": {
|
||||
"fieldToAggregate": [
|
||||
{
|
||||
"fieldToAggregate": "content"
|
||||
},
|
||||
{
|
||||
"fieldToAggregate": "image.file.url"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "72052eec-c180-4da5-ba15-1a69a7ce6892",
|
||||
"name": "query entries from Notion table for today",
|
||||
"type": "n8n-nodes-base.notion",
|
||||
"position": [
|
||||
800,
|
||||
540
|
||||
],
|
||||
"parameters": {
|
||||
"filters": {
|
||||
"conditions": [
|
||||
{
|
||||
"key": "Date|date",
|
||||
"date": "={{ $today.format(\"yyyy/mM/dd\") }}",
|
||||
"condition": "equals"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {},
|
||||
"resource": "databasePage",
|
||||
"operation": "getAll",
|
||||
"databaseId": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "9aba7f55-a7de-4329-9d5b-6d127937fa49",
|
||||
"cachedResultUrl": "https://www.notion.so/9aba7f55a7de43299d5b6d127937fa49",
|
||||
"cachedResultName": "LinkedIn Posts example"
|
||||
},
|
||||
"filterType": "manual"
|
||||
},
|
||||
"credentials": {
|
||||
"notionApi": {
|
||||
"id": "nBu4zRArkldtNypO",
|
||||
"name": "Notion account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.2
|
||||
}
|
||||
],
|
||||
"active": true,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "35f9b7b6-0e60-495f-826d-af7040e7de1f",
|
||||
"connections": {
|
||||
"Post on LinkedIn": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set post status to \"Done\"",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Schedule Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "query entries from Notion table for today",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Combine text+image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Post on LinkedIn",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Reformat Post Text": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine text+image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch image from post": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Combine text+image",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"get all content from post page": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Pull together all text blocks + image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Pull together all text blocks + image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch image from post",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Reformat Post Text",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"query entries from Notion table for today": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "get all content from post page",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,527 @@
|
||||
{
|
||||
"id": "gP9EsxKN5agUGzDS",
|
||||
"meta": {
|
||||
"instanceId": "73d9d5380db181d01f4e26492c771d4cb5c4d6d109f18e2621cf49cac4c50763",
|
||||
"templateCredsSetupCompleted": true
|
||||
},
|
||||
"name": "Automate Pinterest Analysis & AI-Powered Content Suggestions With Pinterest API",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "7f582bb4-97cd-458e-a7b7-b518c5b8a4ca",
|
||||
"name": "OpenAI Chat Model",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
540,
|
||||
-260
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "95QGJD3XSz0piaNU",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "c6772882-468c-4391-a259-93e52daf49d4",
|
||||
"name": "Airtable2",
|
||||
"type": "n8n-nodes-base.airtableTool",
|
||||
"position": [
|
||||
700,
|
||||
-260
|
||||
],
|
||||
"parameters": {
|
||||
"id": "=",
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "appfsNi1QEhw6WvXK",
|
||||
"cachedResultUrl": "https://airtable.com/appfsNi1QEhw6WvXK",
|
||||
"cachedResultName": "Pinterest_Metrics"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "tbl9Dxdrwx5QZGFnp",
|
||||
"cachedResultUrl": "https://airtable.com/appfsNi1QEhw6WvXK/tbl9Dxdrwx5QZGFnp",
|
||||
"cachedResultName": "Pinterest_Organic_Data"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "0ApVmNsLu7aFzQD6",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "85ea8bec-14c8-4277-b2e3-eb145db0713a",
|
||||
"name": "OpenAI Chat Model1",
|
||||
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
|
||||
"position": [
|
||||
920,
|
||||
-280
|
||||
],
|
||||
"parameters": {
|
||||
"model": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "gpt-4o-mini"
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"credentials": {
|
||||
"openAiApi": {
|
||||
"id": "95QGJD3XSz0piaNU",
|
||||
"name": "OpenAi account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "b8f7d0d6-b58f-4a41-a15d-99f4d838bb8c",
|
||||
"name": "8:00am Morning Scheduled Trigger",
|
||||
"type": "n8n-nodes-base.scheduleTrigger",
|
||||
"position": [
|
||||
-660,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"rule": {
|
||||
"interval": [
|
||||
{
|
||||
"daysInterval": 7,
|
||||
"triggerAtHour": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 1.2
|
||||
},
|
||||
{
|
||||
"id": "593a320d-825e-42f9-8ab6-adafd5288fa5",
|
||||
"name": "Pull List of Pinterest Pins From Account",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
-340,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.pinterest.com/v5/pins",
|
||||
"options": {
|
||||
"redirect": {
|
||||
"redirect": {}
|
||||
}
|
||||
},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "Bearer "
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "1e6d00fe-2b32-4d46-a230-063254ebab74",
|
||||
"name": "Update Data Field To Include Organic",
|
||||
"type": "n8n-nodes-base.code",
|
||||
"position": [
|
||||
-20,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"jsCode": "// Initialize an array to hold the output formatted for Airtable\nconst outputItems = [];\n\nfor (const item of $input.all()) {\n if (item.json.items && Array.isArray(item.json.items)) {\n for (const subItem of item.json.items) {\n // Construct an object with only the required fields for Airtable\n outputItems.push({\n id: subItem.id || null,\n created_at: subItem.created_at || null,\n title: subItem.title || null,\n description: subItem.description || null,\n link: subItem.link || null,\n type: \"Organic\" // Assign the value \"Organic\" to the 'Type' field\n });\n }\n }\n}\n\n// Return the structured output\nreturn outputItems;\n"
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "539de144-dc67-4b14-b58e-2896edb1c3e6",
|
||||
"name": "Create Record Within Pinterest Data Table",
|
||||
"type": "n8n-nodes-base.airtable",
|
||||
"position": [
|
||||
260,
|
||||
-140
|
||||
],
|
||||
"parameters": {
|
||||
"base": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "appfsNi1QEhw6WvXK",
|
||||
"cachedResultUrl": "https://airtable.com/appfsNi1QEhw6WvXK",
|
||||
"cachedResultName": "Pinterest_Metrics"
|
||||
},
|
||||
"table": {
|
||||
"__rl": true,
|
||||
"mode": "list",
|
||||
"value": "tbl9Dxdrwx5QZGFnp",
|
||||
"cachedResultUrl": "https://airtable.com/appfsNi1QEhw6WvXK/tbl9Dxdrwx5QZGFnp",
|
||||
"cachedResultName": "Pinterest_Organic_Data"
|
||||
},
|
||||
"columns": {
|
||||
"value": {
|
||||
"link": "={{ $json.link }}",
|
||||
"type": "={{ $json.type }}",
|
||||
"title": "={{ $json.title }}",
|
||||
"pin_id": "={{ $json.id }}",
|
||||
"created_at": "={{ $json.created_at }}",
|
||||
"description": "={{ $json.description }}"
|
||||
},
|
||||
"schema": [
|
||||
{
|
||||
"id": "id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": true,
|
||||
"required": false,
|
||||
"displayName": "id",
|
||||
"defaultMatch": true
|
||||
},
|
||||
{
|
||||
"id": "pin_id",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "pin_id",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "created_at",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "created_at",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "title",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "title",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "description",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "description",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "link",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "link",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "type",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": false,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "type",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "active7DayUsers",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "active7DayUsers",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "sessions",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "sessions",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
},
|
||||
{
|
||||
"id": "userEngagementDuration",
|
||||
"type": "string",
|
||||
"display": true,
|
||||
"removed": true,
|
||||
"readOnly": false,
|
||||
"required": false,
|
||||
"displayName": "userEngagementDuration",
|
||||
"defaultMatch": false,
|
||||
"canBeUsedToMatch": true
|
||||
}
|
||||
],
|
||||
"mappingMode": "defineBelow",
|
||||
"matchingColumns": [
|
||||
"id"
|
||||
],
|
||||
"attemptToConvertTypes": false,
|
||||
"convertFieldsToString": false
|
||||
},
|
||||
"options": {},
|
||||
"operation": "upsert"
|
||||
},
|
||||
"credentials": {
|
||||
"airtableTokenApi": {
|
||||
"id": "0ApVmNsLu7aFzQD6",
|
||||
"name": "Airtable Personal Access Token account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "250f5121-437e-4bff-82af-95a156126127",
|
||||
"name": "Pinterest Analysis AI Agent",
|
||||
"type": "@n8n/n8n-nodes-langchain.agent",
|
||||
"position": [
|
||||
540,
|
||||
-440
|
||||
],
|
||||
"parameters": {
|
||||
"text": "You are a data analysis expert. You will pull data from the table and provide any information in regards to trends in the data. \n\nYour output should be suggestions of new pins that we can post to reach the target audiences. \n\nAnalyze the data and just summary of the pin suggestions that the team should build. ",
|
||||
"options": {},
|
||||
"promptType": "define"
|
||||
},
|
||||
"typeVersion": 1.7
|
||||
},
|
||||
{
|
||||
"id": "181e9d89-c0f9-4de2-bdce-9359b967157c",
|
||||
"name": "Pinterest Data Analysis Summary LLM",
|
||||
"type": "@n8n/n8n-nodes-langchain.chainSummarization",
|
||||
"position": [
|
||||
900,
|
||||
-440
|
||||
],
|
||||
"parameters": {
|
||||
"options": {
|
||||
"summarizationMethodAndPrompts": {
|
||||
"values": {
|
||||
"prompt": "=Write a concise summary of the following:\n\n\n\"{{ $json.output }}\"\n\n\nCONCISE SUMMARY:"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "432e7bd7-36b4-4903-8e93-c8bd6e140a04",
|
||||
"name": "Send Marketing Trends & Pinterest Analysis To Marketing Manager",
|
||||
"type": "n8n-nodes-base.gmail",
|
||||
"position": [
|
||||
1220,
|
||||
-440
|
||||
],
|
||||
"webhookId": "f149c1b5-c028-4dff-9d22-a72951f2ef91",
|
||||
"parameters": {
|
||||
"sendTo": "john.n.foster1@gmail.com",
|
||||
"message": "={{ $json.response.text }}",
|
||||
"options": {},
|
||||
"subject": "Pinterest Trends & Suggestions"
|
||||
},
|
||||
"credentials": {
|
||||
"gmailOAuth2": {
|
||||
"id": "pIXP1ZseBP4Z5CCp",
|
||||
"name": "Gmail account"
|
||||
}
|
||||
},
|
||||
"executeOnce": true,
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "dadfb22a-b1d3-459d-a332-5a2c52fd4ca0",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-740,
|
||||
-320
|
||||
],
|
||||
"parameters": {
|
||||
"color": 5,
|
||||
"width": 280,
|
||||
"height": 440,
|
||||
"content": "Scheduled trigger at 8:00am to start the workflow. \n\nThis can be updated to your schedule preference as an email with marketing trends can be sent to best fit one's schedule. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "3b156d97-11bf-4d8a-9bd9-c1e23a0592d8",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
-420,
|
||||
-300
|
||||
],
|
||||
"parameters": {
|
||||
"color": 6,
|
||||
"width": 860,
|
||||
"height": 360,
|
||||
"content": "Scheduled trigger begin process to gather Pinterest Pin data and store them within Airtable. This data can be referenced or analyzed accordingly. \n\n*If you would like to bring in Pinterest Ads data, the data is already labeled as Organic.\n\nThis is perfect for those who are creating content calendars to understand content scheduling."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "65586422-a631-477b-833d-5c445b1be744",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
480,
|
||||
-580
|
||||
],
|
||||
"parameters": {
|
||||
"color": 4,
|
||||
"width": 940,
|
||||
"height": 460,
|
||||
"content": "AI Agent will go through Pinterest Pins and analyze any data and trends to be able to reach target audience. The data is then summarized within the Summary LLM.\n\nThe summarized results are then sent to the Marketing Manager within an email to help lead content creation efforts. "
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "d6f64ee7-ae49-4a6b-8bf8-9a709c580357",
|
||||
"connections": {
|
||||
"Airtable2": {
|
||||
"ai_tool": [
|
||||
[
|
||||
{
|
||||
"node": "Pinterest Analysis AI Agent",
|
||||
"type": "ai_tool",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Pinterest Analysis AI Agent",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"OpenAI Chat Model1": {
|
||||
"ai_languageModel": [
|
||||
[
|
||||
{
|
||||
"node": "Pinterest Data Analysis Summary LLM",
|
||||
"type": "ai_languageModel",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Pinterest Analysis AI Agent": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Pinterest Data Analysis Summary LLM",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"8:00am Morning Scheduled Trigger": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Pull List of Pinterest Pins From Account",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Pinterest Data Analysis Summary LLM": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Send Marketing Trends & Pinterest Analysis To Marketing Manager",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Update Data Field To Include Organic": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Record Within Pinterest Data Table",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Pinterest Analysis AI Agent",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Pull List of Pinterest Pins From Account": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Update Data Field To Include Organic",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
1859
Automate Sales Meeting Prep with AI & APIFY Sent To WhatsApp.txt
Normal file
1859
Automate Sales Meeting Prep with AI & APIFY Sent To WhatsApp.txt
Normal file
File diff suppressed because it is too large
Load Diff
233
Automate Screenshots with URLbox & Analyze them with AI.txt
Normal file
233
Automate Screenshots with URLbox & Analyze them with AI.txt
Normal file
@@ -0,0 +1,233 @@
|
||||
{
|
||||
"id": "wDD4XugmHIvx3KMT",
|
||||
"meta": {
|
||||
"instanceId": "149cdf730f0c143663259ddc6124c9c26e824d8d2d059973b871074cf4bda531"
|
||||
},
|
||||
"name": "Analyze Screenshots with AI",
|
||||
"tags": [],
|
||||
"nodes": [
|
||||
{
|
||||
"id": "6d7f34b8-6203-4512-a428-7b5a18c63db6",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
240,
|
||||
1100
|
||||
],
|
||||
"parameters": {
|
||||
"width": 373.2796418305297,
|
||||
"height": 381.1230421279239,
|
||||
"content": "## Setup \n**For Testing use the Setup node to put in test name & url.**\n\nIf you want to use this workflow in production, you can expand it to load data from other sources like a DB or Google Sheet"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "ae568c65-e8f6-45bb-9c96-a870da1fc7d6",
|
||||
"name": "Setup",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
360,
|
||||
1320
|
||||
],
|
||||
"parameters": {
|
||||
"values": {
|
||||
"string": [
|
||||
{
|
||||
"name": "website_name",
|
||||
"value": "=n8n"
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"value": "https://n8n.io/"
|
||||
}
|
||||
]
|
||||
},
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "ca9f0357-a596-4453-b351-fdd8d47c81ad",
|
||||
"name": "URLbox API Request",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
780,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.urlbox.io/v1/render/sync",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendHeaders": true,
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "url",
|
||||
"value": "={{ $json.url }}"
|
||||
},
|
||||
{
|
||||
"name": "full_page",
|
||||
"value": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"headerParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"value": "YOUR_API_KEY"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"retryOnFail": true,
|
||||
"typeVersion": 4.1
|
||||
},
|
||||
{
|
||||
"id": "3caffa3c-657a-4f74-a3cb-daf7beb67890",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
640,
|
||||
920
|
||||
],
|
||||
"parameters": {
|
||||
"width": 373.2796418305297,
|
||||
"height": 381.1230421279239,
|
||||
"content": "## URLbox API call \n[URLbox](https://urlbox.com/) is a Screenshot API. With this API you can automate making screenshots based on website url's.\n\nYou have to replace the Placeholder with your API Key"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "d2b81b41-1497-4733-8130-67f8de0acff4",
|
||||
"name": "Analyze the Screenshot",
|
||||
"type": "@n8n/n8n-nodes-langchain.openAi",
|
||||
"position": [
|
||||
1220,
|
||||
1120
|
||||
],
|
||||
"parameters": {
|
||||
"text": "=Your Input is a Screenshot of a Website.\nDescribe the content of the Website in one sentence.",
|
||||
"options": {},
|
||||
"resource": "image",
|
||||
"imageUrls": "renderURL",
|
||||
"operation": "analyze"
|
||||
},
|
||||
"typeVersion": 1.1
|
||||
},
|
||||
{
|
||||
"id": "68d86931-69bb-4b78-a7fe-44969172672f",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1080,
|
||||
920
|
||||
],
|
||||
"parameters": {
|
||||
"width": 373.2796418305297,
|
||||
"height": 381.1230421279239,
|
||||
"content": "## Analyze the Screenshot \nAnalyze the screenshot using OpenAI.\n\nAdd your OpenAI Credentials on the top of the node.\n\nThe prompt is an example. Change it based on what you want to extract from the screenshot."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8a22fca5-7f06-45fb-a03f-585a7eb35b40",
|
||||
"name": "Merge Name & Description",
|
||||
"type": "n8n-nodes-base.merge",
|
||||
"position": [
|
||||
1620,
|
||||
1300
|
||||
],
|
||||
"parameters": {
|
||||
"mode": "combine",
|
||||
"options": {},
|
||||
"combinationMode": "mergeByPosition"
|
||||
},
|
||||
"typeVersion": 2.1
|
||||
},
|
||||
{
|
||||
"id": "4f902a0a-ee93-4190-9b1e-ab3fa15eb4aa",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1480,
|
||||
1200
|
||||
],
|
||||
"parameters": {
|
||||
"width": 371.85912137154685,
|
||||
"height": 300.15337596590155,
|
||||
"content": "## Merge\nMerge the description with the name of the website & the url."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8b3eb3f4-b31a-48f0-94bb-35379d07a81f",
|
||||
"name": "Manual Execution",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
20,
|
||||
1320
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"active": false,
|
||||
"pinData": {},
|
||||
"settings": {
|
||||
"executionOrder": "v1"
|
||||
},
|
||||
"versionId": "ff37faa1-c61c-44be-89f0-62f8e1b8317c",
|
||||
"connections": {
|
||||
"Setup": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "URLbox API Request",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
},
|
||||
{
|
||||
"node": "Merge Name & Description",
|
||||
"type": "main",
|
||||
"index": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Manual Execution": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Setup",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"URLbox API Request": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Analyze the Screenshot",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Analyze the Screenshot": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Merge Name & Description",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,477 @@
|
||||
{
|
||||
"meta": {
|
||||
"instanceId": "26ba763460b97c249b82942b23b6384876dfeb9327513332e743c5f6219c2b8e"
|
||||
},
|
||||
"nodes": [
|
||||
{
|
||||
"id": "6359f725-1ede-4b05-bc19-05a7e85c0865",
|
||||
"name": "When clicking \"Test workflow\"",
|
||||
"type": "n8n-nodes-base.manualTrigger",
|
||||
"position": [
|
||||
680,
|
||||
292
|
||||
],
|
||||
"parameters": {},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "9e1e61c7-f5fd-4e8a-99a6-ccc5a24f5528",
|
||||
"name": "Fetch Source Image",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1000,
|
||||
292
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $json.source_image }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "9b1b94cf-3a7d-4c43-ab6c-8df9824b5667",
|
||||
"name": "Split Out Results Only",
|
||||
"type": "n8n-nodes-base.splitOut",
|
||||
"position": [
|
||||
1428,
|
||||
323
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"fieldToSplitOut": "result"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "fcbaf6c3-2aee-4ea1-9c5e-2833dd7a9f50",
|
||||
"name": "Filter Score >= 0.9",
|
||||
"type": "n8n-nodes-base.filter",
|
||||
"position": [
|
||||
1608,
|
||||
323
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"conditions": {
|
||||
"options": {
|
||||
"leftValue": "",
|
||||
"caseSensitive": true,
|
||||
"typeValidation": "strict"
|
||||
},
|
||||
"combinator": "and",
|
||||
"conditions": [
|
||||
{
|
||||
"id": "367d83ef-8ecf-41fe-858c-9bfd78b0ae9f",
|
||||
"operator": {
|
||||
"type": "number",
|
||||
"operation": "gte"
|
||||
},
|
||||
"leftValue": "={{ $json.score }}",
|
||||
"rightValue": 0.9
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 2
|
||||
},
|
||||
{
|
||||
"id": "954ce7b0-ef82-4203-8706-17cfa5e5e3ff",
|
||||
"name": "Crop Object From Image",
|
||||
"type": "n8n-nodes-base.editImage",
|
||||
"position": [
|
||||
2080,
|
||||
432
|
||||
],
|
||||
"parameters": {
|
||||
"width": "={{ $json.box.xmax - $json.box.xmin }}",
|
||||
"height": "={{ $json.box.ymax - $json.box.ymin }}",
|
||||
"options": {
|
||||
"format": "jpeg",
|
||||
"fileName": "={{ $binary.data.fileName.split('.')[0].urlEncode()+'-'+$json.label.urlEncode() + '-' + $itemIndex }}.jpg"
|
||||
},
|
||||
"operation": "crop",
|
||||
"positionX": "={{ $json.box.xmin }}",
|
||||
"positionY": "={{ $json.box.ymin }}"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "40027456-4bf9-4eea-8d71-aa28e69b29e5",
|
||||
"name": "Set Variables",
|
||||
"type": "n8n-nodes-base.set",
|
||||
"position": [
|
||||
840,
|
||||
292
|
||||
],
|
||||
"parameters": {
|
||||
"options": {},
|
||||
"assignments": {
|
||||
"assignments": [
|
||||
{
|
||||
"id": "9e95d951-8530-4a80-bd00-6bb55623a71f",
|
||||
"name": "CLOUDFLARE_ACCOUNT_ID",
|
||||
"type": "string",
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"id": "66807a90-63a1-4d4e-886e-e8abf3019a34",
|
||||
"name": "model",
|
||||
"type": "string",
|
||||
"value": "@cf/facebook/detr-resnet-50"
|
||||
},
|
||||
{
|
||||
"id": "a13ccde6-e6e3-46f4-afa3-2134af7bc765",
|
||||
"name": "source_image",
|
||||
"type": "string",
|
||||
"value": "https://images.pexels.com/photos/2293367/pexels-photo-2293367.jpeg?auto=compress&cs=tinysrgb&w=600"
|
||||
},
|
||||
{
|
||||
"id": "0734fc55-b414-47f7-8b3e-5c880243f3ed",
|
||||
"name": "elasticsearch_index",
|
||||
"type": "string",
|
||||
"value": "n8n-image-search"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"typeVersion": 3.3
|
||||
},
|
||||
{
|
||||
"id": "c3d8c5e3-546e-472c-9e6e-091cf5cee3c3",
|
||||
"name": "Use Detr-Resnet-50 Object Classification",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1248,
|
||||
324
|
||||
],
|
||||
"parameters": {
|
||||
"url": "=https://api.cloudflare.com/client/v4/accounts/{{ $('Set Variables').item.json.CLOUDFLARE_ACCOUNT_ID }}/ai/run/{{ $('Set Variables').item.json.model }}",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"contentType": "binaryData",
|
||||
"authentication": "predefinedCredentialType",
|
||||
"inputDataFieldName": "data",
|
||||
"nodeCredentialType": "cloudflareApi"
|
||||
},
|
||||
"credentials": {
|
||||
"cloudflareApi": {
|
||||
"id": "qOynkQdBH48ofOSS",
|
||||
"name": "Cloudflare account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "3c7aa2fc-9ca1-41ba-a10d-aa5930d45f18",
|
||||
"name": "Upload to Cloudinary",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
2380,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"url": "https://api.cloudinary.com/v1_1/daglih2g8/image/upload",
|
||||
"method": "POST",
|
||||
"options": {},
|
||||
"sendBody": true,
|
||||
"sendQuery": true,
|
||||
"contentType": "multipart-form-data",
|
||||
"authentication": "genericCredentialType",
|
||||
"bodyParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "file",
|
||||
"parameterType": "formBinaryData",
|
||||
"inputDataFieldName": "data"
|
||||
}
|
||||
]
|
||||
},
|
||||
"genericAuthType": "httpQueryAuth",
|
||||
"queryParameters": {
|
||||
"parameters": [
|
||||
{
|
||||
"name": "upload_preset",
|
||||
"value": "n8n-workflows-preset"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"credentials": {
|
||||
"httpQueryAuth": {
|
||||
"id": "sT9jeKzZiLJ3bVPz",
|
||||
"name": "Cloudinary API"
|
||||
}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "3c4e1f04-a0ba-4cce-b82a-aa3eadc4e7e1",
|
||||
"name": "Create Docs In Elasticsearch",
|
||||
"type": "n8n-nodes-base.elasticsearch",
|
||||
"position": [
|
||||
2580,
|
||||
380
|
||||
],
|
||||
"parameters": {
|
||||
"indexId": "={{ $('Set Variables').item.json.elasticsearch_index }}",
|
||||
"options": {},
|
||||
"fieldsUi": {
|
||||
"fieldValues": [
|
||||
{
|
||||
"fieldId": "image_url",
|
||||
"fieldValue": "={{ $json.secure_url.replace('upload','upload/f_auto,q_auto') }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "source_image_url",
|
||||
"fieldValue": "={{ $('Set Variables').item.json.source_image }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "label",
|
||||
"fieldValue": "={{ $('Crop Object From Image').item.json.label }}"
|
||||
},
|
||||
{
|
||||
"fieldId": "metadata",
|
||||
"fieldValue": "={{ JSON.stringify(Object.assign($('Crop Object From Image').item.json, { filename: $json.original_filename })) }}"
|
||||
}
|
||||
]
|
||||
},
|
||||
"operation": "create",
|
||||
"additionalFields": {}
|
||||
},
|
||||
"credentials": {
|
||||
"elasticsearchApi": {
|
||||
"id": "dRuuhAgS7AF0mw0S",
|
||||
"name": "Elasticsearch account"
|
||||
}
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "292c9821-c123-44fa-9ba1-c37bf84079bc",
|
||||
"name": "Sticky Note",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
620,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 541.1455500767354,
|
||||
"height": 381.6388867600897,
|
||||
"content": "## 1. Get Source Image\n[Read more about setting variables for your workflow](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.set)\n\nFor this demo, we'll manually define an image to process. In production however, this image can come from a variety of sources such as drives, webhooks and more."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "863271dc-fb9d-4211-972d-6b57336073b4",
|
||||
"name": "Sticky Note1",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1180,
|
||||
80
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 579.7748008857744,
|
||||
"height": 437.4680103498263,
|
||||
"content": "## 2. Use Detr-Resnet-50 Object Classification\n[Learn more about Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/)\n\nNot all AI workflows need an LLM! As in this example, we're using a non-LLM vision model to parse the source image and return what objects are contained within. The image search feature we're building will be based on the objects in the image making for a much more granular search via object association.\n\nWe'll use the Cloudflare Workers AI service which conveniently provides this model via API use."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "b73b45da-0436-4099-b538-c6b3b84822f2",
|
||||
"name": "Sticky Note2",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1800,
|
||||
260
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 466.35460775498495,
|
||||
"height": 371.9272151757119,
|
||||
"content": "## 3. Crop Objects Out of Source Image\n[Read more about Editing Images in n8n](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.editimage)\n\nWith our objects identified by their bounding boxes, we can \"cut\" them out of the source image as separate images."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "465bd842-8a35-49d8-a9ff-c30d164620db",
|
||||
"name": "Sticky Note3",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
2300,
|
||||
180
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 478.20345439832454,
|
||||
"height": 386.06196032653685,
|
||||
"content": "## 4. Index Object Images In ElasticSearch\n[Read more about using ElasticSearch](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.elasticsearch)\n\nBy storing the newly created object images externally and indexing them in Elasticsearch, we now have a foundation for our Image Search service which queries by object association."
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "6a04b4b5-7830-410d-9b5b-79acb0b1c78b",
|
||||
"name": "Sticky Note4",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
1800,
|
||||
-220
|
||||
],
|
||||
"parameters": {
|
||||
"color": 7,
|
||||
"width": 328.419768654291,
|
||||
"height": 462.65463700396174,
|
||||
"content": "Fig 1. Result of Classification\n"
|
||||
},
|
||||
"typeVersion": 1
|
||||
},
|
||||
{
|
||||
"id": "8f607951-ba41-4362-8323-e8b4b96ad122",
|
||||
"name": "Fetch Source Image Again",
|
||||
"type": "n8n-nodes-base.httpRequest",
|
||||
"position": [
|
||||
1880,
|
||||
432
|
||||
],
|
||||
"parameters": {
|
||||
"url": "={{ $('Set Variables').item.json.source_image }}",
|
||||
"options": {}
|
||||
},
|
||||
"typeVersion": 4.2
|
||||
},
|
||||
{
|
||||
"id": "6933f67d-276b-4908-8602-654aa352a68b",
|
||||
"name": "Sticky Note8",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
220,
|
||||
120
|
||||
],
|
||||
"parameters": {
|
||||
"width": 359.6648027457353,
|
||||
"height": 352.41026669883723,
|
||||
"content": "## Try It Out!\n### This workflow does the following:\n* Downloads an image\n* Uses an object classification AI model to identify objects in the image.\n* Crops the objects out from the original image into new image files.\n* Indexes the image's object in an Elasticsearch Database to enable image search.\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
|
||||
},
|
||||
{
|
||||
"id": "35615ed5-43e8-43f0-95fe-1f95a1177d69",
|
||||
"name": "Sticky Note5",
|
||||
"type": "n8n-nodes-base.stickyNote",
|
||||
"position": [
|
||||
800,
|
||||
280
|
||||
],
|
||||
"parameters": {
|
||||
"width": 172.9365918827757,
|
||||
"height": 291.6881468483679,
|
||||
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n🚨**Required**\n* Set your variables here first!"
|
||||
},
|
||||
"typeVersion": 1
|
||||
}
|
||||
],
|
||||
"pinData": {},
|
||||
"connections": {
|
||||
"Set Variables": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Source Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Source Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Use Detr-Resnet-50 Object Classification",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Filter Score >= 0.9": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Fetch Source Image Again",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Upload to Cloudinary": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Create Docs In Elasticsearch",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Crop Object From Image": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Upload to Cloudinary",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Split Out Results Only": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Filter Score >= 0.9",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Fetch Source Image Again": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Crop Object From Image",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"When clicking \"Test workflow\"": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Set Variables",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"Use Detr-Resnet-50 Object Classification": {
|
||||
"main": [
|
||||
[
|
||||
{
|
||||
"node": "Split Out Results Only",
|
||||
"type": "main",
|
||||
"index": 0
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user