feat: add folder support for workflows (fixes #70)

This commit is contained in:
Praveen Mudalgeri
2025-08-05 09:40:47 +05:30
parent 307d530f9b
commit c4885eee92
2057 changed files with 985290 additions and 974268 deletions

View File

@@ -0,0 +1,55 @@
{
"nodes": [
{
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
450,
150
],
"parameters": {
"options": {
"responseHeaders": {
"entries": [
{
"name": "Content-Type",
"value": "text/html; charset=UTF-8"
}
]
}
},
"respondWith": "text",
"responseBody": "<!doctype html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\n <link href=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3\" crossorigin=\"anonymous\">\n\n <title>Hello, world!</title>\n </head>\n <body>\n <h1>Hello, world!</h1>\n\n <script src=\"https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js\" integrity=\"sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p\" crossorigin=\"anonymous\"></script>\n </body>\n</html>\n"
},
"typeVersion": 1
},
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
250,
150
],
"webhookId": "db437850-0e90-4eb7-b383-f8438ea1bd66",
"parameters": {
"path": "my-form",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 1
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,104 @@
{
"nodes": [
{
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
340,
0
],
"webhookId": "c1616754-4dec-4b00-a8b5-d1cb5f75bf11",
"parameters": {
"path": "c1616754-4dec-4b00-a8b5-d1cb5f75bf11",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 1
},
{
"name": "Item Lists",
"type": "n8n-nodes-base.itemLists",
"position": [
560,
0
],
"parameters": {
"options": {},
"fieldToSplitOut": "=body"
},
"typeVersion": 1
},
{
"name": "Spreadsheet File",
"type": "n8n-nodes-base.spreadsheetFile",
"position": [
780,
0
],
"parameters": {
"options": {},
"operation": "toFile",
"fileFormat": "xlsx"
},
"typeVersion": 1
},
{
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1020,
0
],
"parameters": {
"options": {
"responseHeaders": {
"entries": [
{
"name": "content-disposition",
"value": "=attachment; filename=\"{{$node[\"Webhook\"].json[\"query\"][\"filename\"]? $node[\"Webhook\"].json[\"query\"][\"filename\"] : \"Export\"}}.xlsx\""
}
]
}
},
"respondWith": "binary"
},
"typeVersion": 1
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Item Lists",
"type": "main",
"index": 0
}
]
]
},
"Item Lists": {
"main": [
[
{
"node": "Spreadsheet File",
"type": "main",
"index": 0
}
]
]
},
"Spreadsheet File": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,147 @@
{
"nodes": [
{
"name": "Function",
"type": "n8n-nodes-base.function",
"position": [
-280,
-80
],
"parameters": {
"functionCode": "// Code here will run only once, no matter how many input items there are.\n// More info and help: https://docs.n8n.io/nodes/n8n-nodes-base.function\n\n// Loop over inputs and add a new field called 'myNewField' to the JSON of each one\nc_id = items[0].json.headers['x-adobesign-clientid'];\n\nfor (item of items) {\n item.json.myNewField = 1;\n item.json.clientID = c_id;\n}\n\nreturn items;"
},
"typeVersion": 1
},
{
"name": "POST",
"type": "n8n-nodes-base.webhook",
"position": [
-540,
-160
],
"webhookId": "dfe2a7a8-c0f7-41e1-9bf7-15e2b6e98741",
"parameters": {
"path": "test1",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 1
},
{
"name": "reg-GET",
"type": "n8n-nodes-base.webhook",
"position": [
-540,
20
],
"webhookId": "5356a36b-1090-4470-ad87-7cfdb6c18daf",
"parameters": {
"path": "test1",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 1
},
{
"name": "webhook-response",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
-100,
-80
],
"parameters": {
"options": {
"responseHeaders": {
"entries": [
{
"name": "x-adobesign-clientid",
"value": "={{$node[\"Function\"].json[\"clientID\"]}}"
}
]
}
}
},
"typeVersion": 1
},
{
"name": "SetWebhookData",
"type": "n8n-nodes-base.set",
"position": [
60,
-80
],
"parameters": {
"values": {
"string": [
{
"name": "webhookData",
"value": "={{ $item(\"0\").$node[\"webhook-response\"].json[\"body\"] }}"
},
{
"name": "agreement_ID",
"value": "={{ $item(\"0\").$node[\"webhook-response\"].json[\"body\"][\"agreement\"][\"id\"] }}"
},
{
"name": "all_participants",
"value": "={{ $item(\"0\").$node[\"webhook-response\"].json[\"body\"][\"agreement\"][\"participantSetsInfo\"] }}"
},
{
"name": "agreement_status",
"value": "={{ $item(\"0\").$node[\"webhook-response\"].json[\"body\"][\"agreement\"][\"status\"] }}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
}
],
"connections": {
"POST": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"reg-GET": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "webhook-response",
"type": "main",
"index": 0
}
]
]
},
"webhook-response": {
"main": [
[
{
"node": "SetWebhookData",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,114 @@
{
"meta": {
"instanceId": "8c8c5237b8e37b006a7adce87f4369350c58e41f3ca9de16196d3197f69eabcd"
},
"nodes": [
{
"id": "f80aceed-b676-42aa-bf25-f7a44408b1bc",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
375,
115
],
"webhookId": "6f7b288e-1efe-4504-a6fd-660931327269",
"parameters": {
"path": "6f7b288e-1efe-4504-a6fd-660931327269",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 1
},
{
"id": "3b9ec913-0bbe-4906-bf8e-da352b556655",
"name": "Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
355,
-25
],
"parameters": {
"width": 600,
"height": 280,
"content": "## Create a simple API endpoint\n\nIn this workflow we show how to create a simple API endpoint with `Webhook` and `Respond to Webhook` nodes\n\n"
},
"typeVersion": 1
},
{
"id": "9c36dae5-0700-450c-9739-e9f3eff31bfe",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
815,
115
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "=The URL of the Google search query for the term \"{{$node[\"Webhook\"].json[\"query\"][\"first_name\"]}} {{$node[\"Webhook\"].json[\"query\"][\"last_name\"]}}\" is: {{$json[\"product\"]}}"
},
"typeVersion": 1
},
{
"id": "5a228fcb-78b9-4a28-95d2-d7c9fdf1d4ea",
"name": "Create URL string",
"type": "n8n-nodes-base.set",
"position": [
595,
115
],
"parameters": {
"values": {
"string": [
{
"name": "product",
"value": "=https://www.google.com/search?q={{$json[\"query\"][\"first_name\"]}}+{{$json[\"query\"][\"last_name\"]}}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"id": "e7971820-45a8-4dc8-ba4c-b3220d65307a",
"name": "Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
355,
275
],
"parameters": {
"width": 600,
"height": 220,
"content": "### How to use it\n1. Execute the workflow so that the webhook starts listening\n2. Make a test request by pasting, **in a new browser tab**, the test URL from the `Webhook` node and appending the following test at the end `?first_name=bob&last_name=dylan`\n\nYou will receive the following output in the new tab `The URL of the Google search query for the term \"bob dylan\" is: https://www.google.com/search?q=bob+dylan`\n\n"
},
"typeVersion": 1
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Create URL string",
"type": "main",
"index": 0
}
]
]
},
"Create URL string": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,716 @@
{
"nodes": [
{
"id": "6abe578b-d503-4da5-9af8-f9977de71139",
"name": "Vivid Pop Explosion",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
980
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=rule of thirds, golden ratio, hyper-maximalist, vibrant neon, high-contrast, octane render, photorealism, 8k ::7 --ar 16:9 --s 1000\n\nDesign a fun, energetic scene filled with bold, neon colors, and playful shapes that pop off the screen. The image should evoke a sense of joy and movement, using fluid, organic forms and exaggerated, cartoon-like proportions. Focus on creating a lively atmosphere with contrasting, saturated tones and dynamic lighting. Use a mix of asymmetrical and balanced compositions to create a playful visual flow. Render in 8K with a hyper-maximalist approach using Octane Render for vibrant, high-gloss textures and photorealistic lighting effects. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "7de1ea42-3b18-4bfb-8ea4-a8b6c8d16763",
"name": "AI Dystopia",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
620
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=golden ratio, rule of thirds, cyberpunk, glitch art, octane render, cinematic realism, 8k ::7 --ar 16:9 --s 1000\n\nGenerate a futuristic, cyberpunk dystopia with metallic textures, digital glitches, and neon lights. Blend cold, dystopian structures with traces of organic life. Use photorealistic lighting and dynamic reflections to enhance the visual depth of the scene. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "aa17c288-78e0-48d9-9c60-0e63e351d0b6",
"name": "Post-Analog Glitchscape",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
420
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=rule of thirds, asymmetric composition, glitch art, pixelation, VHS noise, octane render, unreal engine, 8k ::7 --ar 16:9 --s 1200\nDesign a glitchy, post-analog world with digital decay and broken visuals. Utilize pixelated elements, VHS noise, and neon glitches to create a fragmented aesthetic. Use bold, contrasting colors against muted backgrounds for a high-contrast, otherworldly feel. The composition should follow asymmetrical rules, focusing on chaotic yet intentional visual balance. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "769ff46c-630f-456d-ae19-4c6496270fda",
"name": "Neon Fauvism",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
800
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=asymmetric composition, golden ratio, neon colors, abstract forms, octane render, cinematic realism, unreal engine, 8k ::7 --ar 16:9 --s 1000\nCreate a bold, vivid composition using neon colors and fluid shapes that break away from reality. Focus on abstract forms, blending Fauvism's exaggerated color palette with modern digital art techniques. Use asymmetric composition and dynamic lighting. Render with a vibrant, high-energy aesthetic. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "ccc67dcb-84e6-476a-9bc2-b5382b700d5e",
"name": "None",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
1160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=Include: "
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "fea2039c-48e5-4077-af2c-ea72838e1a5d",
"name": "Serve webpage",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1460,
580
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Flux Image Generation Result</title>\n <style>\n body {\n font-family: 'Open Sans', Tahoma, Geneva, Verdana, sans-serif;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n background-color: #121212;\n color: #e0e0e0;\n }\n .container {\n margin-top: 2em;\n width: 90%;\n max-width: 670px; /* Increased the max-width for the main image area */\n text-align: center;\n background: #1e1e1e;\n padding: 24px;\n border-radius: 12px;\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);\n margin-bottom: 24px;\n }\n .image-container {\n margin-bottom: 20px;\n }\n .image-container img {\n max-width: 100%;\n height: auto;\n border-radius: 12px;\n border: 2px solid #333;\n }\n .style-text {\n font-size: 18px;\n margin-bottom: 20px;\n color: #bbb;\n }\n .cta {\n display: block;\n width: 100%;\n margin: 20px 0 0;\n padding: 18px 0;\n border: none;\n border-radius: 6px;\n text-decoration: none;\n color: #fff;\n background-color: #1C9985;\n font-size: 18px;\n font-weight: 400;\n cursor: pointer;\n transition: all 0.3s ease;\n }\n .cta:hover {\n background-color: #20B69E;\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n }\n /* New section for recent renders */\n .recent-renders {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 24px;\n max-width: 670px;\n }\n .recent-render img {\n width: 100%;\n max-width: 180px;\n height: auto;\n border-radius: 8px;\n border: 2px solid #333;\n }\n .recent-render {\n flex: 1;\n max-width: 200px;\n background-color: #2c2c2c;\n padding: 10px;\n border-radius: 10px;\n margin-bottom: 3 rem;\n }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"image-container\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id }}.jpg\" alt=\"Generated Image\" />\n </div>\n <div class=\"style-text\">Style: {{ $('Route by style').item.json.Style }}</div>\n <a href=\"https://n8n.io/workflows/2417-flux-ai-image-generator?utm_source=30day\" class=\"cta\">Duplicate this AI template</a>\n </div>\n \n <!-- New section to display the last 4 renders -->\n <div class=\"recent-renders\">\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id.toNumber() - 1 }}.jpg\" alt=\"Recent Render 1\">\n </div>\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id.toNumber() - 2 }}.jpg\" alt=\"Recent Render 2\">\n </div>\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id .toNumber() - 3}}.jpg\" alt=\"Recent Render 3\">\n </div>\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id.toNumber() - 4 }}.jpg\">\n </div>\n </div>\n</body>\n</html>\n"
},
"typeVersion": 1.1
},
{
"id": "2df7b738-9584-48b4-8adc-cafb0c026928",
"name": "Respond with error",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1460,
820
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"formSubmittedText\": \"Flux API failed. It does this ~10% of the time. Refresh and try again.\"\n}"
},
"typeVersion": 1.1
},
{
"id": "54cba7c4-db24-4abb-9638-ee66236d8676",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
440
],
"parameters": {
"color": 7,
"width": 205.9419250888625,
"height": 107.99633347519193,
"content": "### Set style prompt\nEach Edit fields node after the Switch sets `stylePrompt`, used in huggingface node."
},
"typeVersion": 1
},
{
"id": "f4aa76f8-d35f-4332-aa39-0c34582618eb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
840
],
"parameters": {
"color": 7,
"width": 419.0156901664085,
"height": 226.2264013670822,
"content": "### Run flux model\nIn `Call huggingface inference api` You can change `black-forest-labs/FLUX.1-schnell` in URL parameter to other models:\n- `black-forest-labs/FLUX.1-dev`\n- `Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur`\n- `XLabs-AI/flux-RealismLora`\n- `ByteDance/Hyper-SD`\n\n[See more models on huggingface.co](https://huggingface.co/models?pipeline_tag=text-to-image&sort=trending)\n"
},
"typeVersion": 1
},
{
"id": "2b0b29ce-82c2-4428-bf12-cb25262e5291",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
440
],
"parameters": {
"color": 7,
"width": 247.37323750873333,
"height": 90.99855957953969,
"content": "### Host image on S3\n[Cloudflare](https://cloudflare.com) has free S3 compatible hosting. They call it \"R2\"."
},
"typeVersion": 1
},
{
"id": "6fccc88f-9e72-49a3-952d-b7b1d9612091",
"name": "Upload image to S3",
"type": "n8n-nodes-base.s3",
"onError": "continueErrorOutput",
"position": [
1120,
580
],
"parameters": {
"fileName": "=fg-{{ $execution.id }}.jpg",
"operation": "upload",
"bucketName": "flux-generator",
"additionalFields": {}
},
"credentials": {
"s3": {
"id": "HZqaz9hPFlZp3BZ7",
"name": "S3 account"
}
},
"typeVersion": 1
},
{
"id": "7824dc49-c546-424e-8ba9-5f34b190d5f0",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
440
],
"parameters": {
"color": 7,
"width": 302.9292231993488,
"height": 90.99855957953969,
"content": "### Respond to Form\nServe a webform with image on success. On error, send message to form."
},
"typeVersion": 1
},
{
"id": "71739ba4-b8db-439e-b8c3-06f3208126e3",
"name": "Hyper-Surreal Escape",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=golden ratio, rule of thirds, cyberpunk, glitch art, octane render, cinematic realism, 8k ::7 --ar 16:9 --s 1000\nCreate a hyper-realistic yet surreal landscape that bends reality, incorporating dreamlike elements and exaggerated proportions. Use vibrant, almost neon colors, and focus on a sense of wonder, play, and fantasy. Include:\n"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "dcfdb152-a055-4f0f-baa5-7cf8afba36ae",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
440
],
"parameters": {
"color": 7,
"width": 186.9444130878394,
"height": 103.99685726445023,
"content": "### Serve form to user\nCaptures `Prompt to flux` and `Style` from user."
},
"typeVersion": 1
},
{
"id": "310f6c63-9441-4332-82dc-09b56e4f625a",
"name": "n8n Form Trigger",
"type": "n8n-nodes-base.formTrigger",
"position": [
-280,
660
],
"webhookId": "a35eb005-f795-4c85-9d00-0fe9797cb509",
"parameters": {
"path": "flux4free",
"options": {},
"formTitle": "flux.schnell image generator",
"formFields": {
"values": [
{
"fieldType": "textarea",
"fieldLabel": "Prompt to flux",
"placeholder": " An astronaut riding a horse in 35mm style",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Style",
"fieldOptions": {
"values": [
{
"option": "Hyper-Surreal Escape"
},
{
"option": "Neon Fauvism"
},
{
"option": "Post-Analog Glitchscape"
},
{
"option": "AI Dystopia"
},
{
"option": "Vivid Pop Explosion"
}
]
}
}
]
},
"responseMode": "responseNode",
"formDescription": "No ads, no BS. Uses hugginface inference API."
},
"typeVersion": 2.1
},
{
"id": "ad10a84f-851a-40f8-b10e-18356c4eeed6",
"name": "Call hugginface inference api",
"type": "n8n-nodes-base.httpRequest",
"notes": " ",
"onError": "continueErrorOutput",
"position": [
740,
660
],
"parameters": {
"url": "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "inputs",
"value": "=Depict {{ $json['Prompt to flux'] }}\n\nStyle: {{ $json.stylePrompt }}"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "r98SNEAnA5arilQO",
"name": "huggingface-nathan"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "e740dd3c-e23e-485b-bb4c-bb0515897a08",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
600
],
"parameters": {
"color": 7,
"width": 506.8102696237577,
"height": 337.24177957113216,
"content": "### Watch Set Up Video 👇\n[![Flux Generator](https://uploads.n8n.io/devrel/fluxgenerator.png#full-width)](https://youtu.be/Rv_1jt5WvtY)\n\n"
},
"typeVersion": 1
},
{
"id": "71d01821-3e0d-4c08-8571-58a158817e2c",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
440
],
"parameters": {
"color": 7,
"width": 506.8102696237577,
"height": 134.27496896630808,
"content": "# flux image generator\nBuilt by [@maxtkacz](https://x.com/maxtkacz) as part of the [30 Day AI Sprint](https://30dayaisprint.notion.site/)\nCheck out the project's [Notion page](https://30dayaisprint.notion.site/Flux-image-generator-bc94a8d2de8447c6ab70aacf2c4179f2) for more details"
},
"typeVersion": 1
},
{
"id": "0cc26680-ba63-464f-ba84-68c2616f95e2",
"name": "Route by style",
"type": "n8n-nodes-base.switch",
"position": [
0,
640
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Hyper-Surreal Escape",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Hyper-Surreal Escape"
}
]
},
"renameOutput": true
},
{
"outputKey": "Post-Analog Glitchscape",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "106969fa-994c-4b1e-b693-fc0b48ce5f3d",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Post-Analog Glitchscape"
}
]
},
"renameOutput": true
},
{
"outputKey": "AI Dystopia",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "24318e7d-4dc1-4369-b045-bb7d0a484def",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "AI Dystopia"
}
]
},
"renameOutput": true
},
{
"outputKey": "Neon Fauvism",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a80911ff-67fc-416d-b135-0401c336d6d8",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Neon Fauvism"
}
]
},
"renameOutput": true
},
{
"outputKey": "Vivid Pop Explosion",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7fdeec28-194e-415e-8da2-8bac90e4c011",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Vivid Pop Explosion"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.1
}
],
"pinData": {},
"connections": {
"None": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"AI Dystopia": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Neon Fauvism": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Route by style": {
"main": [
[
{
"node": "Hyper-Surreal Escape",
"type": "main",
"index": 0
}
],
[
{
"node": "Post-Analog Glitchscape",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Dystopia",
"type": "main",
"index": 0
}
],
[
{
"node": "Neon Fauvism",
"type": "main",
"index": 0
}
],
[
{
"node": "Vivid Pop Explosion",
"type": "main",
"index": 0
}
],
[
{
"node": "None",
"type": "main",
"index": 0
}
]
]
},
"n8n Form Trigger": {
"main": [
[
{
"node": "Route by style",
"type": "main",
"index": 0
}
]
]
},
"Upload image to S3": {
"main": [
[
{
"node": "Serve webpage",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond with error",
"type": "main",
"index": 0
}
]
]
},
"Vivid Pop Explosion": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Hyper-Surreal Escape": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Post-Analog Glitchscape": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Call hugginface inference api": {
"main": [
[
{
"node": "Upload image to S3",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond with error",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,163 @@
{
"meta": {
"instanceId": "205b3bc06c96f2dc835b4f00e1cbf9a937a74eeb3b47c99d0c30b0586dbf85aa",
"templateId": "2436"
},
"nodes": [
{
"id": "b24c6e28-3c9e-4069-9e87-49b2efd47257",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1200,
660
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "AzPPV759YPBxJj3o",
"name": "Max's DevRel OpenAI account"
}
},
"typeVersion": 1
},
{
"id": "c71a3e22-f0fd-4377-9be2-32438b282430",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
240
],
"parameters": {
"color": 7,
"width": 636.2128494576581,
"height": 494.9629292914819,
"content": "![Siri Template Thumbnail](https://uploads.n8n.io/devrel/wf-siri-header.png#full-width)\n## \"Hey Siri, Ask Agent\" workflow\n**Made by [Max Tkacz](https://www.linkedin.com/in/maxtkacz) during the [30 Day AI Sprint](https://30dayaisprint.notion.site/)**\n\nThis template integrates with Apple Shortcuts to trigger an n8n AI Agent via a \"Hey Siri\" command. The shortcut prompts for spoken input, transcribes it, and sends it to the workflow's `When Called by Apple Shortcut` Webhook trigger. The AI Agent processes the input and Siri dictates the response back to you.\n\nThe workflow also passes the current date and time to the `AI Agent`, which you can extend with additional context, like data from an App node, for more customized responses.\n\n"
},
"typeVersion": 1
},
{
"id": "a4ec93c3-eefa-4006-b02c-f995fb7bc410",
"name": "Respond to Apple Shortcut",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1640,
460
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.output }}"
},
"typeVersion": 1.1
},
{
"id": "942b284e-e26a-4534-8f33-eb92b0a88fdb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
760
],
"parameters": {
"color": 7,
"width": 280.2462120317618,
"height": 438.5821431288714,
"content": "### Set up steps\n1. Add an OpenAI API credential in `OpenAI Chat Model` node, or replace it with another model. Try `Groq` if you want a free alternative (can be used with free Groq account, no CC).\n2. Copy the \"Production URL\" from `When called by Apple Shortcut` node, you'll need this when setting up the shortcut.\n3. Save and activate this n8n workflow.\n4. Download the [Apple Shortcut here](https://uploads.n8n.io/devrel/ask-agent.shortcut), open it on macOS or iOS. This adds the shortcut to your device.\n5. Open the shortcut and swap URL in `Get contents of\" step to the \"Production URL\" you copied from `When called by Apple Shortcut`.\n6. Test it by saying \"Hey Siri, AI Agent\", then ask a question."
},
"typeVersion": 1
},
{
"id": "ebb9e886-546a-429c-b4b5-35c0a7b6370e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
503.6292958565226,
760
],
"parameters": {
"color": 7,
"width": 330.5152611046425,
"height": 240.6839895136402,
"content": "### ... or watch set up video [5 min]\n[![Siri Template Thumbnail](https://uploads.n8n.io/devrel/thumb-siri.png#full-width)](https://youtu.be/dewsB-4iGA8)\n"
},
"typeVersion": 1
},
{
"id": "5a842fa9-be8c-4ba8-996b-a26a53273b3f",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1240,
460
],
"parameters": {
"text": "=Here is my request: {{ $json.body.input }}\n",
"agent": "conversationalAgent",
"options": {
"systemMessage": "=## Task\nYou are a helpful assistant. Provide concise replies as the user receives them via voice on their mobile phone. Avoid using symbols like \"\\n\" to prevent them from being narrated.\n\n## Context\n- Today is {{ $now.format('dd LLL yy') }}.\n- Current time: {{ $now.format('h:mm a') }} in Berlin, Germany.\n- When asked, you are an AI Agent running as an n8n workflow.\n\n## Output\nKeep responses short and clear, optimized for voice delivery. Don't hallucinate, if you don't know the answer, say you don't know. "
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "598d22d5-7472-44c5-ab2e-69c8bbb23ddd",
"name": "When called by Apple Shortcut",
"type": "n8n-nodes-base.webhook",
"position": [
980,
460
],
"webhookId": "f0224b4b-1644-4d3d-9f12-01a9c04879e4",
"parameters": {
"path": "assistant",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
}
],
"pinData": {},
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Respond to Apple Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When called by Apple Shortcut": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,859 @@
{
"meta": {
"instanceId": "84ba6d895254e080ac2b4916d987aa66b000f88d4d919a6b9c76848f9b8a7616",
"templateId": "2446"
},
"nodes": [
{
"id": "af0765f4-75b5-445c-80d7-51b0aa180fe5",
"name": "OpenAI Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
820,
620
],
"parameters": {
"model": "gpt-4o",
"options": {
"temperature": 0,
"responseFormat": "text"
}
},
"typeVersion": 1
},
{
"id": "497c534e-e117-4592-b76f-bef424a7fd5a",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1500,
400
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "5b358850-cbc3-4a8c-b2b8-12e3b7aa1e44",
"name": "calendarAgent",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1060,
620
],
"parameters": {
"name": "calendarAgent",
"fields": {
"values": [
{
"name": "sessionId",
"stringValue": "={{ $json.sessionId }}"
},
{
"name": "prompt",
"stringValue": "={{ $json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "yPCMz4zxB291oM31",
"cachedResultName": "Google Calendar Agent"
},
"description": "Call this workflow to do handle every request regarding calendar management.",
"responsePropertyName": "output"
},
"typeVersion": 1.2
},
{
"id": "8bcc4b27-59b9-4ce3-8525-34221c10f11a",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
460,
480
],
"webhookId": "96e410fe-ef91-4767-aa9a-bf95ba50f972",
"parameters": {
"public": true,
"options": {}
},
"typeVersion": 1.1
},
{
"id": "0aa8e0ff-7ed3-4fef-9b7c-f2caa8f85612",
"name": "taskAgent",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
1180,
620
],
"parameters": {
"name": "taskAgent",
"fields": {
"values": [
{
"name": "sessionId",
"stringValue": "={{ $json.sessionId }}"
},
{
"name": "prompt",
"stringValue": "={{ $json.chatInput }}"
}
]
},
"workflowId": {
"__rl": true,
"mode": "list",
"value": "ICTXOidW1oyJDYP7",
"cachedResultName": "Notion Task Agent"
},
"description": "Call this workflow to do handle every request regarding task management.",
"responsePropertyName": "output"
},
"typeVersion": 1.2
},
{
"id": "b46f4ed0-6de6-44ab-8b91-521b011d7869",
"name": "Window Buffer Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
940,
620
],
"parameters": {
"sessionKey": "={{ $json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 15
},
"typeVersion": 1.2
},
{
"id": "e778c2bf-1681-418d-a434-d1a0cdeaa5d7",
"name": "Map Fields",
"type": "n8n-nodes-base.set",
"position": [
680,
320
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f8c5a03f-ea21-4877-a71b-32e8b4dd30fb",
"name": "chatInput",
"type": "string",
"value": "={{ $json.body.prompt }}"
},
{
"id": "3d4fecc4-78a5-47ba-a239-5fdc9b224d82",
"name": "sessionId",
"type": "string",
"value": "={{ $json.body.sessionID }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "c54d0fab-b25c-48fc-b027-dcdf78dd2b09",
"name": "Map Fields1",
"type": "n8n-nodes-base.set",
"position": [
680,
480
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "36f24729-17ae-4d69-961f-424a1797b42c",
"name": "chatInput",
"type": "string",
"value": "={{ $json.chatInput }}"
},
{
"id": "05ea359a-d82e-4917-9245-38016314ad10",
"name": "sessionId",
"type": "string",
"value": "={{ $json.sessionId }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "cefe6cc8-4a87-47c8-a518-c0bf06f96a2a",
"name": "Exclude Previews from Speech",
"type": "n8n-nodes-base.set",
"position": [
1280,
400
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "424b3c35-fd3d-4021-86e7-0d90529550b0",
"name": "response.text",
"type": "string",
"value": "={{ $json.output }}"
},
{
"id": "0cbe6fd9-3464-4bd1-b9c0-365548dc232a",
"name": "response.speech",
"type": "string",
"value": "={{ $if($json.output.search(/>\\s/) > -1, $json.output.substring(0, $json.output.search(/>\\s/)), $json.output) }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "815eb1a4-ef2d-430d-8884-217164214440",
"name": "Main Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
900,
400
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemMessage": "=# Role:\nYou are a helpful assistant. Your sole responsibility is to determine which tool to forward the original chat input to. Do not process, modify, or interpret the input or output in any way. Only route it to the correct tool.\n\n# Behavior:\nBe clear, very concise, and accurate in tool routing. Do not modify, interpret, or analyze the incoming input or the tool's response. If the request is ambiguous, ask for clarification regarding tool selection only.\n\n# Command:\nRoute all incoming requests to the available tools if they match their description.\nCheck the memory to route ongoing conversations correctly — only choose another tool if a new task has been requested or the context clearly has been switched. If the context has changed (e.g. you were asked to create a task before, but now the user asks to create an event), forget everything before the context switch.\n\nOnly call one tool at a time.\n\nDo not modify or alter the input before sending it to the tool or the output after receiving it from the tool. Simply pass through both input and output as they are.\n\n# Format:\nPass every response of each tool in raw format to the output. Do not modify, interpret, or add any information at all."
},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "07b6d7e2-ab73-4f23-8dca-7c8b0309574c",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1520,
1100
],
"parameters": {
"model": "gpt-4o",
"options": {
"temperature": 0
}
},
"typeVersion": 1
},
{
"id": "882a93d8-886e-465d-9c81-cc8069abd281",
"name": "HTTP Request",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
1760,
1100
],
"parameters": {
"url": "https://api.notion.com/v1/pages",
"method": "POST",
"jsonBody": "={\n \"parent\": {\n \"database_id\": \"{{ $json.databaseID }}\"\n },\n \"properties\": {\n \"Name\": {\n \"title\": [\n {\n \"text\": {\n \"content\": \"{title}\"\n }\n }\n ]\n },\n \"Priority\": {\n \"select\": {\n \"name\": \"{priority}\"\n }\n }\n },\n \"children\": [\n {\n \"object\": \"block\",\n \"type\": \"paragraph\",\n \"paragraph\": {\n \"rich_text\": [\n {\n \"type\": \"text\",\n \"text\": {\n \"content\": \"{description}\"\n }\n }\n ]\n }\n }\n ]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"toolDescription": "Create a Task in Notion using a title, description and priority.",
"nodeCredentialType": "notionApi",
"placeholderDefinitions": {
"values": [
{
"name": "title",
"type": "string",
"description": "The name / title of the task."
},
{
"name": "description",
"type": "string",
"description": "The description of the task."
},
{
"name": "priority",
"type": "string",
"description": "The priority of the task. One of these values: \"do first\", \"important\", \"urgent\""
}
]
}
},
"typeVersion": 1.1
},
{
"id": "e19aad2c-132e-454f-a091-334f128b0636",
"name": "Settings",
"type": "n8n-nodes-base.set",
"position": [
1320,
880
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "3f65df4c-fae1-4da3-acfd-acf352a3f8d2",
"name": "sessionId",
"type": "string",
"value": "={{ $json.sessionId }}"
},
{
"id": "9745bdbd-fd97-46db-a742-6540f86dd43c",
"name": "chatInput",
"type": "string",
"value": "={{ $json.prompt }}"
},
{
"id": "5e757768-d780-4b11-a6e0-593b08f32cc3",
"name": "databaseID",
"type": "string",
"value": "92da2aa018ed4095afc0f1a0670f36e9"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "0fe6aa57-7a64-40f4-af2d-30f4286b8aee",
"name": "Format output",
"type": "n8n-nodes-base.set",
"position": [
1920,
880
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "934c387a-71a5-4549-a68a-312708368117",
"name": "output",
"type": "string",
"value": "=Please respond this to the user without modifications:\n\n{{ $json.output }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "b2170997-5ebb-4261-92ce-70b33d68931f",
"name": "Notion Task Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1540,
880
],
"parameters": {
"options": {
"systemMessage": "=# Role:\nYou are a helpful assistant. Your job is to create Tasks in Notion.\n\n# Behavior:\nBe clear, very concise, efficient, and accurate in responses. If the request is ambiguous, ask for clarification.\n\n# Command:\nYou create tasks in Notion. Each task consists of the mandatory fields title, description and priority. Priority is an enum value consisting of 'do first', 'important' and 'urgent'.\n\n# Ask questions:\nIf required information is missing, ask the user about the missing information and only the missing ones. Ask priority as last.\n\nIf the user only describes the task within a few words, use that as the title. In that case, ask the user, if he wants to add a more detailed description. If he responds with \"No\", leave the description empty when creating the task.\nOn the other hand if the user describes the task more detailed from the beginning, use that as the description and create a short meaningful title for that. \n\nIf you have all the required information, ask for approval, before creating the task. In that case, always return a draft, containing the title, description and priority.\n\n# Format:\nThe output of the draft for approval should always be in markdown and in this format (placeholders in angle brackets):\n\nHere is the drafted task. Shall I create it?\n\n> **<title>** \n> *<priority>* \n> \n> <description (optional)>\n\n# Responses:\nAfter successfully created event, only respond with \"Okay, done.\""
}
},
"typeVersion": 1.6
},
{
"id": "a83fdec9-8c0e-45d0-8439-41c23440a21e",
"name": "Window Buffer Memory1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1640,
1100
],
"parameters": {
"sessionKey": "={{ $json.sessionId }}-{{ $workflow.id }}",
"sessionIdType": "customKey",
"contextWindowLength": 15
},
"typeVersion": 1.2
},
{
"id": "80ae1a6f-5811-407a-a287-5150b8ecba22",
"name": "Get calendar availability",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
820,
1100
],
"parameters": {
"url": "https://www.googleapis.com/calendar/v3/freeBusy",
"method": "POST",
"jsonBody": "={\n \"timeMin\": \"{timeMin}\",\n \"timeMax\": \"{timeMax}\",\n \"timeZone\": \"{{ $json.timeZone }}\",\n \"groupExpansionMax\": 20,\n \"calendarExpansionMax\": 10,\n \"items\": [\n {\n \"id\": \"{{ $json.calendarID }}\"\n }\n ]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"toolDescription": "Call this tool to get the calendar availability for a particular period on the calendar. The tool may refer to availability as \"Free\" or \"Busy\". \n\nUse {timeMin} and {timeMax} to specify the window for the availability query. For example, to get availability for 25 July, 2024 the {timeMin} would be 2024-07-25T00:00:00+02:00 and {timeMax} would be 2024-07-26T00:00:00+02:00.\n\nIf the tool returns an empty response, it means that something went wrong. It does not mean that there is no availability.",
"nodeCredentialType": "googleCalendarOAuth2Api"
},
"typeVersion": 1
},
{
"id": "1d44a1eb-1b14-4ce8-b874-673db7be482c",
"name": "Book appointment",
"type": "@n8n/n8n-nodes-langchain.toolHttpRequest",
"position": [
940,
1100
],
"parameters": {
"url": "=https://www.googleapis.com/calendar/v3/calendars/{{ $json.calendarID }}/events",
"method": "POST",
"jsonBody": "={\n \"summary\": \"{eventName}\",\n \"start\": {\n \"dateTime\": \"{startTime}\",\n \"timeZone\": \"Europe/Berlin\"\n },\n \"end\": {\n \"dateTime\": \"{endTime}\",\n \"timeZone\": \"Europe/Berlin\"\n }\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"toolDescription": "Call this tool to create an event in the calendar.",
"nodeCredentialType": "googleCalendarOAuth2Api",
"placeholderDefinitions": {
"values": [
{
"name": "eventName",
"description": "A short but precise title for the event."
},
{
"name": "startTime",
"description": "The start time of the event in Europe/Berlin timezone. For example, 2024-07-24T10:00:00+02:00"
},
{
"name": "endTime",
"description": "The end time of the event in Europe/Berlin timezone. It should always be 30 minutes after the startTime. "
}
]
}
},
"typeVersion": 1
},
{
"id": "d814abe2-fe6f-43ba-99b7-8380ed78dd26",
"name": "Google Calendar Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
660,
880
],
"parameters": {
"options": {
"systemMessage": "=# Role:\nYou are a helpful assistant. Your job is to schedule Google Calendar Events.\n\n# Behavior:\nBe clear, very concise, efficient, and accurate in responses. If the request is ambiguous, ask for clarification.\n\n# Command:\nYou create Google Calendar events. Each event requires a title, date and time. The default duration - if not provided by the user - is 1 hour.\n\nBefore creating even showing a draft of the event, use the provided tool to check for the availibilty in the calendar. If there are any conflicts, tell the user about the timespans which are blocked, propose another time slot close by and ask the user if he would like to change the time to that.\n\n# Ask questions:\nIf required information is missing, ask the user about the missing information and only the missing ones.\n\nIf you have all the required information, ask for approval, before creating the event. In that case, always return a draft, containing the title, date and time.\n\n# Format:\nThe output of the draft for approval should always be in markdown and in this format (placeholders in angle brackets):\n\nHere is the event. Shall I create it?\n\n> **<title>** \n> <date e.g., September 15, 2024> \n> <time e.g., 10am-12pm>\n\n# Responses:\nAfter successfully created event, only respond with \"You are all set.\"\n\n# Additional Guidelines:\nTodays date is {{ $now.setZone($json.timeZone).format('dd LLL yyyy') }}.\n"
}
},
"typeVersion": 1.6
},
{
"id": "9c4738b9-c7bc-4e90-9dc3-7f99822a19ca",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
580,
1100
],
"parameters": {
"options": {
"temperature": 0
}
},
"typeVersion": 1
},
{
"id": "40b9b4e0-0e84-43fa-a4bc-a5eb99988cbd",
"name": "Settings1",
"type": "n8n-nodes-base.set",
"position": [
440,
880
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "3f65df4c-fae1-4da3-acfd-acf352a3f8d2",
"name": "sessionId",
"type": "string",
"value": "={{ $json.sessionId }}"
},
{
"id": "9745bdbd-fd97-46db-a742-6540f86dd43c",
"name": "chatInput",
"type": "string",
"value": "={{ $json.prompt }}"
},
{
"id": "5e757768-d780-4b11-a6e0-593b08f32cc3",
"name": "calendarID",
"type": "string",
"value": "primary"
},
{
"id": "4085421e-7f2c-429c-a85f-c6170a655823",
"name": "timeZone",
"type": "string",
"value": "Europe/Berlin"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "4bafef7b-3474-42c0-9f21-5c0c02cd9e73",
"name": "Format output1",
"type": "n8n-nodes-base.set",
"position": [
1040,
880
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "934c387a-71a5-4549-a68a-312708368117",
"name": "output",
"type": "string",
"value": "=Please respond this to the user without modifications:\n\n{{ $json.output }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "6ebcf3cd-8ff2-4605-b4b6-69155918b290",
"name": "Window Buffer Memory2",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
700,
1100
],
"parameters": {
"sessionKey": "={{ $json.sessionId }}-{{ $workflow.id }}",
"sessionIdType": "customKey",
"contextWindowLength": 15
},
"typeVersion": 1.2
},
{
"id": "1269083c-aac7-4a4f-9b3b-bb82a670ff94",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
800
],
"parameters": {
"width": 857.6171119733089,
"height": 469.7141529250314,
"content": "## Sub-Agent for scheduling calendar events"
},
"typeVersion": 1
},
{
"id": "48df65e9-4628-4b5d-bbad-a8a68289d8b8",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1260,
800
],
"parameters": {
"width": 859.4283058500632,
"height": 469.7141529250314,
"content": "## Sub-Agent for crating notion tasks\n"
},
"typeVersion": 1
},
{
"id": "48f050ec-3bda-4105-a859-e8f2039abe8e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
380,
240
],
"parameters": {
"width": 1323.0939382992326,
"height": 537.6599060701709,
"content": "## Main Agent which is connected to Vagent.io"
},
"typeVersion": 1
},
{
"id": "c768a760-9511-4543-b3ea-f1d83c263098",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1720,
240
],
"parameters": {
"color": 5,
"width": 398.5850611544016,
"height": 537.9088390659099,
"content": "## Setup\n\n### Create workflows\n- Create a separate workflow for each Sub-Agent and move over the nodes from here\n- In each of those workflows add an **Execute Workflow Trigger** node and connect it to the beginning of the copied nodes\n\n### Configure main workflow\n- Select the corresponding credentials\n- Update the Webhook URL and create a Header Auth (Key: Authorization)\n- Update the tools \"claendarAgent\" and \"task Agent\" by choosing the corresponding sub-workflows you just created in the \"Workflow\" dropdown menu\n- Activate the workflow\n\n### Configure sub-workflows\n- Select the corresponding credentials\n- Update the \"Settings\" node (do not touch the first two values), e.g. set your Notion DB ID"
},
"typeVersion": 1
},
{
"id": "42abacd3-02ba-466e-a8d4-f1c2f5c96c00",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
460,
320
],
"webhookId": "46116445-3b13-48c0-9a38-cd034bee92ac",
"parameters": {
"path": "46116445-3b13-48c0-9a38-cd034bee92ac",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode",
"authentication": "headerAuth"
},
"typeVersion": 2
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "Map Fields",
"type": "main",
"index": 0
}
]
]
},
"Settings": {
"main": [
[
{
"node": "Notion Task Agent",
"type": "main",
"index": 0
}
]
]
},
"Settings1": {
"main": [
[
{
"node": "Google Calendar Agent",
"type": "main",
"index": 0
}
]
]
},
"taskAgent": {
"ai_tool": [
[
{
"node": "Main Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Main Agent": {
"main": [
[
{
"node": "Exclude Previews from Speech",
"type": "main",
"index": 0
}
]
]
},
"Map Fields": {
"main": [
[
{
"node": "Main Agent",
"type": "main",
"index": 0
}
]
]
},
"Map Fields1": {
"main": [
[
{
"node": "Main Agent",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"ai_tool": [
[
{
"node": "Notion Task Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"calendarAgent": {
"ai_tool": [
[
{
"node": "Main Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Book appointment": {
"ai_tool": [
[
{
"node": "Google Calendar Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Notion Task Agent": {
"main": [
[
{
"node": "Format output",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Notion Task Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Google Calendar Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Main Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Window Buffer Memory": {
"ai_memory": [
[
{
"node": "Main Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Google Calendar Agent": {
"main": [
[
{
"node": "Format output1",
"type": "main",
"index": 0
}
]
]
},
"Window Buffer Memory1": {
"ai_memory": [
[
{
"node": "Notion Task Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Window Buffer Memory2": {
"ai_memory": [
[
{
"node": "Google Calendar Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Get calendar availability": {
"ai_tool": [
[
{
"node": "Google Calendar Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Map Fields1",
"type": "main",
"index": 0
}
]
]
},
"Exclude Previews from Speech": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,504 @@
{
"meta": {
"instanceId": "f4f5d195bb2162a0972f737368404b18be694648d365d6c6771d7b4909d28167"
},
"nodes": [
{
"id": "b165115d-5505-4e03-bf41-c21320cb8b09",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
40
],
"parameters": {
"color": 7,
"width": 681.8337349708484,
"height": 843.1482165886073,
"content": "## Workflow: Text automations using Apple Shortcuts\n\n**Overview**\n- This workflow answers user requests sent via Apple Shortcuts\n- Several Shortcuts call the same webhook, with a query and a type of query\n- Types of query are:\n - translate to english\n - translate to spanish\n - correct grammar (without changing the actual content)\n - make content shorter\n - make content longer\n\n\n**How it works**\n- Select a text you are writing\n- Launch the shortcut\n- The text is sent to the webhook\n- Depending on the type of request, a different prompt is used\n- Each request is sent to an OpenAI node\n- The workflow responds to the request with the response from GPT\n- Shortcut replace the selected text with the new one\n\n**How to use it**\n- Activate the workflow\n- Download [this Shortcut template](https://drive.usercontent.google.com/u/0/uc?id=16zs5iJX7KeX_4e0SoV49_KfbU7-EF0NE&export=download)\n- Install the shortcut\n- In step 2 of the shortcut, change the url of the Webhook\n- In Shortcut details, \"add Keyboard Shortcut\" with the key you want to use to launch the shortcut\n- Go to settings, advanced, check \"Allow running scripts\"\n- You are ready to use the shortcut. Select a text and hit the keyboard shortcut you just defined\n\n\n**Notes**\n- If you use rich formatting, you'll have to test multiple ways to replace characters in the output. For example, you might use `{{ $json.message.content.output.replaceAll('\\n', \"<br/>\") }}` in the \"Respond to Shortcut\" node depending on the app you use most.\n- This is a basic example that you can extend and modify at your will\n- You can duplicate and modify the example shortcut based on your need, as well as making new automations in this workflow."
},
"typeVersion": 1
},
{
"id": "c45400b8-d3b8-47f7-81c6-d791bce4c266",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1020,
380
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "spanish",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "spanish"
}
]
},
"renameOutput": true
},
{
"outputKey": "english",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bedb302f-646c-4dcd-8246-1fcfecfe3f2e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "english"
}
]
},
"renameOutput": true
},
{
"outputKey": "grammar",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "94e6cf7d-576d-4ad9-85b0-c6b945eb41b7",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "grammar"
}
]
},
"renameOutput": true
},
{
"outputKey": "shorter",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1ed0d1e1-2df0-4f8d-b102-4004a25919ed",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "shorter"
}
]
},
"renameOutput": true
},
{
"outputKey": "longer",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4756df03-7e7c-4e28-9b37-14684326b083",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "longer"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "48e0e58e-6293-4e11-a488-ca9943b53484",
"name": "Respond to Shortcut",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1840,
400
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.message.content.output.replaceAll('\\n', '<br/>') }}"
},
"typeVersion": 1.1
},
{
"id": "2655b782-9538-416c-ae65-35f8c77889c7",
"name": "Webhook from Shortcut",
"type": "n8n-nodes-base.webhook",
"position": [
840,
400
],
"webhookId": "e4ddadd2-a127-4690-98ca-e9ee75c1bdd6",
"parameters": {
"path": "shortcut-global-as",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "880ed4a2-0756-4943-a51f-368678e22273",
"name": "OpenAI - Make Shorter",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
540
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Summarize this content a little bit (5% shorter)\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "c6c6d988-7aab-4677-af1f-880d05691ec3",
"name": "OpenAI - Make Longer",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
680
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Make this content a little longer (5% longer)\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "8e6de4b7-22c3-45c9-a8d7-d498cf829b6f",
"name": "OpenAI - Correct Grammar",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
400
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Correct grammar only, don't change the actual contents.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "bc006b36-5a96-4c3a-9a28-2778a6c49f10",
"name": "OpenAI - To Spanish",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
120
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Translate this message to Spanish.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "330d2e40-1e52-4517-94e0-ce96226697fa",
"name": "OpenAI - To English",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
260
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Translate this message to English.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "925e4b55-ac26-4c16-941f-66d17b6794ab",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
900
],
"parameters": {
"color": 7,
"width": 469.15174499329123,
"height": 341.88919758842485,
"content": "### Check these explanations [< 3 min]\n\n[![Check the explanations](https://cdn.loom.com/sessions/thumbnails/c5b657568af64bb1b50fa8e8a91c45d1-1db3990a618986c9-full-play.gif)](https://www.loom.com/share/c5b657568af64bb1b50fa8e8a91c45d1?sid=a406be73-55eb-4754-9f51-9ddf49b22d69)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Switch": {
"main": [
[
{
"node": "OpenAI - To Spanish",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - To English",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Correct Grammar",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Make Shorter",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Make Longer",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - To English": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - To Spanish": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Make Longer": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Make Shorter": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"Webhook from Shortcut": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Correct Grammar": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,82 @@
{
"meta": {
"instanceId": "fcf18fc485cc336a31bc65574fd28e124660f468281b7aad773616b17903afe6",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "37bd6cc9-3cc4-442e-94c1-42972c0fce0d",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
80,
0
],
"webhookId": "060dbacf-0feb-43d4-b4ac-44011a7dd1a4",
"parameters": {
"path": "060dbacf-0feb-43d4-b4ac-44011a7dd1a4",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "3c05c0e4-7121-46d0-b35c-fc39cdd35ae7",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
580,
0
],
"parameters": {
"options": {},
"respondWith": "binary"
},
"typeVersion": 1.1
},
{
"id": "3f5ba2a7-148d-4921-b2ca-9dee17a2b278",
"name": "HTML to PDF",
"type": "@custom-js/n8n-nodes-pdf-toolkit.html2Pdf",
"position": [
340,
0
],
"parameters": {
"htmlInput": "<h1>Hello CustomJS!</h1>\n<h2>CustomJS provides the missing toolset for your no-code projects</h2>"
},
"credentials": {
"customJsApi": {
"id": "SZkqeEHVYyWhaGem",
"name": "CustomJS account"
}
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Webhook": {
"main": [
[
{
"node": "HTML to PDF",
"type": "main",
"index": 0
}
]
]
},
"HTML to PDF": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,272 @@
{
"id": "qww129cm4TM9N8Ru",
"meta": {
"instanceId": "038da3428bba4563b42be267feeca21b4922693db254331ac640a5c56ee7cadf",
"templateCredsSetupCompleted": true
},
"name": "InstaTest",
"tags": [
{
"id": "8PlqXsDyqVlHJ7RC",
"name": "AI",
"createdAt": "2024-07-10T14:12:10.657Z",
"updatedAt": "2024-07-10T14:12:10.657Z"
}
],
"nodes": [
{
"id": "51dcaa84-d1f9-4abc-aebc-24a06801e42d",
"name": "Set your system promt for AI",
"type": "n8n-nodes-base.set",
"notes": "In this node in \"prompt\" variable you can set your system prompt",
"position": [
1120,
620
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "0b3c3d71-5627-4b8c-91f0-ac44eaedf196",
"name": "prompt",
"type": "string",
"value": "=Persona: You are a instagram influencer.\nContext: You receive a messages from your subscribers\nTask: Answer questions in your writing style and patterns according to your previous posts text. Use your post only for style and patterns reference.\nStyle rules:\nsimple answers"
},
{
"id": "c2a9e272-5c0d-4685-ad0e-ce6995f92a1c",
"name": "sessionId",
"type": "string",
"value": "={{ $json.body.session_id }}"
},
{
"id": "b3c20ee3-07a1-4584-b0d9-7310a2c6b723",
"name": "chatInput",
"type": "string",
"value": "={{ $json.body.text }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "0fb36573-d632-4403-8809-3973f9caa32a",
"name": "Local n8n memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1500,
780
],
"parameters": {
"sessionKey": "={{ $('Set your system promt for AI').last().json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "2f0471a7-2a84-41ce-aab1-896d5ea95ac3",
"name": "ChatGPT model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1360,
780
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "HxWZhtJcnqTXVHAA",
"name": "General"
}
},
"typeVersion": 1
},
{
"id": "49abc3a3-faf9-4249-b874-908138a84aea",
"name": "Send respond ",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1720,
620
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "49382508-9307-4ffa-8b31-78fac3a7db10",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
320,
360
],
"parameters": {
"color": 5,
"width": 458.4028599661066,
"height": 447.98321744507007,
"content": "## Easy Instagram(via ManyChat) bot\n---\n### Description:\nThis template is a main part of Entire solution. It's getting new message from Instagram via ManyChat(Extra No-Code tool for getting and sending message in Instagram). Generating message using ChatGPT and send back to ManyChat that sends it to Instagrtam.\n\n### Logic:\n1. Getting message from Instagram(from ManyChat)\n2. Set you system prompt for AI\n3. Create simple answer for message in AI block\n4. Send answer to Instagram(to ManyChat)\n\n---\n*Helpful links:*\n- [Guide in Notion how to create full bot](https://shadowed-pound-d6e.notion.site/Instagram-GPT-light-version-Manychat-X-N8N-176293bddff880899a9ac255585d29f7?pvs=4)\n- [ManyChat](https://manychat.partnerlinks.io/vm4wkw8j81tc)"
},
"typeVersion": 1
},
{
"id": "5d14544c-7039-435f-a53c-615b5722bb99",
"name": "Getting message from Instagram",
"type": "n8n-nodes-base.webhook",
"position": [
900,
620
],
"webhookId": "68d3fbc9-6e49-4bdc-851c-2a532be911ab",
"parameters": {
"path": "instagram_chat",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "3770f558-341b-4d67-a7f0-0bb2fecf51a3",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
300
],
"parameters": {
"width": 313.9634922216307,
"height": 614.7475040550845,
"content": "## 3) AI block\n---\nThere is 3 nodes:\n- AI Agent\n- Chat GPT model\n- Memory for history messages\n\n### To do:\n- in ChatGPT node you can choose the best model for you\n- in Memory Block you can change number of messages in history\n\n"
},
"typeVersion": 1
},
{
"id": "cbb6c5a2-9b96-4305-afce-5ac560ae2dec",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1340,
620
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemMessage": "={{ $json.prompt }}"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "4e28119f-b1aa-4b20-a8ed-28bd137f9627",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
360
],
"parameters": {
"height": 440,
"content": "## 1) HTTP Post webhook\n\n**To do:**\nJust copy production link from this node and insert to custom action in ManyChat\n\nNo edits needed"
},
"typeVersion": 1
},
{
"id": "b18a8890-b420-4086-91c8-8edbc845c8af",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
480
],
"parameters": {
"width": 220,
"height": 320,
"content": "## 2) Edit prompt\n\n**To do:**\nGo inside and change input\n"
},
"typeVersion": 1
},
{
"id": "74d4e6f5-069e-4b37-8005-8c03226b05df",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1660,
480
],
"parameters": {
"height": 300,
"content": "## 4) Respond webhook\n\nNo edits needed"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2f36fc7a-0a69-4af3-a958-25e9d278f058",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send respond ",
"type": "main",
"index": 0
}
]
]
},
"ChatGPT model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Local n8n memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Set your system promt for AI": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Getting message from Instagram": {
"main": [
[
{
"node": "Set your system promt for AI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,131 @@
{
"id": "Q8On8rR6BkmPzDUd",
"meta": {
"instanceId": "f57770b08f6a574802832e927ed1b0063c627ffc5b95965abf0d4a7396150138"
},
"name": "chrome extension backend with AI",
"tags": [],
"nodes": [
{
"id": "0f38fe62-36d9-43da-a992-a3981377e89e",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-220,
-20
],
"webhookId": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c",
"parameters": {
"path": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "83959562-edf5-4d37-bd11-47186c6a31c7",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-40,
-20
],
"parameters": {
"text": "You are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language.",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"resource": "image",
"inputType": "base64",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "8MS1muoK4z86fxUs",
"name": "OpenAi account"
}
},
"typeVersion": 1.7
},
{
"id": "c6f1f833-7ba3-49c5-86df-f586e6bb5975",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
140,
-20
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.content }}"
},
"typeVersion": 1.1
},
{
"id": "e3a38a76-283b-4567-a8da-315ef1e2bc4f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
-140
],
"parameters": {
"width": 620,
"height": 300,
"content": "## N8N en OpenAI image analyser"
},
"typeVersion": 1
},
{
"id": "8e7e26db-8767-4727-ab0c-900b50a73411",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
180
],
"parameters": {
"color": 5,
"height": 340,
"content": "## AI prompt\nYou are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language."
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "caf32442-e9c5-466a-8888-9abd2c1b3449",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,145 @@
{
"id": "wDD4XugmHIvx3KMT",
"meta": {
"instanceId": "149cdf730f0c143663259ddc6124c9c26e824d8d2d059973b871074cf4bda531"
},
"name": "Image Generation API",
"tags": [],
"nodes": [
{
"id": "d743f947-ad45-4e59-97d4-79b98eaddedb",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
260,
-20
],
"webhookId": "970dd3c6-de83-46fd-9038-33c470571390",
"parameters": {
"path": "970dd3c6-de83-46fd-9038-33c470571390",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 1.1
},
{
"id": "832e993e-69e9-475b-8322-776d88da0440",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1400,
-20
],
"parameters": {
"options": {},
"respondWith": "binary"
},
"typeVersion": 1
},
{
"id": "53044a93-375f-48f2-971d-bf765bcdb7a0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-120
],
"parameters": {
"width": 301.7420425026802,
"height": 260.80333469825376,
"content": "## Webhook Trigger \n**This Node starts listening to requests to the Webhook URL**\n\n"
},
"typeVersion": 1
},
{
"id": "c7b3b04e-903b-4d7c-bbf1-2bc2f1b1a426",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-460
],
"parameters": {
"width": 469.32758643852594,
"height": 297.34454352637044,
"content": "## Creating your Prompt-URL \n**To use this Workflow you need to append your prompt to your Webhook URL in the following way**\n\n1. Take your Webhook URL\n2. Ideate a Prompt and Replace every Space (\" \") by %20 (Url Encoding)\n3. Append \"?input=\" and right after that your encoded prompt to your url\n4. Copy paste this into a webbrowser as soon as you run the Webhook"
},
"typeVersion": 1
},
{
"id": "473ff6e5-441a-4706-86a4-190936cc6ac1",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
540,
-54.959833265087354
],
"parameters": {
"width": 522.2493371551094,
"height": 109.59833265087394,
"content": "## Starting the Workflow\n**To start the workflow paste the encoded URL into your webbrowser**\n\n"
},
"typeVersion": 1
},
{
"id": "e8874f52-ef7e-4aea-be5b-81e3276da3d2",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1120,
-20
],
"parameters": {
"prompt": "={{ $json.query.input }}",
"options": {},
"resource": "image"
},
"typeVersion": 1.1
},
{
"id": "08c073a6-e01e-4b04-8051-502c918998c4",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1280,
-120
],
"parameters": {
"width": 329.4629595446998,
"height": 278.4439182704484,
"content": "## Response\n**Watch the image being rendered in your webbrowser**\n\n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "19f7e652-5417-4b02-a1f5-8796bbac25c3",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,716 @@
{
"nodes": [
{
"id": "6abe578b-d503-4da5-9af8-f9977de71139",
"name": "Vivid Pop Explosion",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
980
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=rule of thirds, golden ratio, hyper-maximalist, vibrant neon, high-contrast, octane render, photorealism, 8k ::7 --ar 16:9 --s 1000\n\nDesign a fun, energetic scene filled with bold, neon colors, and playful shapes that pop off the screen. The image should evoke a sense of joy and movement, using fluid, organic forms and exaggerated, cartoon-like proportions. Focus on creating a lively atmosphere with contrasting, saturated tones and dynamic lighting. Use a mix of asymmetrical and balanced compositions to create a playful visual flow. Render in 8K with a hyper-maximalist approach using Octane Render for vibrant, high-gloss textures and photorealistic lighting effects. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "7de1ea42-3b18-4bfb-8ea4-a8b6c8d16763",
"name": "AI Dystopia",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
620
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=golden ratio, rule of thirds, cyberpunk, glitch art, octane render, cinematic realism, 8k ::7 --ar 16:9 --s 1000\n\nGenerate a futuristic, cyberpunk dystopia with metallic textures, digital glitches, and neon lights. Blend cold, dystopian structures with traces of organic life. Use photorealistic lighting and dynamic reflections to enhance the visual depth of the scene. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "aa17c288-78e0-48d9-9c60-0e63e351d0b6",
"name": "Post-Analog Glitchscape",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
420
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=rule of thirds, asymmetric composition, glitch art, pixelation, VHS noise, octane render, unreal engine, 8k ::7 --ar 16:9 --s 1200\nDesign a glitchy, post-analog world with digital decay and broken visuals. Utilize pixelated elements, VHS noise, and neon glitches to create a fragmented aesthetic. Use bold, contrasting colors against muted backgrounds for a high-contrast, otherworldly feel. The composition should follow asymmetrical rules, focusing on chaotic yet intentional visual balance. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "769ff46c-630f-456d-ae19-4c6496270fda",
"name": "Neon Fauvism",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
800
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=asymmetric composition, golden ratio, neon colors, abstract forms, octane render, cinematic realism, unreal engine, 8k ::7 --ar 16:9 --s 1000\nCreate a bold, vivid composition using neon colors and fluid shapes that break away from reality. Focus on abstract forms, blending Fauvism's exaggerated color palette with modern digital art techniques. Use asymmetric composition and dynamic lighting. Render with a vibrant, high-energy aesthetic. Include:"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "ccc67dcb-84e6-476a-9bc2-b5382b700d5e",
"name": "None",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
1160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=Include: "
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "fea2039c-48e5-4077-af2c-ea72838e1a5d",
"name": "Serve webpage",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1460,
580
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>Flux Image Generation Result</title>\n <style>\n body {\n font-family: 'Open Sans', Tahoma, Geneva, Verdana, sans-serif;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n min-height: 100vh;\n background-color: #121212;\n color: #e0e0e0;\n }\n .container {\n margin-top: 2em;\n width: 90%;\n max-width: 670px; /* Increased the max-width for the main image area */\n text-align: center;\n background: #1e1e1e;\n padding: 24px;\n border-radius: 12px;\n box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);\n margin-bottom: 24px;\n }\n .image-container {\n margin-bottom: 20px;\n }\n .image-container img {\n max-width: 100%;\n height: auto;\n border-radius: 12px;\n border: 2px solid #333;\n }\n .style-text {\n font-size: 18px;\n margin-bottom: 20px;\n color: #bbb;\n }\n .cta {\n display: block;\n width: 100%;\n margin: 20px 0 0;\n padding: 18px 0;\n border: none;\n border-radius: 6px;\n text-decoration: none;\n color: #fff;\n background-color: #1C9985;\n font-size: 18px;\n font-weight: 400;\n cursor: pointer;\n transition: all 0.3s ease;\n }\n .cta:hover {\n background-color: #20B69E;\n transform: translateY(-2px);\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);\n }\n /* New section for recent renders */\n .recent-renders {\n display: flex;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 16px;\n margin-top: 24px;\n max-width: 670px;\n }\n .recent-render img {\n width: 100%;\n max-width: 180px;\n height: auto;\n border-radius: 8px;\n border: 2px solid #333;\n }\n .recent-render {\n flex: 1;\n max-width: 200px;\n background-color: #2c2c2c;\n padding: 10px;\n border-radius: 10px;\n margin-bottom: 3 rem;\n }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"image-container\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id }}.jpg\" alt=\"Generated Image\" />\n </div>\n <div class=\"style-text\">Style: {{ $('Route by style').item.json.Style }}</div>\n <a href=\"https://n8n.io/workflows/2417-flux-ai-image-generator?utm_source=30day\" class=\"cta\">Duplicate this AI template</a>\n </div>\n \n <!-- New section to display the last 4 renders -->\n <div class=\"recent-renders\">\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id.toNumber() - 1 }}.jpg\" alt=\"Recent Render 1\">\n </div>\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id.toNumber() - 2 }}.jpg\" alt=\"Recent Render 2\">\n </div>\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id .toNumber() - 3}}.jpg\" alt=\"Recent Render 3\">\n </div>\n <div class=\"recent-render\">\n <img src=\"https://pub-d2d94462851644a78ea607e05f8a2d25.r2.dev/fg-{{ $execution.id.toNumber() - 4 }}.jpg\">\n </div>\n </div>\n</body>\n</html>\n"
},
"typeVersion": 1.1
},
{
"id": "2df7b738-9584-48b4-8adc-cafb0c026928",
"name": "Respond with error",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1460,
820
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "{\n \"formSubmittedText\": \"Flux API failed. It does this ~10% of the time. Refresh and try again.\"\n}"
},
"typeVersion": 1.1
},
{
"id": "54cba7c4-db24-4abb-9638-ee66236d8676",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
440
],
"parameters": {
"color": 7,
"width": 205.9419250888625,
"height": 107.99633347519193,
"content": "### Set style prompt\nEach Edit fields node after the Switch sets `stylePrompt`, used in huggingface node."
},
"typeVersion": 1
},
{
"id": "f4aa76f8-d35f-4332-aa39-0c34582618eb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
840
],
"parameters": {
"color": 7,
"width": 419.0156901664085,
"height": 226.2264013670822,
"content": "### Run flux model\nIn `Call huggingface inference api` You can change `black-forest-labs/FLUX.1-schnell` in URL parameter to other models:\n- `black-forest-labs/FLUX.1-dev`\n- `Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur`\n- `XLabs-AI/flux-RealismLora`\n- `ByteDance/Hyper-SD`\n\n[See more models on huggingface.co](https://huggingface.co/models?pipeline_tag=text-to-image&sort=trending)\n"
},
"typeVersion": 1
},
{
"id": "2b0b29ce-82c2-4428-bf12-cb25262e5291",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1120,
440
],
"parameters": {
"color": 7,
"width": 247.37323750873333,
"height": 90.99855957953969,
"content": "### Host image on S3\n[Cloudflare](https://cloudflare.com) has free S3 compatible hosting. They call it \"R2\"."
},
"typeVersion": 1
},
{
"id": "6fccc88f-9e72-49a3-952d-b7b1d9612091",
"name": "Upload image to S3",
"type": "n8n-nodes-base.s3",
"onError": "continueErrorOutput",
"position": [
1120,
580
],
"parameters": {
"fileName": "=fg-{{ $execution.id }}.jpg",
"operation": "upload",
"bucketName": "flux-generator",
"additionalFields": {}
},
"credentials": {
"s3": {
"id": "HZqaz9hPFlZp3BZ7",
"name": "S3 account"
}
},
"typeVersion": 1
},
{
"id": "7824dc49-c546-424e-8ba9-5f34b190d5f0",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1460,
440
],
"parameters": {
"color": 7,
"width": 302.9292231993488,
"height": 90.99855957953969,
"content": "### Respond to Form\nServe a webform with image on success. On error, send message to form."
},
"typeVersion": 1
},
{
"id": "71739ba4-b8db-439e-b8c3-06f3208126e3",
"name": "Hyper-Surreal Escape",
"type": "n8n-nodes-base.set",
"notes": " ",
"position": [
380,
240
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9ec60f33-b940-40a6-9f8a-cb944b7065f1",
"name": "stylePrompt",
"type": "string",
"value": "=golden ratio, rule of thirds, cyberpunk, glitch art, octane render, cinematic realism, 8k ::7 --ar 16:9 --s 1000\nCreate a hyper-realistic yet surreal landscape that bends reality, incorporating dreamlike elements and exaggerated proportions. Use vibrant, almost neon colors, and focus on a sense of wonder, play, and fantasy. Include:\n"
}
]
},
"includeOtherFields": true
},
"notesInFlow": true,
"typeVersion": 3.4
},
{
"id": "dcfdb152-a055-4f0f-baa5-7cf8afba36ae",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
440
],
"parameters": {
"color": 7,
"width": 186.9444130878394,
"height": 103.99685726445023,
"content": "### Serve form to user\nCaptures `Prompt to flux` and `Style` from user."
},
"typeVersion": 1
},
{
"id": "310f6c63-9441-4332-82dc-09b56e4f625a",
"name": "n8n Form Trigger",
"type": "n8n-nodes-base.formTrigger",
"position": [
-280,
660
],
"webhookId": "a35eb005-f795-4c85-9d00-0fe9797cb509",
"parameters": {
"path": "flux4free",
"options": {},
"formTitle": "flux.schnell image generator",
"formFields": {
"values": [
{
"fieldType": "textarea",
"fieldLabel": "Prompt to flux",
"placeholder": " An astronaut riding a horse in 35mm style",
"requiredField": true
},
{
"fieldType": "dropdown",
"fieldLabel": "Style",
"fieldOptions": {
"values": [
{
"option": "Hyper-Surreal Escape"
},
{
"option": "Neon Fauvism"
},
{
"option": "Post-Analog Glitchscape"
},
{
"option": "AI Dystopia"
},
{
"option": "Vivid Pop Explosion"
}
]
}
}
]
},
"responseMode": "responseNode",
"formDescription": "No ads, no BS. Uses hugginface inference API."
},
"typeVersion": 2.1
},
{
"id": "ad10a84f-851a-40f8-b10e-18356c4eeed6",
"name": "Call hugginface inference api",
"type": "n8n-nodes-base.httpRequest",
"notes": " ",
"onError": "continueErrorOutput",
"position": [
740,
660
],
"parameters": {
"url": "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "inputs",
"value": "=Depict {{ $json['Prompt to flux'] }}\n\nStyle: {{ $json.stylePrompt }}"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "r98SNEAnA5arilQO",
"name": "huggingface-nathan"
}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "e740dd3c-e23e-485b-bb4c-bb0515897a08",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
600
],
"parameters": {
"color": 7,
"width": 506.8102696237577,
"height": 337.24177957113216,
"content": "### Watch Set Up Video \ud83d\udc47\n[![Flux Generator](https://uploads.n8n.io/devrel/fluxgenerator.png#full-width)](https://youtu.be/Rv_1jt5WvtY)\n\n"
},
"typeVersion": 1
},
{
"id": "71d01821-3e0d-4c08-8571-58a158817e2c",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
440
],
"parameters": {
"color": 7,
"width": 506.8102696237577,
"height": 134.27496896630808,
"content": "# flux image generator\nBuilt by [@maxtkacz](https://x.com/maxtkacz) as part of the [30 Day AI Sprint](https://30dayaisprint.notion.site/)\nCheck out the project's [Notion page](https://30dayaisprint.notion.site/Flux-image-generator-bc94a8d2de8447c6ab70aacf2c4179f2) for more details"
},
"typeVersion": 1
},
{
"id": "0cc26680-ba63-464f-ba84-68c2616f95e2",
"name": "Route by style",
"type": "n8n-nodes-base.switch",
"position": [
0,
640
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Hyper-Surreal Escape",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Hyper-Surreal Escape"
}
]
},
"renameOutput": true
},
{
"outputKey": "Post-Analog Glitchscape",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "106969fa-994c-4b1e-b693-fc0b48ce5f3d",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Post-Analog Glitchscape"
}
]
},
"renameOutput": true
},
{
"outputKey": "AI Dystopia",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "24318e7d-4dc1-4369-b045-bb7d0a484def",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "AI Dystopia"
}
]
},
"renameOutput": true
},
{
"outputKey": "Neon Fauvism",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a80911ff-67fc-416d-b135-0401c336d6d8",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Neon Fauvism"
}
]
},
"renameOutput": true
},
{
"outputKey": "Vivid Pop Explosion",
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7fdeec28-194e-415e-8da2-8bac90e4c011",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.Style }}",
"rightValue": "Vivid Pop Explosion"
}
]
},
"renameOutput": true
}
]
},
"options": {
"fallbackOutput": "extra"
}
},
"typeVersion": 3.1
}
],
"pinData": {},
"connections": {
"None": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"AI Dystopia": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Neon Fauvism": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Route by style": {
"main": [
[
{
"node": "Hyper-Surreal Escape",
"type": "main",
"index": 0
}
],
[
{
"node": "Post-Analog Glitchscape",
"type": "main",
"index": 0
}
],
[
{
"node": "AI Dystopia",
"type": "main",
"index": 0
}
],
[
{
"node": "Neon Fauvism",
"type": "main",
"index": 0
}
],
[
{
"node": "Vivid Pop Explosion",
"type": "main",
"index": 0
}
],
[
{
"node": "None",
"type": "main",
"index": 0
}
]
]
},
"n8n Form Trigger": {
"main": [
[
{
"node": "Route by style",
"type": "main",
"index": 0
}
]
]
},
"Upload image to S3": {
"main": [
[
{
"node": "Serve webpage",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond with error",
"type": "main",
"index": 0
}
]
]
},
"Vivid Pop Explosion": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Hyper-Surreal Escape": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Post-Analog Glitchscape": {
"main": [
[
{
"node": "Call hugginface inference api",
"type": "main",
"index": 0
}
]
]
},
"Call hugginface inference api": {
"main": [
[
{
"node": "Upload image to S3",
"type": "main",
"index": 0
}
],
[
{
"node": "Respond with error",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,705 @@
{
"id": "GWXjIqENWvx6OqvX",
"meta": {
"instanceId": "94467bfa3af1aedd621d1940913d2d1a79e58bb9e7bbb0aa858d7f4a635296a5",
"templateCredsSetupCompleted": true
},
"name": "TEMPLATE - Multi Methods API Endpoint",
"tags": [],
"nodes": [
{
"id": "d5b5010f-97fb-4f80-871b-e9f04b3977a9",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1220,
-180
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.1
},
{
"id": "46711e2f-6cd1-4947-9452-7a1484ae562f",
"name": "Respond to Webhook1",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1220,
860
],
"parameters": {
"options": {
"responseCode": 201
},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.1
},
{
"id": "20489a88-39a5-4cf7-8c08-826e4e9a7f34",
"name": "Respond to Webhook2",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1220,
340
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.1
},
{
"id": "04320a5f-29fe-42b0-9e01-31035f23b9dc",
"name": "Respond to Webhook4",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1220,
600
],
"parameters": {
"options": {},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.1
},
{
"id": "45ef8f08-f765-440d-be85-12096b6b4105",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
940,
765.3897477624087
],
"parameters": {
"color": 4,
"width": 514,
"height": 255.253864930838,
"content": "#### Creation\nCreates a new record"
},
"typeVersion": 1
},
{
"id": "2e820357-250c-41a7-9daa-4eb77e7eded6",
"name": "Create",
"type": "n8n-nodes-base.airtable",
"position": [
1000,
860
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app662qLY5J8ys4fU",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU",
"cachedResultName": "customers"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblwvA7Wrmvmv37rq",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU/tblwvA7Wrmvmv37rq",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"email": "={{ $json.query.email }}",
"phone": "={{ $json.query.phone }}",
"address": "={{ $json.query.address }}",
"last_name": "={{ $json.query.last_name }}",
"first_name": "={{ $json.query.first_name }}",
"customer_id": "={{ $json.query.customer_id }}"
},
"schema": [
{
"id": "customer_id",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "customer_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "first_name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "first_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "last_name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "last_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": []
},
"options": {},
"operation": "create"
},
"credentials": {
"airtableTokenApi": {
"id": "yX3WnQ0zNClN0JoN",
"name": "Airtable giulio@n8n"
}
},
"typeVersion": 2.1
},
{
"id": "dceb7ad3-3c29-4cb9-b097-00c5ae1d2732",
"name": "Get All",
"type": "n8n-nodes-base.airtable",
"position": [
1000,
600
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app662qLY5J8ys4fU",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU",
"cachedResultName": "customers"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblwvA7Wrmvmv37rq",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU/tblwvA7Wrmvmv37rq",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search"
},
"credentials": {
"airtableTokenApi": {
"id": "yX3WnQ0zNClN0JoN",
"name": "Airtable giulio@n8n"
}
},
"typeVersion": 2.1
},
{
"id": "15a418ac-9de1-4c1d-ada7-057c280373df",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
940,
522.9617575264442
],
"parameters": {
"color": 4,
"width": 514,
"height": 228.69080553295362,
"content": "#### Get All\nRetrieves all records"
},
"typeVersion": 1
},
{
"id": "9736394d-3298-485c-b907-19804bbd48fb",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
940,
-260
],
"parameters": {
"color": 4,
"width": 514,
"height": 228,
"content": "#### Get\nRetrieves a single record"
},
"typeVersion": 1
},
{
"id": "b5544fc2-10cf-47dd-815c-51e8044e073d",
"name": "Get Single",
"type": "n8n-nodes-base.airtable",
"position": [
1000,
-180
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app662qLY5J8ys4fU",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU",
"cachedResultName": "customers"
},
"limit": 1,
"table": {
"__rl": true,
"mode": "list",
"value": "tblwvA7Wrmvmv37rq",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU/tblwvA7Wrmvmv37rq",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search",
"returnAll": false,
"filterByFormula": "=({customer_id} = {{ $json.params.id }})"
},
"credentials": {
"airtableTokenApi": {
"id": "yX3WnQ0zNClN0JoN",
"name": "Airtable giulio@n8n"
}
},
"typeVersion": 2.1
},
{
"id": "0f08fcee-b892-47ec-b13c-639f7e5b4b91",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
940,
260
],
"parameters": {
"color": 4,
"width": 508.29454841334433,
"height": 248.84784377542707,
"content": "#### Update\nUpdates of an existing record"
},
"typeVersion": 1
},
{
"id": "56ff1769-15fe-475d-96aa-9c0f1a9edf05",
"name": "Airtable",
"type": "n8n-nodes-base.airtable",
"position": [
1000,
340
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app662qLY5J8ys4fU",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU",
"cachedResultName": "customers"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblwvA7Wrmvmv37rq",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU/tblwvA7Wrmvmv37rq",
"cachedResultName": "Table 1"
},
"columns": {
"value": {
"email": "={{ $json.query.email }}",
"phone": "={{ $json.query.phone }}",
"address": "={{ $json.query.address }}",
"last_name": "={{ $json.query.last_name }}",
"first_name": "={{ $json.query.first_name }}",
"customer_id": "={{ $json.query.customer_id }}"
},
"schema": [
{
"id": "id",
"type": "string",
"display": true,
"removed": true,
"readOnly": true,
"required": false,
"displayName": "id",
"defaultMatch": true
},
{
"id": "customer_id",
"type": "number",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "customer_id",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "first_name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "first_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "last_name",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "last_name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "address",
"type": "string",
"display": true,
"removed": false,
"readOnly": false,
"required": false,
"displayName": "address",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"customer_id"
]
},
"options": {},
"operation": "update"
},
"credentials": {
"airtableTokenApi": {
"id": "yX3WnQ0zNClN0JoN",
"name": "Airtable giulio@n8n"
}
},
"typeVersion": 2.1
},
{
"id": "e20c0448-9688-47ae-873b-7cc5ac6e826a",
"name": "Respond to Webhook5",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1420,
80
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "allIncomingItems"
},
"typeVersion": 1.1
},
{
"id": "f13eb006-b576-4e65-9c04-7a8516dccb35",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
940,
-20
],
"parameters": {
"color": 4,
"width": 737.8307567127741,
"height": 267.43205858421476,
"content": "#### Delete\nDeletes a record"
},
"typeVersion": 1
},
{
"id": "0f434e52-2fda-41c0-9f40-38bf1977b8a6",
"name": "Airtable1",
"type": "n8n-nodes-base.airtable",
"position": [
1200,
80
],
"parameters": {
"id": "={{ $json.id }}",
"base": {
"__rl": true,
"mode": "list",
"value": "app662qLY5J8ys4fU",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU",
"cachedResultName": "customers"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblwvA7Wrmvmv37rq",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU/tblwvA7Wrmvmv37rq",
"cachedResultName": "Table 1"
},
"operation": "deleteRecord"
},
"credentials": {
"airtableTokenApi": {
"id": "yX3WnQ0zNClN0JoN",
"name": "Airtable giulio@n8n"
}
},
"typeVersion": 2.1
},
{
"id": "c58724ab-354b-43af-8a60-495837f8a4a2",
"name": "Get Single1",
"type": "n8n-nodes-base.airtable",
"position": [
1000,
80
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "app662qLY5J8ys4fU",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU",
"cachedResultName": "customers"
},
"limit": 1,
"table": {
"__rl": true,
"mode": "list",
"value": "tblwvA7Wrmvmv37rq",
"cachedResultUrl": "https://airtable.com/app662qLY5J8ys4fU/tblwvA7Wrmvmv37rq",
"cachedResultName": "Table 1"
},
"options": {},
"operation": "search",
"returnAll": false,
"filterByFormula": "=({customer_id} = {{ $json.params.id }})"
},
"credentials": {
"airtableTokenApi": {
"id": "yX3WnQ0zNClN0JoN",
"name": "Airtable giulio@n8n"
}
},
"typeVersion": 2.1
},
{
"id": "1b8fc8af-4892-4804-85d0-8e84904a3cf0",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
500,
720
],
"webhookId": "580ccc56-f308-4b64-961d-38323501a170",
"parameters": {
"path": "customers",
"options": {},
"responseMode": "responseNode",
"multipleMethods": true
},
"typeVersion": 2
},
{
"id": "7a8a9006-c2ea-4a87-8a94-fb925ed91abd",
"name": "Webhook (with ID)",
"type": "n8n-nodes-base.webhook",
"position": [
500,
80
],
"webhookId": "580ccc56-f308-4b64-961d-38323501a170",
"parameters": {
"path": "customers/:id",
"options": {},
"httpMethod": [
"GET",
"DELETE",
"PUT"
],
"responseMode": "responseNode",
"multipleMethods": true
},
"typeVersion": 2
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "b9009017-c9f6-4f8c-9592-350825e54476",
"connections": {
"Create": {
"main": [
[
{
"node": "Respond to Webhook1",
"type": "main",
"index": 0
}
]
]
},
"Get All": {
"main": [
[
{
"node": "Respond to Webhook4",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Get All",
"type": "main",
"index": 0
}
],
[
{
"node": "Create",
"type": "main",
"index": 0
}
]
]
},
"Airtable": {
"main": [
[
{
"node": "Respond to Webhook2",
"type": "main",
"index": 0
}
]
]
},
"Airtable1": {
"main": [
[
{
"node": "Respond to Webhook5",
"type": "main",
"index": 0
}
]
]
},
"Get Single": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Get Single1": {
"main": [
[
{
"node": "Airtable1",
"type": "main",
"index": 0
}
]
]
},
"Webhook (with ID)": {
"main": [
[
{
"node": "Get Single",
"type": "main",
"index": 0
}
],
[
{
"node": "Get Single1",
"type": "main",
"index": 0
}
],
[
{
"node": "Airtable",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,125 @@
{
"id": "OVSyGmI6YFviPu8Q",
"meta": {
"instanceId": "fb261afc5089eae952e09babdadd9983000b3d863639802f6ded8c5be2e40067",
"templateCredsSetupCompleted": true
},
"name": "Generate audio from text using OpenAI - text-to-speech Workflow",
"tags": [],
"nodes": [
{
"id": "c40966a4-1709-4998-ae95-b067ce3496c9",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1320,
200
],
"parameters": {
"options": {},
"respondWith": "binary"
},
"typeVersion": 1.1
},
{
"id": "c4e57bb6-79a4-4b26-a179-73e30d681521",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
-140
],
"parameters": {
"width": 501.55,
"height": 493.060000000001,
"content": "This `Webhook` node triggers the workflow when it receives a POST request.\n\n### 1. Test Mode:\n* Use the test webhook URL\n* Click the `Test workflow` button on the canvas. (In test mode, the webhook only works for one call after you click this button)\n\n### 1. Production Mode:\n* The workflow must be active for a **Production URL** to run successfully.\n* You can activate the workflow using the toggle in the top-right of the editor.\n* Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)."
},
"typeVersion": 1
},
{
"id": "1364a4b6-2651-4b38-b335-c36783a25f12",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
825,
60
],
"parameters": {
"color": 4,
"width": 388.35000000000025,
"height": 292.71000000000043,
"content": "### Configure the OpenAI node with your API key:\nIf you haven't connected your OpenAI credentials in n8n yet, log in to your OpenAI account to get your API Key. Then, open the OpenAI node, click `Create New Credentials` and connect with the **OpenAI API**.\n"
},
"typeVersion": 1
},
{
"id": "ba755814-75e6-4e16-b3a6-50cf4fc06350",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
480,
200
],
"webhookId": "28feeb38-ef2d-4a2e-bd7c-25a524068e25",
"parameters": {
"path": "generate_audio",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "ac46df50-cb1f-484c-8edf-8131192ba464",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
960,
200
],
"parameters": {
"input": "={{ $json.body.text_to_convert }}",
"voice": "fable",
"options": {},
"resource": "audio"
},
"credentials": {
"openAiApi": {
"id": "2Cije3KX7OIVwn9B",
"name": "n8n OpenAI"
}
},
"typeVersion": 1.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "84f1b893-e1a3-40c3-83b0-7cd637b353c4",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,202 @@
{
"id": "aZSJ2BZQhNduZZ8w",
"meta": {
"instanceId": "d47f3738b860eed937a1b18d7345fa2c65cf4b4957554e29477cb064a7039870",
"templateCredsSetupCompleted": true
},
"name": "Get Airtable data in Obsidian Notes",
"tags": [
{
"id": "zalLN3OHeRqcq4di",
"name": "Obsidian",
"createdAt": "2024-12-01T19:07:59.925Z",
"updatedAt": "2024-12-01T19:07:59.925Z"
}
],
"nodes": [
{
"id": "584cfe61-7f1b-4deb-ab4b-45a5ffd20daf",
"name": "Airtable",
"type": "n8n-nodes-base.airtableTool",
"position": [
540,
340
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appP3ocJy1rXIo6ko",
"cachedResultUrl": "https://airtable.com/appP3ocJy1rXIo6ko",
"cachedResultName": "table"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblywtlpPtGQMTJRm",
"cachedResultUrl": "https://airtable.com/appP3ocJy1rXIo6ko/tblywtlpPtGQMTJRm",
"cachedResultName": "Dummy"
},
"options": {},
"operation": "search"
},
"credentials": {
"airtableTokenApi": {
"id": "yiZ7ZC1md4geZovu",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "8a100c92-7971-464b-b3c0-18272f0a0bef",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
220,
340
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "q8L9oWVM7QyzYEE5",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "98887b9b-2eae-4a2e-af2b-d40c1786c5a2",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
280,
200
],
"parameters": {
"text": "={{ $json.body.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "91296976-3d78-4a9e-9f4c-a4136abcca4e",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-260
],
"parameters": {
"color": 7,
"width": 497.9113826976365,
"height": 389.9939760040372,
"content": "[![YouTube Video](https://img.youtube.com/vi/2PIdeTgsENo/0.jpg)](https://www.youtube.com/watch?v=2PIdeTgsENo)"
},
"typeVersion": 1
},
{
"id": "7adae874-d388-4265-aff8-28a1970bd0fb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
360,
-240
],
"parameters": {
"width": 563.3824678865192,
"height": 368.0048034646952,
"content": "## Get Airtable Data in Obsidian with AI Agent\n<-- Watch the video to see it in action!\n\n**How to Set Up:**\n- Install the [Post Webhook Plugin](https://github.com/Masterb1234/obsidian-post-webhook/) in Obsidian.\n- Insert the n8n Webhook URL into the Post Webhook plugin settings.\n- Configure Your Airtable Node to match your workflow needs.\n\n\n**How to Use:**\n- Highlight text containing a question about your Airtable data.\n- Open the Obsidian Command Palette (Ctrl+P) and choose 'Send Selection to [Your Webhook]'.\n- Click, wait for the AI Agent to process your request, and see the result appear below your selected text."
},
"typeVersion": 1
},
{
"id": "52c40581-656d-45b5-b366-d67cf2474312",
"name": "Respond to Obsidian",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
700,
200
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.output }}"
},
"typeVersion": 1.1
},
{
"id": "f2bf502e-5e6f-4e71-8c4f-27ec2dc5ab67",
"name": "Webhook Set Up in Obsidian",
"type": "n8n-nodes-base.webhook",
"position": [
-40,
200
],
"webhookId": "59fc8248-d3f7-4dbc-bdf3-39d59e427160",
"parameters": {
"path": "59fc8248-d3f7-4dbc-bdf3-39d59e427160",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "dab99881-2d04-4113-9a4e-2f942fdf1c24",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Respond to Obsidian",
"type": "main",
"index": 0
}
]
]
},
"Airtable": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Webhook Set Up in Obsidian": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,125 @@
{
"id": "OVSyGmI6YFviPu8Q",
"meta": {
"instanceId": "fb261afc5089eae952e09babdadd9983000b3d863639802f6ded8c5be2e40067",
"templateCredsSetupCompleted": true
},
"name": "Generate audio from text using OpenAI - text-to-speech Workflow",
"tags": [],
"nodes": [
{
"id": "c40966a4-1709-4998-ae95-b067ce3496c9",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1320,
200
],
"parameters": {
"options": {},
"respondWith": "binary"
},
"typeVersion": 1.1
},
{
"id": "c4e57bb6-79a4-4b26-a179-73e30d681521",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
280,
-140
],
"parameters": {
"width": 501.55,
"height": 493.060000000001,
"content": "This `Webhook` node triggers the workflow when it receives a POST request.\n\n### 1. Test Mode:\n* Use the test webhook URL\n* Click the `Test workflow` button on the canvas. (In test mode, the webhook only works for one call after you click this button)\n\n### 1. Production Mode:\n* The workflow must be active for a **Production URL** to run successfully.\n* You can activate the workflow using the toggle in the top-right of the editor.\n* Note that unlike test URL calls, production URL calls aren't shown on the canvas (only in the executions list)."
},
"typeVersion": 1
},
{
"id": "1364a4b6-2651-4b38-b335-c36783a25f12",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
825,
60
],
"parameters": {
"color": 4,
"width": 388.35000000000025,
"height": 292.71000000000043,
"content": "### Configure the OpenAI node with your API key:\nIf you haven't connected your OpenAI credentials in n8n yet, log in to your OpenAI account to get your API Key. Then, open the OpenAI node, click `Create New Credentials` and connect with the **OpenAI API**.\n"
},
"typeVersion": 1
},
{
"id": "ba755814-75e6-4e16-b3a6-50cf4fc06350",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
480,
200
],
"webhookId": "28feeb38-ef2d-4a2e-bd7c-25a524068e25",
"parameters": {
"path": "generate_audio",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "ac46df50-cb1f-484c-8edf-8131192ba464",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
960,
200
],
"parameters": {
"input": "={{ $json.body.text_to_convert }}",
"voice": "fable",
"options": {},
"resource": "audio"
},
"credentials": {
"openAiApi": {
"id": "2Cije3KX7OIVwn9B",
"name": "n8n OpenAI"
}
},
"typeVersion": 1.3
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "84f1b893-e1a3-40c3-83b0-7cd637b353c4",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,131 @@
{
"id": "Q8On8rR6BkmPzDUd",
"meta": {
"instanceId": "f57770b08f6a574802832e927ed1b0063c627ffc5b95965abf0d4a7396150138"
},
"name": "chrome extension backend with AI",
"tags": [],
"nodes": [
{
"id": "0f38fe62-36d9-43da-a992-a3981377e89e",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-220,
-20
],
"webhookId": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c",
"parameters": {
"path": "e9a97dd5-f1e7-4d5b-a6f1-be5f0c9eb96c",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "83959562-edf5-4d37-bd11-47186c6a31c7",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-40,
-20
],
"parameters": {
"text": "You are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language.",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"resource": "image",
"inputType": "base64",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "8MS1muoK4z86fxUs",
"name": "OpenAi account"
}
},
"typeVersion": 1.7
},
{
"id": "c6f1f833-7ba3-49c5-86df-f586e6bb5975",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
140,
-20
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.content }}"
},
"typeVersion": 1.1
},
{
"id": "e3a38a76-283b-4567-a8da-315ef1e2bc4f",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
-140
],
"parameters": {
"width": 620,
"height": 300,
"content": "## N8N en OpenAI image analyser"
},
"typeVersion": 1
},
{
"id": "8e7e26db-8767-4727-ab0c-900b50a73411",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
180
],
"parameters": {
"color": 5,
"height": 340,
"content": "## AI prompt\nYou are an expert financial analyst tasked with providing an advanced technical analyses of a stock or crypto currency chart provided. Your analysis will be based on various technical indicators and will provide simple insights for novice traders. Just explain to traders were you expect the market is moving. Also warn them this is not a binding advice. Make sure to explain everything in infant language."
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "caf32442-e9c5-466a-8888-9abd2c1b3449",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,163 @@
{
"meta": {
"instanceId": "205b3bc06c96f2dc835b4f00e1cbf9a937a74eeb3b47c99d0c30b0586dbf85aa",
"templateId": "2436"
},
"nodes": [
{
"id": "b24c6e28-3c9e-4069-9e87-49b2efd47257",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1200,
660
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "AzPPV759YPBxJj3o",
"name": "Max's DevRel OpenAI account"
}
},
"typeVersion": 1
},
{
"id": "c71a3e22-f0fd-4377-9be2-32438b282430",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
240
],
"parameters": {
"color": 7,
"width": 636.2128494576581,
"height": 494.9629292914819,
"content": "![Siri Template Thumbnail](https://uploads.n8n.io/devrel/wf-siri-header.png#full-width)\n## \"Hey Siri, Ask Agent\" workflow\n**Made by [Max Tkacz](https://www.linkedin.com/in/maxtkacz) during the [30 Day AI Sprint](https://30dayaisprint.notion.site/)**\n\nThis template integrates with Apple Shortcuts to trigger an n8n AI Agent via a \"Hey Siri\" command. The shortcut prompts for spoken input, transcribes it, and sends it to the workflow's `When Called by Apple Shortcut` Webhook trigger. The AI Agent processes the input and Siri dictates the response back to you.\n\nThe workflow also passes the current date and time to the `AI Agent`, which you can extend with additional context, like data from an App node, for more customized responses.\n\n"
},
"typeVersion": 1
},
{
"id": "a4ec93c3-eefa-4006-b02c-f995fb7bc410",
"name": "Respond to Apple Shortcut",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1640,
460
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.output }}"
},
"typeVersion": 1.1
},
{
"id": "942b284e-e26a-4534-8f33-eb92b0a88fdb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
200,
760
],
"parameters": {
"color": 7,
"width": 280.2462120317618,
"height": 438.5821431288714,
"content": "### Set up steps\n1. Add an OpenAI API credential in `OpenAI Chat Model` node, or replace it with another model. Try `Groq` if you want a free alternative (can be used with free Groq account, no CC).\n2. Copy the \"Production URL\" from `When called by Apple Shortcut` node, you'll need this when setting up the shortcut.\n3. Save and activate this n8n workflow.\n4. Download the [Apple Shortcut here](https://uploads.n8n.io/devrel/ask-agent.shortcut), open it on macOS or iOS. This adds the shortcut to your device.\n5. Open the shortcut and swap URL in `Get contents of\" step to the \"Production URL\" you copied from `When called by Apple Shortcut`.\n6. Test it by saying \"Hey Siri, AI Agent\", then ask a question."
},
"typeVersion": 1
},
{
"id": "ebb9e886-546a-429c-b4b5-35c0a7b6370e",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
503.6292958565226,
760
],
"parameters": {
"color": 7,
"width": 330.5152611046425,
"height": 240.6839895136402,
"content": "### ... or watch set up video [5 min]\n[![Siri Template Thumbnail](https://uploads.n8n.io/devrel/thumb-siri.png#full-width)](https://youtu.be/dewsB-4iGA8)\n"
},
"typeVersion": 1
},
{
"id": "5a842fa9-be8c-4ba8-996b-a26a53273b3f",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1240,
460
],
"parameters": {
"text": "=Here is my request: {{ $json.body.input }}\n",
"agent": "conversationalAgent",
"options": {
"systemMessage": "=## Task\nYou are a helpful assistant. Provide concise replies as the user receives them via voice on their mobile phone. Avoid using symbols like \"\\n\" to prevent them from being narrated.\n\n## Context\n- Today is {{ $now.format('dd LLL yy') }}.\n- Current time: {{ $now.format('h:mm a') }} in Berlin, Germany.\n- When asked, you are an AI Agent running as an n8n workflow.\n\n## Output\nKeep responses short and clear, optimized for voice delivery. Don't hallucinate, if you don't know the answer, say you don't know. "
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.6
},
{
"id": "598d22d5-7472-44c5-ab2e-69c8bbb23ddd",
"name": "When called by Apple Shortcut",
"type": "n8n-nodes-base.webhook",
"position": [
980,
460
],
"webhookId": "f0224b4b-1644-4d3d-9f12-01a9c04879e4",
"parameters": {
"path": "assistant",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
}
],
"pinData": {},
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Respond to Apple Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"When called by Apple Shortcut": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,504 @@
{
"meta": {
"instanceId": "f4f5d195bb2162a0972f737368404b18be694648d365d6c6771d7b4909d28167"
},
"nodes": [
{
"id": "b165115d-5505-4e03-bf41-c21320cb8b09",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
40
],
"parameters": {
"color": 7,
"width": 681.8337349708484,
"height": 843.1482165886073,
"content": "## Workflow: Text automations using Apple Shortcuts\n\n**Overview**\n- This workflow answers user requests sent via Apple Shortcuts\n- Several Shortcuts call the same webhook, with a query and a type of query\n- Types of query are:\n - translate to english\n - translate to spanish\n - correct grammar (without changing the actual content)\n - make content shorter\n - make content longer\n\n\n**How it works**\n- Select a text you are writing\n- Launch the shortcut\n- The text is sent to the webhook\n- Depending on the type of request, a different prompt is used\n- Each request is sent to an OpenAI node\n- The workflow responds to the request with the response from GPT\n- Shortcut replace the selected text with the new one\n\n**How to use it**\n- Activate the workflow\n- Download [this Shortcut template](https://drive.usercontent.google.com/u/0/uc?id=16zs5iJX7KeX_4e0SoV49_KfbU7-EF0NE&export=download)\n- Install the shortcut\n- In step 2 of the shortcut, change the url of the Webhook\n- In Shortcut details, \"add Keyboard Shortcut\" with the key you want to use to launch the shortcut\n- Go to settings, advanced, check \"Allow running scripts\"\n- You are ready to use the shortcut. Select a text and hit the keyboard shortcut you just defined\n\n\n**Notes**\n- If you use rich formatting, you'll have to test multiple ways to replace characters in the output. For example, you might use `{{ $json.message.content.output.replaceAll('\\n', \"<br/>\") }}` in the \"Respond to Shortcut\" node depending on the app you use most.\n- This is a basic example that you can extend and modify at your will\n- You can duplicate and modify the example shortcut based on your need, as well as making new automations in this workflow."
},
"typeVersion": 1
},
{
"id": "c45400b8-d3b8-47f7-81c6-d791bce4c266",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1020,
380
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "spanish",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "spanish"
}
]
},
"renameOutput": true
},
{
"outputKey": "english",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bedb302f-646c-4dcd-8246-1fcfecfe3f2e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "english"
}
]
},
"renameOutput": true
},
{
"outputKey": "grammar",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "94e6cf7d-576d-4ad9-85b0-c6b945eb41b7",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "grammar"
}
]
},
"renameOutput": true
},
{
"outputKey": "shorter",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1ed0d1e1-2df0-4f8d-b102-4004a25919ed",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "shorter"
}
]
},
"renameOutput": true
},
{
"outputKey": "longer",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4756df03-7e7c-4e28-9b37-14684326b083",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "longer"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "48e0e58e-6293-4e11-a488-ca9943b53484",
"name": "Respond to Shortcut",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1840,
400
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.message.content.output.replaceAll('\\n', '<br/>') }}"
},
"typeVersion": 1.1
},
{
"id": "2655b782-9538-416c-ae65-35f8c77889c7",
"name": "Webhook from Shortcut",
"type": "n8n-nodes-base.webhook",
"position": [
840,
400
],
"webhookId": "e4ddadd2-a127-4690-98ca-e9ee75c1bdd6",
"parameters": {
"path": "shortcut-global-as",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "880ed4a2-0756-4943-a51f-368678e22273",
"name": "OpenAI - Make Shorter",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
540
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Summarize this content a little bit (5% shorter)\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "c6c6d988-7aab-4677-af1f-880d05691ec3",
"name": "OpenAI - Make Longer",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
680
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Make this content a little longer (5% longer)\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "8e6de4b7-22c3-45c9-a8d7-d498cf829b6f",
"name": "OpenAI - Correct Grammar",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
400
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Correct grammar only, don't change the actual contents.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "bc006b36-5a96-4c3a-9a28-2778a6c49f10",
"name": "OpenAI - To Spanish",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
120
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Translate this message to Spanish.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "330d2e40-1e52-4517-94e0-ce96226697fa",
"name": "OpenAI - To English",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
260
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Translate this message to English.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "925e4b55-ac26-4c16-941f-66d17b6794ab",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
900
],
"parameters": {
"color": 7,
"width": 469.15174499329123,
"height": 341.88919758842485,
"content": "### Check these explanations [< 3 min]\n\n[![Check the explanations](https://cdn.loom.com/sessions/thumbnails/c5b657568af64bb1b50fa8e8a91c45d1-1db3990a618986c9-full-play.gif)](https://www.loom.com/share/c5b657568af64bb1b50fa8e8a91c45d1?sid=a406be73-55eb-4754-9f51-9ddf49b22d69)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Switch": {
"main": [
[
{
"node": "OpenAI - To Spanish",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - To English",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Correct Grammar",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Make Shorter",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Make Longer",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - To English": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - To Spanish": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Make Longer": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Make Shorter": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"Webhook from Shortcut": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Correct Grammar": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,504 @@
{
"meta": {
"instanceId": "f4f5d195bb2162a0972f737368404b18be694648d365d6c6771d7b4909d28167"
},
"nodes": [
{
"id": "b165115d-5505-4e03-bf41-c21320cb8b09",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
40
],
"parameters": {
"color": 7,
"width": 681.8337349708484,
"height": 843.1482165886073,
"content": "## Workflow: Text automations using Apple Shortcuts\n\n**Overview**\n- This workflow answers user requests sent via Apple Shortcuts\n- Several Shortcuts call the same webhook, with a query and a type of query\n- Types of query are:\n - translate to english\n - translate to spanish\n - correct grammar (without changing the actual content)\n - make content shorter\n - make content longer\n\n\n**How it works**\n- Select a text you are writing\n- Launch the shortcut\n- The text is sent to the webhook\n- Depending on the type of request, a different prompt is used\n- Each request is sent to an OpenAI node\n- The workflow responds to the request with the response from GPT\n- Shortcut replace the selected text with the new one\n\n**How to use it**\n- Activate the workflow\n- Download [this Shortcut template](https://drive.usercontent.google.com/u/0/uc?id=16zs5iJX7KeX_4e0SoV49_KfbU7-EF0NE&export=download)\n- Install the shortcut\n- In step 2 of the shortcut, change the url of the Webhook\n- In Shortcut details, \"add Keyboard Shortcut\" with the key you want to use to launch the shortcut\n- Go to settings, advanced, check \"Allow running scripts\"\n- You are ready to use the shortcut. Select a text and hit the keyboard shortcut you just defined\n\n\n**Notes**\n- If you use rich formatting, you'll have to test multiple ways to replace characters in the output. For example, you might use `{{ $json.message.content.output.replaceAll('\\n', \"<br/>\") }}` in the \"Respond to Shortcut\" node depending on the app you use most.\n- This is a basic example that you can extend and modify at your will\n- You can duplicate and modify the example shortcut based on your need, as well as making new automations in this workflow."
},
"typeVersion": 1
},
{
"id": "c45400b8-d3b8-47f7-81c6-d791bce4c266",
"name": "Switch",
"type": "n8n-nodes-base.switch",
"position": [
1020,
380
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "spanish",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "spanish"
}
]
},
"renameOutput": true
},
{
"outputKey": "english",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "bedb302f-646c-4dcd-8246-1fcfecfe3f2e",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "english"
}
]
},
"renameOutput": true
},
{
"outputKey": "grammar",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "94e6cf7d-576d-4ad9-85b0-c6b945eb41b7",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "grammar"
}
]
},
"renameOutput": true
},
{
"outputKey": "shorter",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "1ed0d1e1-2df0-4f8d-b102-4004a25919ed",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "shorter"
}
]
},
"renameOutput": true
},
{
"outputKey": "longer",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "4756df03-7e7c-4e28-9b37-14684326b083",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.body.type }}",
"rightValue": "longer"
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "48e0e58e-6293-4e11-a488-ca9943b53484",
"name": "Respond to Shortcut",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1840,
400
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.message.content.output.replaceAll('\\n', '<br/>') }}"
},
"typeVersion": 1.1
},
{
"id": "2655b782-9538-416c-ae65-35f8c77889c7",
"name": "Webhook from Shortcut",
"type": "n8n-nodes-base.webhook",
"position": [
840,
400
],
"webhookId": "e4ddadd2-a127-4690-98ca-e9ee75c1bdd6",
"parameters": {
"path": "shortcut-global-as",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "880ed4a2-0756-4943-a51f-368678e22273",
"name": "OpenAI - Make Shorter",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
540
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Summarize this content a little bit (5% shorter)\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "c6c6d988-7aab-4677-af1f-880d05691ec3",
"name": "OpenAI - Make Longer",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
680
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Make this content a little longer (5% longer)\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "8e6de4b7-22c3-45c9-a8d7-d498cf829b6f",
"name": "OpenAI - Correct Grammar",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
400
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Correct grammar only, don't change the actual contents.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "bc006b36-5a96-4c3a-9a28-2778a6c49f10",
"name": "OpenAI - To Spanish",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
120
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Translate this message to Spanish.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "330d2e40-1e52-4517-94e0-ce96226697fa",
"name": "OpenAI - To English",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1300,
260
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"messages": {
"values": [
{
"role": "system",
"content": "Translate this message to English.\nOutput a JSON with a single field: output"
},
{
"content": "={{ $json.body.content }}"
}
]
},
"jsonOutput": true
},
"credentials": {
"openAiApi": {
"id": "WqzqjezKh8VtxdqA",
"name": "OpenAi account - Baptiste"
}
},
"typeVersion": 1.4
},
{
"id": "925e4b55-ac26-4c16-941f-66d17b6794ab",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
80,
900
],
"parameters": {
"color": 7,
"width": 469.15174499329123,
"height": 341.88919758842485,
"content": "### Check these explanations [< 3 min]\n\n[![Check the explanations](https://cdn.loom.com/sessions/thumbnails/c5b657568af64bb1b50fa8e8a91c45d1-1db3990a618986c9-full-play.gif)](https://www.loom.com/share/c5b657568af64bb1b50fa8e8a91c45d1?sid=a406be73-55eb-4754-9f51-9ddf49b22d69)"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Switch": {
"main": [
[
{
"node": "OpenAI - To Spanish",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - To English",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Correct Grammar",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Make Shorter",
"type": "main",
"index": 0
}
],
[
{
"node": "OpenAI - Make Longer",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - To English": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - To Spanish": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Make Longer": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Make Shorter": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
},
"Webhook from Shortcut": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
]
]
},
"OpenAI - Correct Grammar": {
"main": [
[
{
"node": "Respond to Shortcut",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,202 @@
{
"id": "aZSJ2BZQhNduZZ8w",
"meta": {
"instanceId": "d47f3738b860eed937a1b18d7345fa2c65cf4b4957554e29477cb064a7039870",
"templateCredsSetupCompleted": true
},
"name": "Get Airtable data in Obsidian Notes",
"tags": [
{
"id": "zalLN3OHeRqcq4di",
"name": "Obsidian",
"createdAt": "2024-12-01T19:07:59.925Z",
"updatedAt": "2024-12-01T19:07:59.925Z"
}
],
"nodes": [
{
"id": "584cfe61-7f1b-4deb-ab4b-45a5ffd20daf",
"name": "Airtable",
"type": "n8n-nodes-base.airtableTool",
"position": [
540,
340
],
"parameters": {
"base": {
"__rl": true,
"mode": "list",
"value": "appP3ocJy1rXIo6ko",
"cachedResultUrl": "https://airtable.com/appP3ocJy1rXIo6ko",
"cachedResultName": "table"
},
"table": {
"__rl": true,
"mode": "list",
"value": "tblywtlpPtGQMTJRm",
"cachedResultUrl": "https://airtable.com/appP3ocJy1rXIo6ko/tblywtlpPtGQMTJRm",
"cachedResultName": "Dummy"
},
"options": {},
"operation": "search"
},
"credentials": {
"airtableTokenApi": {
"id": "yiZ7ZC1md4geZovu",
"name": "Airtable Personal Access Token account"
}
},
"typeVersion": 2.1
},
{
"id": "8a100c92-7971-464b-b3c0-18272f0a0bef",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
220,
340
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"openAiApi": {
"id": "q8L9oWVM7QyzYEE5",
"name": "OpenAi account"
}
},
"typeVersion": 1
},
{
"id": "98887b9b-2eae-4a2e-af2b-d40c1786c5a2",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
280,
200
],
"parameters": {
"text": "={{ $json.body.content }}",
"options": {},
"promptType": "define"
},
"typeVersion": 1.6
},
{
"id": "91296976-3d78-4a9e-9f4c-a4136abcca4e",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-160,
-260
],
"parameters": {
"color": 7,
"width": 497.9113826976365,
"height": 389.9939760040372,
"content": "[![YouTube Video](https://img.youtube.com/vi/2PIdeTgsENo/0.jpg)](https://www.youtube.com/watch?v=2PIdeTgsENo)"
},
"typeVersion": 1
},
{
"id": "7adae874-d388-4265-aff8-28a1970bd0fb",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
360,
-240
],
"parameters": {
"width": 563.3824678865192,
"height": 368.0048034646952,
"content": "## Get Airtable Data in Obsidian with AI Agent\n<-- Watch the video to see it in action!\n\n**How to Set Up:**\n- Install the [Post Webhook Plugin](https://github.com/Masterb1234/obsidian-post-webhook/) in Obsidian.\n- Insert the n8n Webhook URL into the Post Webhook plugin settings.\n- Configure Your Airtable Node to match your workflow needs.\n\n\n**How to Use:**\n- Highlight text containing a question about your Airtable data.\n- Open the Obsidian Command Palette (Ctrl+P) and choose 'Send Selection to [Your Webhook]'.\n- Click, wait for the AI Agent to process your request, and see the result appear below your selected text."
},
"typeVersion": 1
},
{
"id": "52c40581-656d-45b5-b366-d67cf2474312",
"name": "Respond to Obsidian",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
700,
200
],
"parameters": {
"options": {},
"respondWith": "text",
"responseBody": "={{ $json.output }}"
},
"typeVersion": 1.1
},
{
"id": "f2bf502e-5e6f-4e71-8c4f-27ec2dc5ab67",
"name": "Webhook Set Up in Obsidian",
"type": "n8n-nodes-base.webhook",
"position": [
-40,
200
],
"webhookId": "59fc8248-d3f7-4dbc-bdf3-39d59e427160",
"parameters": {
"path": "59fc8248-d3f7-4dbc-bdf3-39d59e427160",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "dab99881-2d04-4113-9a4e-2f942fdf1c24",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Respond to Obsidian",
"type": "main",
"index": 0
}
]
]
},
"Airtable": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Webhook Set Up in Obsidian": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,272 @@
{
"id": "qww129cm4TM9N8Ru",
"meta": {
"instanceId": "038da3428bba4563b42be267feeca21b4922693db254331ac640a5c56ee7cadf",
"templateCredsSetupCompleted": true
},
"name": "InstaTest",
"tags": [
{
"id": "8PlqXsDyqVlHJ7RC",
"name": "AI",
"createdAt": "2024-07-10T14:12:10.657Z",
"updatedAt": "2024-07-10T14:12:10.657Z"
}
],
"nodes": [
{
"id": "51dcaa84-d1f9-4abc-aebc-24a06801e42d",
"name": "Set your system promt for AI",
"type": "n8n-nodes-base.set",
"notes": "In this node in \"prompt\" variable you can set your system prompt",
"position": [
1120,
620
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "0b3c3d71-5627-4b8c-91f0-ac44eaedf196",
"name": "prompt",
"type": "string",
"value": "=Persona: You are a instagram influencer.\nContext: You receive a messages from your subscribers\nTask: Answer questions in your writing style and patterns according to your previous posts text. Use your post only for style and patterns reference.\nStyle rules:\nsimple answers"
},
{
"id": "c2a9e272-5c0d-4685-ad0e-ce6995f92a1c",
"name": "sessionId",
"type": "string",
"value": "={{ $json.body.session_id }}"
},
{
"id": "b3c20ee3-07a1-4584-b0d9-7310a2c6b723",
"name": "chatInput",
"type": "string",
"value": "={{ $json.body.text }}"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "0fb36573-d632-4403-8809-3973f9caa32a",
"name": "Local n8n memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1500,
780
],
"parameters": {
"sessionKey": "={{ $('Set your system promt for AI').last().json.sessionId }}",
"sessionIdType": "customKey",
"contextWindowLength": 20
},
"typeVersion": 1.3
},
{
"id": "2f0471a7-2a84-41ce-aab1-896d5ea95ac3",
"name": "ChatGPT model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1360,
780
],
"parameters": {
"options": {}
},
"credentials": {
"openAiApi": {
"id": "HxWZhtJcnqTXVHAA",
"name": "General"
}
},
"typeVersion": 1
},
{
"id": "49abc3a3-faf9-4249-b874-908138a84aea",
"name": "Send respond ",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1720,
620
],
"parameters": {
"options": {}
},
"typeVersion": 1.1
},
{
"id": "49382508-9307-4ffa-8b31-78fac3a7db10",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
320,
360
],
"parameters": {
"color": 5,
"width": 458.4028599661066,
"height": 447.98321744507007,
"content": "## Easy Instagram(via ManyChat) bot\n---\n### Description:\nThis template is a main part of Entire solution. It's getting new message from Instagram via ManyChat(Extra No-Code tool for getting and sending message in Instagram). Generating message using ChatGPT and send back to ManyChat that sends it to Instagrtam.\n\n### Logic:\n1. Getting message from Instagram(from ManyChat)\n2. Set you system prompt for AI\n3. Create simple answer for message in AI block\n4. Send answer to Instagram(to ManyChat)\n\n---\n*Helpful links:*\n- [Guide in Notion how to create full bot](https://shadowed-pound-d6e.notion.site/Instagram-GPT-light-version-Manychat-X-N8N-176293bddff880899a9ac255585d29f7?pvs=4)\n- [ManyChat](https://manychat.partnerlinks.io/vm4wkw8j81tc)"
},
"typeVersion": 1
},
{
"id": "5d14544c-7039-435f-a53c-615b5722bb99",
"name": "Getting message from Instagram",
"type": "n8n-nodes-base.webhook",
"position": [
900,
620
],
"webhookId": "68d3fbc9-6e49-4bdc-851c-2a532be911ab",
"parameters": {
"path": "instagram_chat",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "3770f558-341b-4d67-a7f0-0bb2fecf51a3",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1320,
300
],
"parameters": {
"width": 313.9634922216307,
"height": 614.7475040550845,
"content": "## 3) AI block\n---\nThere is 3 nodes:\n- AI Agent\n- Chat GPT model\n- Memory for history messages\n\n### To do:\n- in ChatGPT node you can choose the best model for you\n- in Memory Block you can change number of messages in history\n\n"
},
"typeVersion": 1
},
{
"id": "cbb6c5a2-9b96-4305-afce-5ac560ae2dec",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1340,
620
],
"parameters": {
"text": "={{ $json.chatInput }}",
"options": {
"systemMessage": "={{ $json.prompt }}"
},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "4e28119f-b1aa-4b20-a8ed-28bd137f9627",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
360
],
"parameters": {
"height": 440,
"content": "## 1) HTTP Post webhook\n\n**To do:**\nJust copy production link from this node and insert to custom action in ManyChat\n\nNo edits needed"
},
"typeVersion": 1
},
{
"id": "b18a8890-b420-4086-91c8-8edbc845c8af",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
480
],
"parameters": {
"width": 220,
"height": 320,
"content": "## 2) Edit prompt\n\n**To do:**\nGo inside and change input\n"
},
"typeVersion": 1
},
{
"id": "74d4e6f5-069e-4b37-8005-8c03226b05df",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1660,
480
],
"parameters": {
"height": 300,
"content": "## 4) Respond webhook\n\nNo edits needed"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2f36fc7a-0a69-4af3-a958-25e9d278f058",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Send respond ",
"type": "main",
"index": 0
}
]
]
},
"ChatGPT model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Local n8n memory": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Set your system promt for AI": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Getting message from Instagram": {
"main": [
[
{
"node": "Set your system promt for AI",
"type": "main",
"index": 0
}
]
]
}
}
}

