-
-
Save alnutile/0847b02bb72f006a8ad4b9280e3ec5ff to your computer and use it in GitHub Desktop.
From the YouTube Video here https://youtu.be/m6GwIIDR-oc?si=g-yU1-qT6CV2ADEt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nodes": [ | |
| { | |
| "parameters": {}, | |
| "type": "n8n-nodes-base.manualTrigger", | |
| "typeVersion": 1, | |
| "position": [ | |
| 848, | |
| 208 | |
| ], | |
| "id": "55695786-a78d-47d0-a659-0e993de45c14", | |
| "name": "When clicking ‘Execute workflow’" | |
| }, | |
| { | |
| "parameters": { | |
| "operation": "getAllPeople" | |
| }, | |
| "type": "n8n-nodes-base.n8nTrainingCustomerDatastore", | |
| "typeVersion": 1, | |
| "position": [ | |
| -176, | |
| -128 | |
| ], | |
| "id": "a0e365e0-aa26-45da-bdd3-b04fee9eb30a", | |
| "name": "Customer Datastore (n8n training)" | |
| }, | |
| { | |
| "parameters": { | |
| "content": "Aggregate", | |
| "height": 80, | |
| "width": 1024 | |
| }, | |
| "type": "n8n-nodes-base.stickyNote", | |
| "position": [ | |
| -432, | |
| -288 | |
| ], | |
| "typeVersion": 1, | |
| "id": "54848d6f-9450-4e03-92b5-63afdae847d4", | |
| "name": "Sticky Note" | |
| }, | |
| { | |
| "parameters": { | |
| "promptType": "define", | |
| "text": "={{ $json.toJsonString() }}", | |
| "options": { | |
| "systemMessage": "Summarize the data for me" | |
| } | |
| }, | |
| "type": "@n8n/n8n-nodes-langchain.agent", | |
| "typeVersion": 2.2, | |
| "position": [ | |
| 144, | |
| -128 | |
| ], | |
| "id": "63c69204-7d9c-44dd-8ee5-1c7710ab80d0", | |
| "name": "AI Agent" | |
| }, | |
| { | |
| "parameters": { | |
| "model": { | |
| "__rl": true, | |
| "mode": "list", | |
| "value": "gpt-4.1-mini" | |
| }, | |
| "options": {} | |
| }, | |
| "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi", | |
| "typeVersion": 1.2, | |
| "position": [ | |
| 208, | |
| 48 | |
| ], | |
| "id": "2cf21787-b974-4b70-9f35-69a619ceeadc", | |
| "name": "OpenAI Chat Model", | |
| "credentials": { | |
| "openAiApi": { | |
| "id": "Omenma31PjmcBAWV", | |
| "name": "OpenAi account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "aggregate": "aggregateAllItemData", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.aggregate", | |
| "typeVersion": 1, | |
| "position": [ | |
| -16, | |
| -128 | |
| ], | |
| "id": "514e54b0-eb1e-4911-b6ca-21cf9a120fd5", | |
| "name": "Aggregate" | |
| }, | |
| { | |
| "parameters": { | |
| "operation": "getAllPeople" | |
| }, | |
| "type": "n8n-nodes-base.n8nTrainingCustomerDatastore", | |
| "typeVersion": 1, | |
| "position": [ | |
| -192, | |
| 496 | |
| ], | |
| "id": "19598a84-8726-4207-b961-06caae6d8c89", | |
| "name": "Customer Datastore (n8n training)1" | |
| }, | |
| { | |
| "parameters": { | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.splitInBatches", | |
| "typeVersion": 3, | |
| "position": [ | |
| 0, | |
| 496 | |
| ], | |
| "id": "67a20838-5773-4afa-b0f1-003f2693ebdb", | |
| "name": "Loop Over Items" | |
| }, | |
| { | |
| "parameters": { | |
| "aggregate": "aggregateAllItemData", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.aggregate", | |
| "typeVersion": 1, | |
| "position": [ | |
| 256, | |
| 464 | |
| ], | |
| "id": "49b81027-3615-4b3d-a9fd-9cd3bcd46af5", | |
| "name": "Aggregate1" | |
| }, | |
| { | |
| "parameters": { | |
| "assignments": { | |
| "assignments": [ | |
| { | |
| "id": "8c20e717-a16c-492a-951a-0e2801d4428f", | |
| "name": "created", | |
| "value": "={{ DateTime.fromISO($json.created).format('dd-MM-yyyy') }}", | |
| "type": "string" | |
| } | |
| ] | |
| }, | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.set", | |
| "typeVersion": 3.4, | |
| "position": [ | |
| 256, | |
| 640 | |
| ], | |
| "id": "cb243854-9296-4f2b-b53c-70af02b86bcf", | |
| "name": "Edit Fields" | |
| }, | |
| { | |
| "parameters": { | |
| "fromEmail": "info@dailyai.studio", | |
| "toEmail": "info@dailyai.studio", | |
| "subject": "Hello from a Loop", | |
| "html": "={{ $json.data.toJsonString() }}", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.emailSend", | |
| "typeVersion": 2.1, | |
| "position": [ | |
| 448, | |
| 464 | |
| ], | |
| "id": "963f674b-a6b0-4893-9e88-9042705e20bb", | |
| "name": "Send email", | |
| "webhookId": "1a954892-fc41-4f85-a8d9-135e563c81cb", | |
| "credentials": { | |
| "smtp": { | |
| "id": "CAoCRPPYeqIZKVjV", | |
| "name": "SMTP account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "content": "Split", | |
| "height": 80, | |
| "width": 1024, | |
| "color": 5 | |
| }, | |
| "type": "n8n-nodes-base.stickyNote", | |
| "position": [ | |
| 832, | |
| -272 | |
| ], | |
| "typeVersion": 1, | |
| "id": "501cd738-79f1-434b-8966-e2844d9b5e3b", | |
| "name": "Sticky Note1" | |
| }, | |
| { | |
| "parameters": { | |
| "url": "https://serpapi.com/search?engine=google_trends&q=n8n&data_type=RELATED_TOPICS", | |
| "authentication": "predefinedCredentialType", | |
| "nodeCredentialType": "serpApi", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.httpRequest", | |
| "typeVersion": 4.2, | |
| "position": [ | |
| 1088, | |
| -64 | |
| ], | |
| "id": "816b57d8-f334-4ca4-b622-2333faa0ac81", | |
| "name": "HTTP Request", | |
| "credentials": { | |
| "serpApi": { | |
| "id": "geKD6AOPb6LA2513", | |
| "name": "SerpAPI account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "fieldToSplitOut": "related_topics.rising", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.splitOut", | |
| "typeVersion": 1, | |
| "position": [ | |
| 1296, | |
| -64 | |
| ], | |
| "id": "3b6f8b27-9802-4a8a-a62b-22dd92c945a4", | |
| "name": "Split Out" | |
| }, | |
| { | |
| "parameters": { | |
| "modelId": { | |
| "__rl": true, | |
| "value": "gpt-4.1", | |
| "mode": "list", | |
| "cachedResultName": "GPT-4.1" | |
| }, | |
| "messages": { | |
| "values": [ | |
| { | |
| "content": "=Create a list of quotes random ones \n\noutput the data as JSON\n\n### FORMAT\n[\n {\n \"quote\": \"<string>\",\n \"by: \"<string>\"\n },\n {\n \"quote\": \"<string>\",\n \"by: \"<string>\"\n }\n]\n\n\n\n" | |
| } | |
| ] | |
| }, | |
| "jsonOutput": true, | |
| "options": {} | |
| }, | |
| "type": "@n8n/n8n-nodes-langchain.openAi", | |
| "typeVersion": 1.8, | |
| "position": [ | |
| 1088, | |
| 208 | |
| ], | |
| "id": "ffadea9e-7b20-454d-892c-fd226e913bb3", | |
| "name": "Message a model", | |
| "credentials": { | |
| "openAiApi": { | |
| "id": "Omenma31PjmcBAWV", | |
| "name": "OpenAi account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "fieldToSplitOut": "message.content.quotes", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.splitOut", | |
| "typeVersion": 1, | |
| "position": [ | |
| 1408, | |
| 208 | |
| ], | |
| "id": "d9236654-b21c-4790-b850-7ea3cf8ebe9b", | |
| "name": "Split Out1" | |
| }, | |
| { | |
| "parameters": { | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.splitInBatches", | |
| "typeVersion": 3, | |
| "position": [ | |
| 1504, | |
| -64 | |
| ], | |
| "id": "7c4d42e4-c80b-4a81-af75-c69d8bcb915c", | |
| "name": "Loop Over Items1" | |
| }, | |
| { | |
| "parameters": {}, | |
| "type": "n8n-nodes-base.noOp", | |
| "name": "Replace Me", | |
| "typeVersion": 1, | |
| "position": [ | |
| 1696, | |
| 0 | |
| ], | |
| "id": "67878267-6160-422f-b0da-85c43966cb65" | |
| }, | |
| { | |
| "parameters": { | |
| "inputSource": "passthrough" | |
| }, | |
| "type": "n8n-nodes-base.executeWorkflowTrigger", | |
| "typeVersion": 1.1, | |
| "position": [ | |
| 96, | |
| 1088 | |
| ], | |
| "id": "7a6e3afc-2eb5-4d8a-87c8-b9c94dbfb55d", | |
| "name": "When Executed by Another Workflow" | |
| }, | |
| { | |
| "parameters": { | |
| "modelId": { | |
| "__rl": true, | |
| "value": "gpt-4.1", | |
| "mode": "list", | |
| "cachedResultName": "GPT-4.1" | |
| }, | |
| "messages": { | |
| "values": [ | |
| { | |
| "content": "=Create a list of quotes random ones \n\noutput the data as JSON\n\n### FORMAT\n[\n {\n \"quote\": \"<string>\",\n \"by: \"<string>\"\n },\n {\n \"quote\": \"<string>\",\n \"by: \"<string>\"\n }\n]\n\n\n\n" | |
| } | |
| ] | |
| }, | |
| "jsonOutput": true, | |
| "options": {} | |
| }, | |
| "type": "@n8n/n8n-nodes-langchain.openAi", | |
| "typeVersion": 1.8, | |
| "position": [ | |
| 352, | |
| 1088 | |
| ], | |
| "id": "b76d254a-93b4-4921-9436-58a991a27d44", | |
| "name": "Message a model1", | |
| "credentials": { | |
| "openAiApi": { | |
| "id": "Omenma31PjmcBAWV", | |
| "name": "OpenAi account" | |
| } | |
| } | |
| }, | |
| { | |
| "parameters": { | |
| "fieldToSplitOut": "message.content.quotes", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.splitOut", | |
| "typeVersion": 1, | |
| "position": [ | |
| 832, | |
| 1088 | |
| ], | |
| "id": "1b1876f7-0744-44f0-8fa4-9a04d1eca425", | |
| "name": "Split Out2" | |
| }, | |
| { | |
| "parameters": { | |
| "aggregate": "aggregateAllItemData", | |
| "options": {} | |
| }, | |
| "type": "n8n-nodes-base.aggregate", | |
| "typeVersion": 1, | |
| "position": [ | |
| 1136, | |
| 1216 | |
| ], | |
| "id": "9c72c066-acce-442d-92ab-07fd7379f119", | |
| "name": "Aggregate2" | |
| } | |
| ], | |
| "connections": { | |
| "When clicking ‘Execute workflow’": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Message a model", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Customer Datastore (n8n training)": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Aggregate", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "OpenAI Chat Model": { | |
| "ai_languageModel": [ | |
| [ | |
| { | |
| "node": "AI Agent", | |
| "type": "ai_languageModel", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Aggregate": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "AI Agent", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Customer Datastore (n8n training)1": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Loop Over Items", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Loop Over Items": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Aggregate1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ], | |
| [ | |
| { | |
| "node": "Edit Fields", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Aggregate1": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Send email", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Edit Fields": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Loop Over Items", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "HTTP Request": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Split Out", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Split Out": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Loop Over Items1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Message a model": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Split Out1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Loop Over Items1": { | |
| "main": [ | |
| [], | |
| [ | |
| { | |
| "node": "Replace Me", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Replace Me": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Loop Over Items1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "When Executed by Another Workflow": { | |
| "main": [ | |
| [ | |
| { | |
| "node": "Message a model1", | |
| "type": "main", | |
| "index": 0 | |
| } | |
| ] | |
| ] | |
| }, | |
| "Message a model1": { | |
| "main": [ | |
| [] | |
| ] | |
| }, | |
| "Split Out2": { | |
| "main": [ | |
| [] | |
| ] | |
| } | |
| }, | |
| "pinData": { | |
| "Message a model": [ | |
| { | |
| "index": 0, | |
| "message": { | |
| "role": "assistant", | |
| "content": { | |
| "quotes": [ | |
| { | |
| "quote": "Success is not final, failure is not fatal: It is the courage to continue that counts.", | |
| "by": "Winston Churchill" | |
| }, | |
| { | |
| "quote": "The only way to do great work is to love what you do.", | |
| "by": "Steve Jobs" | |
| }, | |
| { | |
| "quote": "In the end, we will remember not the words of our enemies, but the silence of our friends.", | |
| "by": "Martin Luther King Jr." | |
| }, | |
| { | |
| "quote": "Do not let what you cannot do interfere with what you can do.", | |
| "by": "John Wooden" | |
| }, | |
| { | |
| "quote": "You miss 100% of the shots you don't take.", | |
| "by": "Wayne Gretzky" | |
| } | |
| ] | |
| }, | |
| "refusal": null, | |
| "annotations": [] | |
| }, | |
| "logprobs": null, | |
| "finish_reason": "stop" | |
| } | |
| ], | |
| "Message a model1": [ | |
| { | |
| "index": 0, | |
| "message": { | |
| "role": "assistant", | |
| "content": { | |
| "quotes": [ | |
| { | |
| "quote": "Success is not final, failure is not fatal: It is the courage to continue that counts.", | |
| "by": "Winston Churchill" | |
| }, | |
| { | |
| "quote": "The only way to do great work is to love what you do.", | |
| "by": "Steve Jobs" | |
| }, | |
| { | |
| "quote": "In the end, we will remember not the words of our enemies, but the silence of our friends.", | |
| "by": "Martin Luther King Jr." | |
| }, | |
| { | |
| "quote": "Do not let what you cannot do interfere with what you can do.", | |
| "by": "John Wooden" | |
| }, | |
| { | |
| "quote": "You miss 100% of the shots you don't take.", | |
| "by": "Wayne Gretzky" | |
| } | |
| ] | |
| }, | |
| "refusal": null, | |
| "annotations": [] | |
| }, | |
| "logprobs": null, | |
| "finish_reason": "stop" | |
| } | |
| ] | |
| }, | |
| "meta": { | |
| "templateCredsSetupCompleted": true, | |
| "instanceId": "82e467753c0096d0f657d9f933f25d2cdc3458651ded6aceefccd7a74be42bab" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment