`{
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
-60,
640
],
"id": "cc0f591b-2d74-42ea-ae89-4a20cbcd8817",
"name": "Schedule Trigger",
"notes": "This is the interval I want to run for the calendar. "
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-140,
-440
],
"id": "29f4b9ad-b4f6-4b54-aeea-23b6db5284d2",
"name": "Sticky Note1"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
140,
-440
],
"id": "21697987-9b8b-438e-8c42-bda6aac50910",
"name": "Sticky Note2"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
340,
-440
],
"id": "70140759-8b87-49f8-a118-7be0d299aa54",
"name": "Sticky Note3"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
520,
-440
],
"id": "d4df94f6-2aaa-4bfd-a6b2-0c1da5988078",
"name": "Sticky Note4"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
740,
-440
],
"id": "7e8bfc22-f5a4-4894-98fc-c22c58b5b5e9",
"name": "Sticky Note5"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
1140,
-440
],
"id": "a40539e3-8e28-4966-a9e8-f8ced954c24a",
"name": "Sticky Note6"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-140,
-320
],
"id": "92900a6b-82ef-43ae-9428-8d7d009eb8a3",
"name": "Sticky Note7"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
140,
-320
],
"id": "708135e8-5d33-4fa8-843f-428bf72330a3",
"name": "Sticky Note8"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
420,
-320
],
"id": "d607b719-03e8-472b-84ac-f0963eab2cb6",
"name": "Sticky Note9"
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
700,
-320
],
"id": "c5715cd7-c5cb-4868-9af3-16a972942304",
"name": "Sticky Note10"
},
{
"parameters": {
"calendar": {
"__rl": true,
"mode": "list",
"value": ""
},
"additionalFields": {}
},
"type": "n8n-nodes-base.googleCalendar",
"typeVersion": 1.3,
"position": [
1180,
180
],
"id": "3fc3d656-52ba-4075-bda3-8c9637c9fae6",
"name": "Google Calendar",
"credentials": {
"googleCalendarOAuth2Api": {
"id": "JmpfxleGSuPotpAA",
"name": "Google Calendar account"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
40
],
"typeVersion": 1,
"id": "f7c9f214-1aa4-45df-9e7e-cfec79a35254",
"name": "Sticky Note"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
160,
160
],
"id": "9e62dcfd-b849-40f5-a28b-572fb339f1f4",
"name": "Get Weather"
},
{
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": ""
},
"messages": {
"values": [
{}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
540,
720
],
"id": "d32e2bd2-2074-476c-ba20-91d96d821b9d",
"name": "OpenAI",
"credentials": {
"openAiApi": {
"id": "AeJfyAuSnNzv7fHQ",
"name": "OpenAi account"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
300,
840
],
"id": "eb841a99-ed23-4483-9fc7-8b873df232af",
"name": "HTML"
},
{
"parameters": {
"options": {}
},
"name": "Seafood Meals",
"type": "n8n-nodes-base.httpRequest",
"position": [
580,
160
],
"typeVersion": 1,
"id": "98a46ea7-b4df-41bd-8887-28ff93714438",
"alwaysOutputData": false,
"executeOnce": false,
"notes": "https://spoonacular.com/food-api/docs"
},
{
"parameters": {
"options": {}
},
"name": "Chicken Meals",
"type": "n8n-nodes-base.httpRequest",
"position": [
380,
160
],
"typeVersion": 1,
"id": "08900b29-452a-4d8a-a054-8b6e058f02f2",
"alwaysOutputData": false,
"executeOnce": false,
"notes": "https://spoonacular.com/food-api/docs"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1560,
200
],
"id": "a94349bb-9381-4041-9e08-0f31c7a6f62c",
"name": "Movie Data"
},
{
"parameters": {
"options": {}
},
"name": "Vegan Meals",
"type": "n8n-nodes-base.httpRequest",
"position": [
780,
160
],
"typeVersion": 1,
"id": "32e49d68-2a84-498f-a5a7-a08341762331",
"alwaysOutputData": false,
"executeOnce": false,
"notes": "https://spoonacular.com/food-api/docs"
},
{
"parameters": {},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
240,
480
],
"id": "4b0acd0d-1d66-4251-86f7-76fcbf32e9d4",
"name": "Merge Protein"
},
{
"parameters": {},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
400,
480
],
"id": "04a1255b-8aba-4697-938e-f471b15ad81c",
"name": "Merge Vegan"
},
{
"parameters": {},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
960,
180
],
"id": "e95e5c55-ee7c-4c4f-8982-029c2bf90efd",
"name": "Trail Data"
},
{
"parameters": {},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1320,
180
],
"id": "06f8363c-74ce-4d7f-9453-37ffbb0db21c",
"name": "Code"
},
{
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": ""
},
"messages": {
"values": [
{}
]
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
620,
480
],
"id": "556d753e-1b9e-495f-9d04-5fdfa6856297",
"name": "OpenAI1",
"credentials": {
"openAiApi": {
"id": "AeJfyAuSnNzv7fHQ",
"name": "OpenAi account"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
980,
480
],
"id": "835b4cb3-31b4-467c-b256-e9e34b3e122b",
"name": "transform meal data"
},
{
"parameters": {
"jsCode": "const groceries = $input.first().json.groceries;\nconst categories = new Map();\n \nfor (const item of groceries) { \nconst { category, name } = item;\n if(!categories.has(category)) {\n categories.set(category, [name]) \n } else {\n const catArr = categories.get(category);\n catArr.push(name);\n categories.set(category, catArr)\n }\n}\n\nreturn Object.fromEntries(categories);"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1200,
480
],
"id": "64eda01b-ab2f-4ff9-9a82-5662831bf742",
"name": "Code1"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.httpRequestTool",
"typeVersion": 4.2,
"position": [
640,
940
],
"id": "17d8985b-c2cd-4021-b20a-65cccaa17eec",
"name": "HTTP Request"
}
],
"connections": {
"Schedule Trigger": {
"main": [
[]
]
},
"Google Calendar": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Get Weather": {
"main": [
[]
]
},
"OpenAI": {
"main": [
[]
]
},
"HTML": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
},
"Seafood Meals": {
"main": [
[
{
"node": "Merge Protein",
"type": "main",
"index": 0
}
]
]
},
"Chicken Meals": {
"main": [
[
{
"node": "Merge Protein",
"type": "main",
"index": 1
}
]
]
},
"Vegan Meals": {
"main": [
[
{
"node": "Merge Vegan",
"type": "main",
"index": 0
}
]
]
},
"Merge Protein": {
"main": [
[
{
"node": "Merge Vegan",
"type": "main",
"index": 1
}
]
]
},
"Merge Vegan": {
"main": [
[
{
"node": "OpenAI1",
"type": "main",
"index": 0
}
]
]
},
"Trail Data": {
"main": [
[]
]
},
"OpenAI1": {
"main": [
[
{
"node": "transform meal data",
"type": "main",
"index": 0
}
]
]
},
"transform meal data": {
"main": [
[
{
"node": "Code1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"ai_tool": [
[
{
"node": "OpenAI",
"type": "ai_tool",
"index": 0
}
]
]
}
},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "255f1aee8fd518c87538f98862253d9ed0d9a434c48cddc014938c77dffdd95f"
}
}
`