View File

@@ -0,0 +1,145 @@
{
"id": "wDD4XugmHIvx3KMT",
"meta": {
"instanceId": "149cdf730f0c143663259ddc6124c9c26e824d8d2d059973b871074cf4bda531"
},
"name": "Image Generation API",
"tags": [],
"nodes": [
{
"id": "d743f947-ad45-4e59-97d4-79b98eaddedb",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
260,
-20
],
"webhookId": "970dd3c6-de83-46fd-9038-33c470571390",
"parameters": {
"path": "970dd3c6-de83-46fd-9038-33c470571390",
"options": {},
"responseMode": "responseNode"
},
"typeVersion": 1.1
},
{
"id": "832e993e-69e9-475b-8322-776d88da0440",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1400,
-20
],
"parameters": {
"options": {},
"respondWith": "binary"
},
"typeVersion": 1
},
{
"id": "53044a93-375f-48f2-971d-bf765bcdb7a0",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-120
],
"parameters": {
"width": 301.7420425026802,
"height": 260.80333469825376,
"content": "## Webhook Trigger \n**This Node starts listening to requests to the Webhook URL**\n\n"
},
"typeVersion": 1
},
{
"id": "c7b3b04e-903b-4d7c-bbf1-2bc2f1b1a426",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
180,
-460
],
"parameters": {
"width": 469.32758643852594,
"height": 297.34454352637044,
"content": "## Creating your Prompt-URL \n**To use this Workflow you need to append your prompt to your Webhook URL in the following way**\n\n1. Take your Webhook URL\n2. Ideate a Prompt and Replace every Space (\" \") by %20 (Url Encoding)\n3. Append \"?input=\" and right after that your encoded prompt to your url\n4. Copy paste this into a webbrowser as soon as you run the Webhook"
},
"typeVersion": 1
},
{
"id": "473ff6e5-441a-4706-86a4-190936cc6ac1",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
540,
-54.959833265087354
],
"parameters": {
"width": 522.2493371551094,
"height": 109.59833265087394,
"content": "## Starting the Workflow\n**To start the workflow paste the encoded URL into your webbrowser**\n\n"
},
"typeVersion": 1
},
{
"id": "e8874f52-ef7e-4aea-be5b-81e3276da3d2",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1120,
-20
],
"parameters": {
"prompt": "={{ $json.query.input }}",
"options": {},
"resource": "image"
},
"typeVersion": 1.1
},
{
"id": "08c073a6-e01e-4b04-8051-502c918998c4",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1280,
-120
],
"parameters": {
"width": 329.4629595446998,
"height": 278.4439182704484,
"content": "## Response\n**Watch the image being rendered in your webbrowser**\n\n"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "19f7e652-5417-4b02-a1f5-8796bbac25c3",
"connections": {
"OpenAI": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
]
]
}
}
}