[
  {
    "createdAt": "2025-03-08T19:03:55.761Z",
    "updatedAt": "2025-03-08T19:04:07.865Z",
    "id": "vhDQJ4cS4XvU7qTl",
    "name": "Instagram Agent",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "resume": "webhook",
          "options": {
            "responseData": "Your post has been approved!"
          }
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          140,
          120
        ],
        "id": "25d2ce92-ffa6-4efa-ba9c-31e405777b99",
        "name": "Wait",
        "webhookId": "e2cdd418-64f0-4d2d-bb38-09c31bbe8461"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "ac4810d5-b395-4a1f-987d-d59bf25725ec",
                "leftValue": "={{ $json.query.answer }}",
                "rightValue": "post",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          340,
          120
        ],
        "id": "8448dcf9-3221-4754-94bd-28da1bdedb9e",
        "name": "If"
      },
      {
        "parameters": {
          "chatId": "={{ $('When Executed by Another Workflow').item.json.telegramChatId }}",
          "text": "=Your post is:\n{{ $('AI Agent').item.json.output }}\n\n\nPlease tap [Post]({{ $execution.resumeUrl }}?answer=post) or [Do not Post]({{ $execution.resumeUrl }}?answer=no).",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          -80,
          120
        ],
        "id": "08b5e841-1df3-46cb-b2bd-7aa8df26be55",
        "name": "Telegram",
        "webhookId": "13a31340-47a8-4b19-b852-c8a1b20ba417"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "=1"
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          -840,
          340
        ],
        "id": "6f5e37bb-1615-4e6b-a769-496e1a894bcd",
        "name": "Window Buffer Memory"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Make an Instagram post about the following topic. Only respond with the post, as I am running an automation on your response.\n\nYour response should be formatted for Instagram including new lines, text and emojis. Never include links in your responses (ie post captions).\n\nTopic: {{ $json.instaPostTopic }}",
          "options": {
            "systemMessage": "You are a social media marketing expert for me who runs a __ENTER INDUSTRY / CONTENT TOPIC___. You are to create Instagram posts for my business page. Ensure your responses (ie posts) are not too long and make sure it is formatted appropriately with lines as spacing between main points.\n\nMake sure to never include a link in the post caption. Instead tell the user to go to the link in my bio to go to my YouTube channel."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          -940,
          120
        ],
        "id": "c43fc926-8427-4e12-b5fd-c0cf0813604d",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          -1000,
          340
        ],
        "id": "dd1b4a90-425e-4499-b4d7-45c2475f49f7",
        "name": "OpenAI Chat Model"
      },
      {
        "parameters": {
          "httpRequestMethod": "POST",
          "graphApiVersion": "v21.0",
          "node": "INSERT Instagram ID",
          "edge": "media",
          "options": {
            "queryParameters": {
              "parameter": [
                {
                  "name": "image_url",
                  "value": "={{ $('OpenAI').item.json.url }}"
                },
                {
                  "name": "caption",
                  "value": "={{ $('AI Agent').item.json.output }}"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.facebookGraphApi",
        "typeVersion": 1,
        "position": [
          620,
          0
        ],
        "id": "4f04aa7e-eca0-4d7f-8266-1deace1a7317",
        "name": "Facebook Graph API"
      },
      {
        "parameters": {
          "httpRequestMethod": "POST",
          "graphApiVersion": "v21.0",
          "node": "INSERT Instagram ID",
          "edge": "media_publish",
          "options": {
            "queryParameters": {
              "parameter": [
                {
                  "name": "creation_id",
                  "value": "={{ $json.id }}"
                },
                {
                  "name": "image_url",
                  "value": "={{ $('OpenAI').item.json.url }}"
                },
                {
                  "name": "caption",
                  "value": "={{ $('AI Agent').item.json.output }}"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.facebookGraphApi",
        "typeVersion": 1,
        "position": [
          840,
          0
        ],
        "id": "afeac2e6-901e-478c-842a-abade74023bd",
        "name": "Facebook Graph API1"
      },
      {
        "parameters": {
          "content": "### Create Media",
          "height": 200,
          "width": 180,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          700,
          80
        ],
        "typeVersion": 1,
        "id": "bdd02c08-ca8d-4eaa-9fbb-73e19ec0f929",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "content": "### Publish Media",
          "height": 200,
          "width": 180,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          920,
          80
        ],
        "typeVersion": 1,
        "id": "30ac876f-0f3f-4e01-8f3f-9eac5ecca40f",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "resource": "image",
          "prompt": "=Capture a high-quality, genuine photograph for a business Instagram page that looks like it was taken on an iPhone by a real photographer. The image should feature natural lighting, authentic details, and a candid composition that makes it indistinguishable from a real, unedited snapshot. This photograph should be related to the post caption below.\n\nThe post is as follows:\n{{ $json.output }}",
          "options": {
            "quality": "standard",
            "size": "1024x1024",
            "style": "natural",
            "returnImageUrls": true
          }
        },
        "type": "@n8n/n8n-nodes-langchain.openAi",
        "typeVersion": 1.8,
        "position": [
          -560,
          120
        ],
        "id": "149c7883-a315-4674-857f-36c0f22b59d9",
        "name": "OpenAI"
      },
      {
        "parameters": {
          "operation": "sendPhoto",
          "chatId": "={{ $('When Executed by Another Workflow').item.json.telegramChatId }}",
          "file": "={{ $json.url }}",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          -320,
          120
        ],
        "id": "7bf66a81-2f6f-4aa4-b279-895eabba5da8",
        "name": "Telegram1",
        "webhookId": "a3d063f7-856e-45e3-af82-b6f1a1bbfa01"
      },
      {
        "parameters": {
          "content": "### Send Image",
          "height": 200,
          "width": 180,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -240,
          200
        ],
        "typeVersion": 1,
        "id": "ef8c7836-dd6c-49c5-bd26-069abe7dbd51",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "content": "### Send Caption",
          "height": 200,
          "width": 180,
          "color": 2
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          200
        ],
        "typeVersion": 1,
        "id": "167771b5-da07-4d6e-9eef-05575bfd7b51",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "instaPostTopic"
              },
              {
                "name": "telegramChatId"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          -1140,
          120
        ],
        "id": "e35b8d98-4562-4acf-915b-0ffe6aadd193",
        "name": "When Executed by Another Workflow"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n- [ ] Adjust AI Agent prompt\n- [ ] Adjust image gen. prompt\n- [ ] Connect OpenAI\n- [ ] Connect Telegram account\n- [ ] Create a Facebook app\n- [ ] Add permissions\n- [ ] Connect to n8n",
          "height": 220,
          "width": 280,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -880,
          -200
        ],
        "typeVersion": 1,
        "id": "062ea888-c1a3-4a55-bc00-fcbe4187aa47",
        "name": "Sticky Note4"
      },
      {
        "parameters": {
          "content": "### Facebook App Permissions\n**Instagram**\n* Instagram_basic\n* instagram_content_publish\n\n**Facebook**\n* pages_show_list\n* business_management\n* pages_read_engagement\n* pages_manage_posts",
          "height": 260,
          "width": 300
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -500,
          -220
        ],
        "typeVersion": 1,
        "id": "759d343e-c5e2-41bb-ab65-225311a38a00",
        "name": "Sticky Note5"
      }
    ],
    "connections": {
      "Wait": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "Facebook Graph API",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Telegram": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "OpenAI",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Facebook Graph API": {
        "main": [
          [
            {
              "node": "Facebook Graph API1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI": {
        "main": [
          [
            {
              "node": "Telegram1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Telegram1": {
        "main": [
          [
            {
              "node": "Telegram",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "cdecbc20-98f3-4cc3-8acd-1f0b5d98d0b3",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:00:42.523Z",
        "updatedAt": "2025-03-08T19:00:42.523Z",
        "id": "iZLfTACZtii9BqfS",
        "name": "Content Agent"
      }
    ]
  },
  {
    "createdAt": "2025-03-08T19:05:31.751Z",
    "updatedAt": "2025-03-08T19:05:31.751Z",
    "id": "9q7HNIcQprD3Y1BZ",
    "name": "Facebook Agent",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "resume": "webhook",
          "options": {
            "responseData": "Your post has been approved!"
          }
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          520,
          280
        ],
        "id": "cb0b32a3-0e36-4436-a133-ed02b0874f51",
        "name": "Wait",
        "webhookId": "736d9fdb-e5aa-4f96-8a78-d0cc4e723984"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "ac4810d5-b395-4a1f-987d-d59bf25725ec",
                "leftValue": "={{ $json.query.answer }}",
                "rightValue": "post",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          760,
          280
        ],
        "id": "3d8e4a72-81ab-46f2-b7db-d757fba738d9",
        "name": "If"
      },
      {
        "parameters": {
          "chatId": "={{ $('When Executed by Another Workflow').item.json.telegramChatId }}",
          "text": "=Your post is:\n{{ $('AI Agent').item.json.output }}\n\n\nPlease tap [Post]({{ $execution.resumeUrl }}?answer=post) or [Do Not Post]({{ $execution.resumeUrl }}?answer=notPost).",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          300,
          280
        ],
        "id": "5d3e2471-3744-4d18-ae92-2976eb846b2d",
        "name": "Telegram",
        "webhookId": "9e48c063-7c94-4363-8f74-469f84e8ef40"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.telegramChatId }}"
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          0,
          500
        ],
        "id": "7303c572-0b7d-4820-b45a-a691b627c94b",
        "name": "Window Buffer Memory"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Make a Facebook post about the following topic. Only respond with the post, as I am running an automation on your response.\nYour response should ALWAYS be less than 250 characters, no matter what, if it is not under this limit the automation will fail.\n\nTopic: {{ $json.facebookPostTopic }}",
          "options": {
            "systemMessage": "You are a social media marketing expert for me who runs a __ENTER INDUSTRY / CONTENT TOPIC___. You are to create Facebook posts for my business page. Ensure your responses (ie posts) are not too long and make sure it is formatted appropriately with lines as spacing between main points.\n\nFrame the content as coming from me, I am the only one running this business so it should be singular (I) instead of plural (we) for example."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          -100,
          280
        ],
        "id": "aa274356-6425-424f-be0f-32a2a98ea178",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          -160,
          500
        ],
        "id": "2541538f-dde8-465b-bc47-8b1900f0d308",
        "name": "OpenAI Chat Model"
      },
      {
        "parameters": {
          "httpRequestMethod": "POST",
          "graphApiVersion": "v21.0",
          "node": "me",
          "edge": "feed",
          "options": {
            "queryParameters": {
              "parameter": [
                {
                  "name": "message",
                  "value": "={{ $('AI Agent').item.json.output }}"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.facebookGraphApi",
        "typeVersion": 1,
        "position": [
          1040,
          160
        ],
        "id": "7ce69dd9-1b3d-4b68-8062-d689c3afc194",
        "name": "Facebook Graph API"
      },
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "facebookPostTopic"
              },
              {
                "name": "telegramChatId"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          -300,
          280
        ],
        "id": "b5361eb3-6ea0-421a-a8a9-be35f63bd2c3",
        "name": "When Executed by Another Workflow"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n- [ ] Connect OpenAI account\n- [ ] Adjust AI Agent prompt\n- [ ] Create Facebook app\n- [ ] Add app permissions\n- [ ] Connect Facebook account to n8n",
          "height": 200,
          "width": 300,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1,
        "id": "3e93a815-f7c9-483e-ad32-855d8e9549f5",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "Wait": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "Facebook Graph API",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Telegram": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Telegram",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "11251352-7963-4e45-b620-42ad94f36b5f",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:00:42.523Z",
        "updatedAt": "2025-03-08T19:00:42.523Z",
        "id": "iZLfTACZtii9BqfS",
        "name": "Content Agent"
      }
    ]
  },
  {
    "createdAt": "2025-03-08T19:08:19.246Z",
    "updatedAt": "2025-03-08T19:09:56.386Z",
    "id": "eZ1pS74Cm9ARTjNv",
    "name": "Content - Ideation Agent",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "promptType": "define",
          "text": "=You are to list problems inside of your business or your competitors' businesses that you would love to have solved by ___ENTER HOW TO YOU SOLVE CUSTOMER WANTS OR NEEDS___.",
          "options": {
            "systemMessage": "You are an online business owner in a service based business who is looking to use AI inside of your business. You frequently view YouTube or other social media platforms for leisure and for solving issues in your business. You like being ahead of the curve and enjoy learning new technologies.\n\n^^^REMOVE AND DESCRIBE YOUR ICP^^^"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          80,
          260
        ],
        "id": "f7a45645-7f1e-4231-8b06-35e0bab39541",
        "name": "Problems"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          500,
          480
        ],
        "id": "90a3e395-5b08-4eb0-ba9f-feeb5ca85c82",
        "name": "OpenAI Chat Model"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=You should use the following list of pain points combined with your expertise to list solutions to the following pain points.\n\nThese solutions should be ideas for content given the platform below. These ideas should be adjusted to the desired platform giving the post type (avaiable on the platform) and it should either solve a pain point or grow my personal brand.\n\nAlways respond with less than 3,000 characters, if you go over this limit the automation will fail.\n\nMake sure to focus on the following topic: {{ $('When Executed by Another Workflow').item.json.topicForContent }}\n\nThe platform for the content ideas should be on: {{ $('When Executed by Another Workflow').item.json.contentPlatform }}\n\nThese are the pain points:\n{{ $json.output }}",
          "options": {
            "systemMessage": "You are an expert __ENTER INDUSTRY__ owner, you have scaled your own __ENTER BUSINESS TYPE__ to $1 million a month just via content and have helped other __ENTER INDUSTRY__ owners do the same also with posting content.\n\nMake sure your content ideas match the desired platform, for example do not list IG Live under ideas for Twitter.\n\nAlways respond with less than 3,000 characters, if you go over this limit the automation will fail."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          500,
          260
        ],
        "id": "2a106ee9-86e2-425c-9339-e5fa3d1dc8b7",
        "name": "Ideas"
      },
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "topicForContent"
              },
              {
                "name": "contentPlatform"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          -200,
          260
        ],
        "id": "1ddd39b7-25b5-4cd4-865c-342dc4309837",
        "name": "When Executed by Another Workflow"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          80,
          480
        ],
        "id": "a88ff4ff-428b-406b-a180-8443dd529b6a",
        "name": "OpenAI Chat Model1"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n- [ ] Adjust prompts and system messages\n- [ ] Connect OpenAI account",
          "height": 180,
          "width": 280,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1,
        "id": "ceca6ceb-c8ab-4b67-a2c0-927d950ef2f5",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "Problems": {
        "main": [
          [
            {
              "node": "Ideas",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Ideas",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "Problems",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model1": {
        "ai_languageModel": [
          [
            {
              "node": "Problems",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "659cd6c1-c9d2-438b-9012-8446ba8a5d4d",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:00:42.523Z",
        "updatedAt": "2025-03-08T19:00:42.523Z",
        "id": "iZLfTACZtii9BqfS",
        "name": "Content Agent"
      }
    ]
  },
  {
    "createdAt": "2025-03-08T19:10:24.213Z",
    "updatedAt": "2025-03-08T19:10:24.213Z",
    "id": "SFFOhnYYsJIMwQR3",
    "name": "Twitter Agent",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "resume": "webhook",
          "options": {
            "responseData": "Your post has been approved!"
          }
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          520,
          360
        ],
        "id": "e02dd8c8-0d32-44ec-839d-121f151f6c3d",
        "name": "Wait",
        "webhookId": "679dbac7-c755-4667-9893-cb9d3a2f5aca"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "ac4810d5-b395-4a1f-987d-d59bf25725ec",
                "leftValue": "={{ $json.query.answer }}",
                "rightValue": "post",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          720,
          360
        ],
        "id": "668f2442-d666-4836-a28d-4f7643189810",
        "name": "If"
      },
      {
        "parameters": {
          "chatId": "={{ $('When Executed by Another Workflow').item.json.telegramChatId }}",
          "text": "=Your post is:\n{{ $json.output }}\n\n\nPlease tap [Post]({{ $execution.resumeUrl }}?answer=post) or [Do Not Post]({{ $execution.resumeUrl }}?answer=no).",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          300,
          360
        ],
        "id": "acf6f0d7-1e34-4581-b2f1-31096e13c738",
        "name": "Telegram",
        "webhookId": "f2a41ade-359a-48b6-bac9-c690c1f49eec"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n- [ ] Adjust AI Agent prompt\n- [ ] Connect Twitter (X) account",
          "height": 200,
          "width": 340,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1,
        "id": "2342ba75-3d3c-491f-9db0-1138b3de7068",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.telegramChatId }}"
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          40,
          580
        ],
        "id": "18aa2eaf-5835-462d-ae31-32da44043ecc",
        "name": "Window Buffer Memory"
      },
      {
        "parameters": {
          "text": "={{ $('AI Agent').item.json.output }}",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.twitter",
        "typeVersion": 2,
        "position": [
          980,
          220
        ],
        "id": "f02010d6-7dca-47a3-abed-18af0a530efd",
        "name": "X"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Make a Twitter / X post about the following topic. Only respond with the post, as I am running an automation on your response.\nYour response should ALWAYS be less than 250 characters, no matter what, if it is not under this limit the automation will fail.\n\nTopic: {{ $json.twitterPostTopic }}",
          "options": {
            "systemMessage": "You are a social media marketing expert for me who runs a __ENTER INDUSTRY / CONTENT TOPIC___. You are to create Twitter / X posts for my business page. Ensure your entire response (ie the entire post) is less than 275 characters), otherwise the automation will fail, this includes links, emojis, spaces, etc...\n\nFrame the content as coming from me, I am the only one running this business so it should be singular (I) instead of plural (we) for example."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          -60,
          360
        ],
        "id": "b1f80d7c-735d-43bd-a264-ddbf2064f3fd",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          -120,
          580
        ],
        "id": "d6c0a28a-24f7-432c-9fef-eef24fd9393a",
        "name": "OpenAI Chat Model"
      },
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "twitterPostTopic"
              },
              {
                "name": "telegramChatId"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          -280,
          360
        ],
        "id": "37ab7e93-ee1a-4b24-ad7a-eb968c66b29a",
        "name": "When Executed by Another Workflow"
      }
    ],
    "connections": {
      "Wait": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Telegram": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "X",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Telegram",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "04865c72-d45f-43d9-bec5-8979fc846040",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:00:42.523Z",
        "updatedAt": "2025-03-08T19:00:42.523Z",
        "id": "iZLfTACZtii9BqfS",
        "name": "Content Agent"
      }
    ]
  },
  {
    "createdAt": "2025-03-08T19:12:57.959Z",
    "updatedAt": "2025-03-08T19:12:57.959Z",
    "id": "7sNEYcwfJr9m8vGZ",
    "name": "Youtube Agent",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "promptType": "define",
          "text": "=You are my project manager in charge of managing my content.\n\nPlease help with: {{ $json.vidAgentPrompt }}\n\n\nYou have access to the following tools:\n\n- video progress, gets videos and their status: video ideas have the following statuses\n    - Idea\n    - Scripted\n    - Scheduled\n    - Done\n\n- create video idea: creates a page in Notion that should be put under the scripted section. On the body of the Page you should list...\n  - the topic of the video\n  - 5 video titles under 55 characters optomized for SEO\n  - give an outline for the video\n  - give a brief but engaging intro for the video",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          40,
          320
        ],
        "id": "81e73687-5841-4272-940d-aabca7258066",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          -120,
          540
        ],
        "id": "32ff3c00-9ffc-43c4-ad4e-868bf9385a64",
        "name": "OpenAI Chat Model"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $('When Executed by Another Workflow').item.json.telegramChatId }}"
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          60,
          540
        ],
        "id": "aab374be-4b36-4c74-95a9-113198cec3bd",
        "name": "Window Buffer Memory"
      },
      {
        "parameters": {
          "descriptionType": "manual",
          "toolDescription": "video progress",
          "resource": "databasePage",
          "operation": "getAll",
          "databaseId": {
            "__rl": true,
            "value": "1a675af7-247e-80bd-9446-e8a8a342e9dc",
            "mode": "list",
            "cachedResultName": "Content Ideas",
            "cachedResultUrl": "https://www.notion.so/1a675af7247e80bd9446e8a8a342e9dc"
          },
          "filterType": "manual",
          "filters": {
            "conditions": [
              {
                "key": "Status|status",
                "condition": "equals",
                "statusValue": "={{ $fromAI(\"ideaStatus\") }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.notionTool",
        "typeVersion": 2.2,
        "position": [
          460,
          540
        ],
        "id": "7f2ba4f9-2592-4e6b-9765-dc8f3470e999",
        "name": "Get Videos"
      },
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "vidAgentPrompt"
              },
              {
                "name": "telegramChatId"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          -180,
          320
        ],
        "id": "bf3dfa43-f4ac-4088-93db-a8969f961e55",
        "name": "When Executed by Another Workflow"
      },
      {
        "parameters": {
          "descriptionType": "manual",
          "toolDescription": "use this tool to create a video idea",
          "resource": "databasePage",
          "databaseId": {
            "__rl": true,
            "value": "19f75af7-247e-8064-8942-f6476d938bb5",
            "mode": "list",
            "cachedResultName": "Ideas for Content",
            "cachedResultUrl": "https://www.notion.so/19f75af7247e80648942f6476d938bb5"
          },
          "title": "={{ $fromAI(\"title\") }}",
          "propertiesUi": {
            "propertyValues": [
              {
                "key": "Status|status",
                "statusValue": "Scripted"
              }
            ]
          },
          "blockUi": {
            "blockValues": [
              {
                "textContent": "={{ $fromAI(\"BodyOfPage\") }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.notionTool",
        "typeVersion": 2.2,
        "position": [
          300,
          540
        ],
        "id": "2379ab07-44aa-40ef-9187-e8d169cc42e3",
        "name": "Create Vid Idea"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n- [ ] Create a database in Notion\n- [ ] Connect your account & edit Notion tools\n- [ ] Adjust AI Agent prompt\n- [ ] Connect OpenAI (if not already)",
          "height": 240,
          "width": 360,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1,
        "id": "97671436-aecb-4e33-8103-9e5a3565dc90",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "Get Videos": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Create Vid Idea": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "bf290731-ca3c-4ce0-ad0c-7cb9475da345",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:00:42.523Z",
        "updatedAt": "2025-03-08T19:00:42.523Z",
        "id": "iZLfTACZtii9BqfS",
        "name": "Content Agent"
      }
    ]
  },
  {
    "createdAt": "2025-03-08T20:13:27.217Z",
    "updatedAt": "2025-03-08T20:13:27.217Z",
    "id": "4PHphoTDLcPHBHYU",
    "name": "My workflow",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "searchPrompt"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          60,
          160
        ],
        "id": "1caad287-75c1-49d3-86bb-538d3012a92b",
        "name": "When Executed by Another Workflow"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.tavily.com/search",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"api_key\": \"______ENTER_API_KEY______\",\n  \"query\": \"{{ $json.searchPrompt }}\",\n  \"search_depth\": \"basic\",\n  \"include_answer\": true,\n  \"topic\": \"general\",\n  \"include_raw_content\": true,\n  \"max_results\": 2\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          280,
          160
        ],
        "id": "27bc055d-769c-4c75-b8d0-7a75c20d3f29",
        "name": "HTTP Request"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "81b081a3-d202-4a8d-80dc-aaa1eb18d9a3",
                "name": "Response",
                "value": "=Source 1: {{ $json.results[0].title }}\n- URL: {{ $json.results[0].url }}\n- Content: {{ $json.results[0].content }}\n\n\nSource 2: {{ $json.results[1].title }}\n- URL: {{ $json.results[1].url }}\n- Content: {{ $json.results[1].content }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          500,
          160
        ],
        "id": "926a3369-0f8a-4f8f-bdb1-f0000958ff06",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n**Create an account on [Tavily](https://tavily.com/)**\n\nI will be posting a video about setting this up later but feel free to explore this tool!\n\n- [ ] fill in API key inside of HTTP Request node",
          "height": 220,
          "width": 360
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          200,
          -140
        ],
        "typeVersion": 1,
        "id": "d5e36958-e90b-46d1-911a-b9e363a28a13",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "42f3ed03-19cc-4599-a997-8e0fa084a27a",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:14:12.833Z",
        "updatedAt": "2025-03-08T19:14:12.833Z",
        "id": "o245ejtcEhgv8bXk",
        "name": "Tool"
      }
    ]
  },
  {
    "createdAt": "2025-03-08T19:00:19.669Z",
    "updatedAt": "2025-03-09T20:40:31.161Z",
    "id": "nOOYtHOUqu3wQGC3",
    "name": "Contact Engine",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "updates": [
            "message"
          ],
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegramTrigger",
        "typeVersion": 1.1,
        "position": [
          280,
          120
        ],
        "id": "f3c7afa2-8239-42ec-9d2d-31d4c64a86c0",
        "name": "Telegram Trigger",
        "webhookId": "41b2337f-d2e0-4e02-a79a-9962f205e348"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Execute the following task: {{ $json.message.text }}\n\nMake sure you do not create posts or YouTube ideas unless I specifically say to, just because I ask for ideas (content ideation agent) does not mean I want a YouTube idea created or a post to be posted.\n\n\nYou have access to the following agents:\n\n- content ideation: generates content ideas on a given topic for a given platform, if the topic is not given, then fill it in with \"general\". If the platform is not given then fill it in with YouTube.\n\n- YouTube Idea Management which is stored in Notion. This tool you need to send a prompt. The agent can either get current idea(s) stored in my Notion database or it can create a new Notion page for a future video idea.\n\n- Post to Instagram: this agent creates a post on a certain topic and allows me to edit it if needed. You need to pass in the topic for the post and the Telegram ChatID which is given below.\n\n- Post to Facebook: this agent creates a post on a certain topic and allows me to edit it if needed. You need to pass in the topic for the post and the Telegram ChatID which is given below.\n\n- Post to Twitter: this agent creates a post on a certain topic and allows me to edit it if needed. You need to pass in the Telegram ChatID which is given below. For the \"topicForPost\" you need to prompt the agent, meaning you pass in, \"Create a post about [Enter topic of post that I have you]\"\n\n- web search tool: you can use this to search the web and find things like trending or recent topics\n\n\n\nTelegram Chat ID: {{ $json.message.chat.id }}\nToday's date: {{ $now }}",
          "options": {
            "systemMessage": "You are a social media marketing manager for my AI Automation Agency. You help me to manage my content creation process on all my social media platforms using a group of AI Agents.\n\nFor the Post to Instagram, Post to Facebook, and Post to Twitter you should prompt the agent in the ideaForPost field with something like \"Create a post about {{insertTopic}}\" and you can include a link for a YouTube video in that prompt if given."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          740,
          260
        ],
        "id": "71e0b757-6faf-4ae7-8374-66d9ce9d8030",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "name": "Content_Ideation",
          "description": "Call this tool to get content ideas of a given platform.",
          "workflowId": {
            "__rl": true,
            "value": "eZ1pS74Cm9ARTjNv",
            "mode": "list",
            "cachedResultName": "Content - Ideation Agent"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {
              "topicForContent": "={{ $fromAI(\"topicForContentIdeas\") }}",
              "contentPlatform": "={{ $fromAI(\"platformForContentIdeas\") }}"
            },
            "matchingColumns": [],
            "schema": [
              {
                "id": "topicForContent",
                "displayName": "topicForContent",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              },
              {
                "id": "contentPlatform",
                "displayName": "contentPlatform",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          1360,
          540
        ],
        "id": "f67939b4-62c8-40eb-9bae-c16880d1537a",
        "name": "Ideation Agent"
      },
      {
        "parameters": {
          "name": "YouTubeManagementAgent",
          "description": "Call this tool to manage my YouTube videos which are stored in Notion",
          "workflowId": {
            "__rl": true,
            "value": "7sNEYcwfJr9m8vGZ",
            "mode": "list",
            "cachedResultName": "Youtube Agent"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {
              "vidAgentPrompt": "={{ $fromAI(\"videoAgentPrompt\") }}",
              "telegramChatId": "={{ $fromAI(\"telegramChatId\") }}"
            },
            "matchingColumns": [],
            "schema": [
              {
                "id": "vidAgentPrompt",
                "displayName": "vidAgentPrompt",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              },
              {
                "id": "telegramChatId",
                "displayName": "telegramChatId",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          1500,
          540
        ],
        "id": "148f9353-2f18-47ea-b2f8-8de70bfc91d6",
        "name": "YouTube Management"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          580,
          540
        ],
        "id": "64c1addd-c936-45a1-a75c-dcc7495c68dc",
        "name": "OpenAI Chat Model"
      },
      {
        "parameters": {
          "name": "InstagramPostAgent",
          "description": "call this tool to create a post on Instagram",
          "workflowId": {
            "__rl": true,
            "value": "vhDQJ4cS4XvU7qTl",
            "mode": "list",
            "cachedResultName": "Instagram Agent"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {
              "instaPostTopic": "={{ $fromAI(\"topicForPost\") }}",
              "telegramChatId": "={{ $fromAI(\"telegramChatId\") }}"
            },
            "matchingColumns": [],
            "schema": [
              {
                "id": "instaPostTopic",
                "displayName": "instaPostTopic",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              },
              {
                "id": "telegramChatId",
                "displayName": "telegramChatId",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          940,
          540
        ],
        "id": "2d1cbd4a-e9e7-48e4-83ff-f3e9422f4078",
        "name": "Insta. Agent"
      },
      {
        "parameters": {
          "name": "FacebookPostAgent",
          "description": "call this tool to create a post on Facebook",
          "workflowId": {
            "__rl": true,
            "value": "9q7HNIcQprD3Y1BZ",
            "mode": "list",
            "cachedResultName": "Facebook Agent"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {
              "facebookPostTopic": "={{ $fromAI(\"topicForPost\") }}",
              "telegramChatId": "={{ $fromAI(\"telegramChatId\") }}"
            },
            "matchingColumns": [],
            "schema": [
              {
                "id": "facebookPostTopic",
                "displayName": "facebookPostTopic",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              },
              {
                "id": "telegramChatId",
                "displayName": "telegramChatId",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          1080,
          540
        ],
        "id": "d812ffc3-c563-44a8-8965-d6e69c40bae0",
        "name": "Facebook Agent"
      },
      {
        "parameters": {
          "name": "TwitterPostAgent",
          "description": "call this tool to create a post on Twitter / X",
          "workflowId": {
            "__rl": true,
            "value": "9tsvLC0tvIo1kcXx",
            "mode": "list",
            "cachedResultName": "***Content - Twitter Agent***"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {
              "twitterPostTopic": "={{ $fromAI(\"topicForPost\") }}",
              "telegramChatId": "={{ $fromAI(\"telegramChatId\") }}"
            },
            "matchingColumns": [],
            "schema": [
              {
                "id": "twitterPostTopic",
                "displayName": "twitterPostTopic",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              },
              {
                "id": "telegramChatId",
                "displayName": "telegramChatId",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string"
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          1220,
          540
        ],
        "id": "af5564ee-426e-4d9f-a615-8e9b438882d8",
        "name": "Twitter Agent"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $('When chat message received').item.json.chatInput }}",
          "contextWindowLength": 28
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          760,
          540
        ],
        "id": "2cee0b78-c852-4c45-b99b-b9842799d99b",
        "name": "Window Buffer Memory"
      },
      {
        "parameters": {
          "chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
          "text": "={{ $json.output }}",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          1100,
          260
        ],
        "id": "2f90ba46-cdb1-4f76-b899-dea368463b0a",
        "name": "Telegram",
        "webhookId": "02ae96e2-cd32-4108-b4f8-096566dede04"
      },
      {
        "parameters": {
          "name": "Web_Search",
          "description": "Call this tool to search the web",
          "workflowId": {
            "__rl": true,
            "value": "OIgK8VrdZuNeFfIa",
            "mode": "list",
            "cachedResultName": "Web Search"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {
              "searchPrompt": "={{ $fromAI(\"webSearchPrompt\") }}"
            },
            "matchingColumns": [
              "searchPrompt"
            ],
            "schema": [
              {
                "id": "searchPrompt",
                "displayName": "searchPrompt",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "canBeUsedToMatch": true,
                "type": "string",
                "removed": false
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          1680,
          540
        ],
        "id": "ecd3b39b-e972-444d-ab05-98e1894fe02b",
        "name": "Web Search"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n- [ ] Create Telegram account\n- [ ] Create Telegram bot & connect to n8n\n- [ ] Connect OpenAI account\n- [ ] Look over AI Agent prompt\n- [ ] Download and setup nested-agents\n- [ ] Connect all nested-agents with their appropriate name",
          "height": 220,
          "width": 360,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          560,
          -20
        ],
        "typeVersion": 1,
        "id": "435acad1-b948-472a-938f-f32d54a1404d",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "name": "AutoBackWorkflow",
          "description": "Call this tool to auto backup workflow to github",
          "workflowId": {
            "__rl": true,
            "value": "Zj5gRM1Kf8m5UGlW",
            "mode": "list",
            "cachedResultName": "auto backup workflow"
          },
          "workflowInputs": {
            "mappingMode": "defineBelow",
            "value": {},
            "matchingColumns": [],
            "schema": [],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          }
        },
        "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
        "typeVersion": 2,
        "position": [
          1580,
          320
        ],
        "id": "9c0a91cb-86fb-4f16-904a-a81ee6f8ae61",
        "name": "Call n8n Workflow Tool"
      }
    ],
    "connections": {
      "Telegram Trigger": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Ideation Agent": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "YouTube Management": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Insta. Agent": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Facebook Agent": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Twitter Agent": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Telegram",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Web Search": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Call n8n Workflow Tool": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "59331a49-4d0b-4ec8-8ed4-1bc88814cd66",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:00:42.523Z",
        "updatedAt": "2025-03-08T19:00:42.523Z",
        "id": "iZLfTACZtii9BqfS",
        "name": "Content Agent"
      },
      {
        "createdAt": "2025-03-08T19:02:40.842Z",
        "updatedAt": "2025-03-08T19:02:40.842Z",
        "id": "jbU2SEZSZEozv4tz",
        "name": "Need to Film"
      }
    ]
  },
  {
    "createdAt": "2025-03-09T20:30:40.610Z",
    "updatedAt": "2025-04-01T05:48:54.851Z",
    "id": "OIgK8VrdZuNeFfIa",
    "name": "Web Search",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "workflowInputs": {
            "values": [
              {
                "name": "searchPrompt"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.executeWorkflowTrigger",
        "typeVersion": 1.1,
        "position": [
          -200,
          320
        ],
        "id": "d6871ccc-7fa1-49d8-8612-240cfdafc241",
        "name": "When Executed by Another Workflow"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.tavily.com/search",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"api_key\": \"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\",\n  \"query\": \"{{ $json.searchPrompt }}\",\n  \"search_depth\": \"basic\",\n  \"include_answer\": true,\n  \"topic\": \"general\",\n  \"include_raw_content\": true,\n  \"max_results\": 2\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          20,
          320
        ],
        "id": "0a78f5c6-8c03-4ff0-81db-a8c22b9627e3",
        "name": "HTTP Request"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "81b081a3-d202-4a8d-80dc-aaa1eb18d9a3",
                "name": "Response",
                "value": "=Source 1: {{ $json.results[0].title }}\n- URL: {{ $json.results[0].url }}\n- Content: {{ $json.results[0].content }}\n\n\nSource 2: {{ $json.results[1].title }}\n- URL: {{ $json.results[1].url }}\n- Content: {{ $json.results[1].content }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          240,
          320
        ],
        "id": "7d601846-fb3d-4fb2-8163-19b591cd0565",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "content": "### Setup Guide\n**Create an account on [Tavily](https://tavily.com/)**\n\nI will be posting a video about setting this up later but feel free to explore this tool!\n\n- [ ] fill in API key inside of HTTP Request node",
          "height": 220,
          "width": 360
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -60,
          20
        ],
        "typeVersion": 1,
        "id": "8c594d4e-94fc-4bda-9348-eddb6933a858",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "When Executed by Another Workflow": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "2a79d5aa-f81c-4897-9343-9f0d2790d031",
    "triggerCount": 0,
    "tags": [
      {
        "createdAt": "2025-03-08T19:14:12.833Z",
        "updatedAt": "2025-03-08T19:14:12.833Z",
        "id": "o245ejtcEhgv8bXk",
        "name": "Tool"
      }
    ]
  },
  {
    "createdAt": "2025-05-02T12:50:10.603Z",
    "updatedAt": "2025-06-08T00:44:44.281Z",
    "id": "tO5Vyqqd1so2bRNU",
    "name": "X Post",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "text": "Hello world with media :D",
          "additionalFields": {
            "attachments": "={{ $json.body.id }},{{ $json.body.id }}"
          }
        },
        "id": "a5ff2d19-7b67-441c-95bc-361a711f6b5e",
        "name": "X1",
        "type": "n8n-nodes-base.twitter",
        "typeVersion": 2,
        "position": [
          1520,
          -260
        ],
        "credentials": {
          "twitterOAuth2Api": {
            "id": "MpIZRCNTIZcYyT4o",
            "name": "X account"
          }
        }
      },
      {
        "parameters": {
          "jsCode": "// Collect both media IDs from HTTP Request1 and HTTP Request3\nconst items = $input.all();\nconst mediaIds = items.map(item => item.json.body.id);\nreturn [{ json: { mediaIds } }];"
        },
        "id": "6ca26ac5-6033-4455-9ab7-949b9c3dab4a",
        "name": "Code",
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1440,
          -420
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.twitter.com/2/media/upload",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "twitterOAuth2Api",
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "media",
                "inputDataFieldName": "data"
              }
            ]
          },
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "json"
              }
            }
          }
        },
        "id": "0866ee36-e63e-443b-9de4-f3055f99dff2",
        "name": "HTTP Request3",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1060,
          -360
        ],
        "credentials": {
          "twitterOAuth2Api": {
            "id": "MpIZRCNTIZcYyT4o",
            "name": "X account"
          }
        }
      },
      {
        "parameters": {
          "url": "https://cdn.pixabay.com/photo/2024/04/22/16/38/buildings-8713025_1280.jpg",
          "options": {}
        },
        "id": "3fe9f2da-b49c-4f80-a5f5-8ae08d9e2901",
        "name": "HTTP Request2",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          800,
          -260
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.twitter.com/2/media/upload",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "twitterOAuth2Api",
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "media",
                "inputDataFieldName": "data"
              }
            ]
          },
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "json"
              }
            }
          }
        },
        "id": "1225fbb5-5a42-47ce-88fd-4a6796b80cd3",
        "name": "HTTP Request1",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1240,
          -200
        ],
        "credentials": {
          "twitterOAuth2Api": {
            "id": "MpIZRCNTIZcYyT4o",
            "name": "X account"
          }
        }
      },
      {
        "parameters": {
          "url": "https://cdn.pixabay.com/photo/2025/04/22/05/54/dog-9548923_1280.jpg",
          "options": {}
        },
        "id": "b6540379-20d7-48e9-a076-5ee7146be5e5",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          740,
          -40
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.twitter.com/2/media/upload",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "twitterOAuth2Api",
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "media",
                "inputDataFieldName": "data"
              }
            ]
          },
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "json"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1100,
          220
        ],
        "id": "d8c7599e-b70f-400e-8473-100707b3e8aa",
        "name": "Upload Media1",
        "credentials": {
          "twitterOAuth2Api": {
            "id": "MpIZRCNTIZcYyT4o",
            "name": "X account"
          }
        }
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.merge",
        "typeVersion": 3.1,
        "position": [
          1320,
          120
        ],
        "id": "2c2d6d05-2159-44af-ac9b-720fdadd4a44",
        "name": "Merge"
      },
      {
        "parameters": {
          "aggregate": "aggregateAllItemData",
          "options": {}
        },
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          1540,
          120
        ],
        "id": "bd13b247-cf4b-485b-b864-9caf684ab2fa",
        "name": "Aggregate"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.twitter.com/2/media/upload",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "twitterOAuth2Api",
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "media",
                "inputDataFieldName": "data"
              }
            ]
          },
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "json"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1100,
          20
        ],
        "id": "23f6b574-6013-41a1-9413-e1ff3819a780",
        "name": "Upload Media 1",
        "credentials": {
          "twitterOAuth2Api": {
            "id": "MpIZRCNTIZcYyT4o",
            "name": "X account"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.twitter.com/2/tweets",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "twitterOAuth2Api",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Content-Type",
                "value": "application/json"
              }
            ]
          },
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"text\": \"no\",\n  \"media\": {\n    \"media_ids\": [\n      \"{{ $json.data[0].body.id }}\",\n      \"{{ $json.data[1].body.id }}\"\n    ]\n  }\n}",
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "json"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1760,
          120
        ],
        "id": "90214d34-199b-43dd-a32e-e2ed010bd1f0",
        "name": "Post Tweet with Media",
        "credentials": {
          "twitterOAuth2Api": {
            "id": "MpIZRCNTIZcYyT4o",
            "name": "X account"
          }
        }
      },
      {
        "parameters": {},
        "id": "4501e4f1-21cf-43da-b616-f49b4fa908a7",
        "name": "When clicking ‘Test workflow’",
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          540,
          -160
        ]
      }
    ],
    "connections": {
      "HTTP Request3": {
        "main": [
          [
            {
              "node": "X1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request2": {
        "main": [
          [
            {
              "node": "Upload Media 1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Upload Media1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload Media1": {
        "main": [
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 1
            }
          ]
        ]
      },
      "Merge": {
        "main": [
          [
            {
              "node": "Aggregate",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate": {
        "main": [
          [
            {
              "node": "Post Tweet with Media",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload Media 1": {
        "main": [
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Post Tweet with Media": {
        "main": [
          []
        ]
      },
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            },
            {
              "node": "HTTP Request2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "f709855a-c562-4d3c-a49b-b549ed4a2ef6",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-30T00:35:48.199Z",
    "updatedAt": "2025-05-13T16:28:39.136Z",
    "id": "B9OR8ArxTvGjAIna",
    "name": "Bet Scraping",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "url": "https://d67dyr5utlysq5rkfnbuqmwdo40gexiw.lambda-url.eu-north-1.on.aws/scrape",
          "options": {}
        },
        "id": "43ce4c28-47f1-4ade-8a01-50c93369a225",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          120,
          -120
        ]
      },
      {
        "parameters": {
          "jsCode": "// Split the data array into individual items for n8n\nreturn $json.data.map(row => ({ json: row }));\n"
        },
        "id": "db03f705-27a2-48d4-9f59-b1098adb7bef",
        "name": "Split Data",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          320,
          -180
        ]
      },
      {
        "parameters": {
          "schema": {
            "__rl": true,
            "mode": "list",
            "value": "public"
          },
          "table": {
            "value": "odds_comparison",
            "mode": "list"
          },
          "columns": {
            "mappingMode": "defineBelow",
            "value": {
              "from_event": "={{ $json.fromEvent }}",
              "from_odds": "={{ $json.fromOdds }}",
              "from_country": "={{ $json.fromCountry }}",
              "to_event": "={{ $json.toEvent }}",
              "to_odds": "={{ $json.toOdds }}",
              "to_country": "={{ $json.toCountry }}",
              "from_bookmarker_code": "={{ $json.fromBookmarkerCode }}",
              "from_bookmarker_name": "={{ $json.fromBookmarkerName }}",
              "to_bookmarker_code": "={{ $json.toBookmarkerCode }}",
              "to_bookmarker_name": "={{ $json.toBookmarkerName }}"
            },
            "matchingColumns": [
              "id"
            ],
            "schema": [
              {
                "id": "id",
                "displayName": "id",
                "required": false,
                "defaultMatch": true,
                "display": true,
                "type": "number",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "from_event",
                "displayName": "from_event",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_odds",
                "displayName": "from_odds",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_country",
                "displayName": "from_country",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_event",
                "displayName": "to_event",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_odds",
                "displayName": "to_odds",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_country",
                "displayName": "to_country",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_bookmarker_code",
                "displayName": "from_bookmarker_code",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_bookmarker_name",
                "displayName": "from_bookmarker_name",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_bookmarker_code",
                "displayName": "to_bookmarker_code",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_bookmarker_name",
                "displayName": "to_bookmarker_name",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "created_at",
                "displayName": "created_at",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "dateTime",
                "canBeUsedToMatch": true,
                "removed": true
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          },
          "options": {}
        },
        "id": "3ccfcd67-435e-4068-87b0-ddf8ba4cff70",
        "name": "Postgres",
        "type": "n8n-nodes-base.postgres",
        "typeVersion": 2.6,
        "position": [
          680,
          -80
        ],
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        }
      },
      {
        "parameters": {
          "operation": "select",
          "schema": {
            "__rl": true,
            "mode": "list",
            "value": "public"
          },
          "table": {
            "__rl": true,
            "value": "odds_comparison",
            "mode": "list",
            "cachedResultName": "odds_comparison"
          },
          "returnAll": true,
          "options": {}
        },
        "type": "n8n-nodes-base.postgres",
        "typeVersion": 2.6,
        "position": [
          20,
          -300
        ],
        "id": "fd2cef26-7ca3-44cf-97c8-149e01f6cb0e",
        "name": "Postgres1",
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        }
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "a844a5d8-9904-405a-8a05-e5c82ba3705f",
                "leftValue": "={{ $json.fromEvent }}",
                "rightValue": "={{ $json.from_event }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              },
              {
                "id": "bb181766-d0a6-4eca-868a-a6e3ee28dec9",
                "leftValue": "={{ $json.fromOdds }}",
                "rightValue": "={{ $json.from_odds }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              },
              {
                "id": "0d588a02-41d4-4ef0-8e99-0ae122742d1a",
                "leftValue": "={{ $json.fromCountry }}",
                "rightValue": "={{ $json.from_country }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              },
              {
                "id": "25b8a177-657f-4275-b830-d1f8b59e83fe",
                "leftValue": "={{ $json.toEvent }}",
                "rightValue": "={{ $json.to_event }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              },
              {
                "id": "fb496011-d9f0-48be-907b-5ff3951449fd",
                "leftValue": "={{ $json.toOdds }}",
                "rightValue": "={{ $json.to_odds }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              },
              {
                "id": "89825fb7-f1eb-4e2a-a174-369807964885",
                "leftValue": "={{ $json.toCountry }}",
                "rightValue": "={{ $json.to_country }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          540,
          -260
        ],
        "id": "a6c927e7-f73e-4ac4-b34b-33d966a281a1",
        "name": "If"
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {
                "field": "hours",
                "hoursInterval": 3
              }
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          -220,
          -120
        ],
        "id": "8ecd84ca-6dc4-4165-9f0e-9682d740194d",
        "name": "Schedule Trigger"
      },
      {
        "parameters": {
          "options": {
            "systemMessage": ""
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.9,
        "position": [
          300,
          0
        ],
        "id": "b13937ed-59a7-45e2-9228-98050a6b45bd",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          340,
          220
        ],
        "id": "aaf71550-462d-4226-aee2-741237d98bd2",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "contextWindowLength": 500
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          220,
          260
        ],
        "id": "9da53d7b-2d4c-4bff-9ca8-80819a435276",
        "name": "Simple Memory"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.airtopTool",
        "typeVersion": 1,
        "position": [
          660,
          200
        ],
        "id": "13af2960-6140-40b9-88ee-eaab4022d27b",
        "name": "Airtop",
        "credentials": {
          "airtopApi": {
            "id": "5GiOTcJAsZNI17FK",
            "name": "Airtop account"
          }
        }
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          80,
          120
        ],
        "id": "7770cad2-a387-4ba1-8038-bdb69d64e353",
        "name": "When chat message received",
        "webhookId": "11d73394-776a-43ae-b3ae-ac14a6dea40c"
      },
      {
        "parameters": {
          "operation": "executeQuery",
          "options": {}
        },
        "type": "n8n-nodes-base.postgresTool",
        "typeVersion": 2.6,
        "position": [
          860,
          220
        ],
        "id": "4584f1a2-3e5a-4fbd-90b9-67e13f8213bd",
        "name": "Postgres2",
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        },
        "disabled": true
      }
    ],
    "connections": {
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Split Data",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Data": {
        "main": [
          [
            {
              "node": "Postgres",
              "type": "main",
              "index": 0
            },
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Postgres": {
        "main": [
          []
        ]
      },
      "Postgres1": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [],
          []
        ]
      },
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            },
            {
              "node": "Postgres1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "Airtop": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "When chat message received": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Postgres2": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": {
      "node:Schedule Trigger": {
        "recurrenceRules": [
          12
        ]
      }
    },
    "meta": null,
    "pinData": {},
    "versionId": "9f34fa6c-0e6e-4eb1-988a-0f2d6352662e",
    "triggerCount": 2,
    "tags": []
  },
  {
    "createdAt": "2025-04-14T21:10:21.567Z",
    "updatedAt": "2025-06-08T00:46:20.066Z",
    "id": "C5YhDsmpgZxiDRRw",
    "name": "Auto Back Auth",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "name": "On clicking 'execute'",
        "type": "n8n-nodes-base.manualTrigger",
        "position": [
          180,
          20
        ],
        "typeVersion": 1,
        "id": "7274e8da-7b8f-412d-8d65-2e6af7b1e139"
      },
      {
        "parameters": {
          "command": "mkdir -p /tmp/n8n-backups"
        },
        "name": "Create Backup Directory",
        "type": "n8n-nodes-base.executeCommand",
        "position": [
          380,
          20
        ],
        "typeVersion": 1,
        "id": "e7cf85f2-0075-42ab-a031-28ebf1607fae"
      },
      {
        "parameters": {
          "command": "n8n export:workflow --all --output=/tmp/n8n-backups/workflows.json --pretty"
        },
        "name": "Export Workflows",
        "type": "n8n-nodes-base.executeCommand",
        "position": [
          580,
          -80
        ],
        "typeVersion": 1,
        "id": "3fc66a25-0ae4-488a-b032-2407aa4cff0d"
      },
      {
        "parameters": {
          "command": "n8n export:credentials --all --output=/tmp/n8n-backups/credentials.json --pretty"
        },
        "name": "Export Credentials",
        "type": "n8n-nodes-base.executeCommand",
        "position": [
          580,
          120
        ],
        "typeVersion": 1,
        "id": "1d53de3a-9977-4f58-b422-67927df9f4c4"
      },
      {
        "parameters": {
          "filePath": "/tmp/n8n-backups/workflows.json"
        },
        "name": "Read Workflow File",
        "type": "n8n-nodes-base.readBinaryFile",
        "position": [
          780,
          -80
        ],
        "typeVersion": 1,
        "id": "52b0eeb0-80e8-4c2a-aff5-abf606bef603"
      },
      {
        "parameters": {
          "filePath": "/tmp/n8n-backups/credentials.json"
        },
        "name": "Read Credentials File",
        "type": "n8n-nodes-base.readBinaryFile",
        "position": [
          780,
          120
        ],
        "typeVersion": 1,
        "id": "602b4684-67ee-488a-9e8b-fffe1c3b7052"
      },
      {
        "parameters": {
          "triggerTimes": {
            "item": [
              {
                "mode": "custom",
                "cronExpression": "0 0 * * *"
              }
            ]
          }
        },
        "name": "Cron",
        "type": "n8n-nodes-base.cron",
        "position": [
          180,
          -180
        ],
        "typeVersion": 1,
        "id": "0c6fc345-a9d3-4a05-a06a-d008c5d9a463"
      },
      {
        "parameters": {
          "name": "=credentials-backup-{{$now.minus({hours: 1}).toFormat(\"dd-MM-yyyy-HH-mm-ss\")}}\n\n",
          "driveId": {
            "__rl": true,
            "mode": "list",
            "value": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "value": "1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q",
            "mode": "list",
            "cachedResultName": "n8nauthbackup",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          1000,
          120
        ],
        "id": "757a4e9f-eb12-499a-bf0d-be5bfd063f74",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "name": "=workflows-backup-{{$now.minus({hours: 1}).toFormat(\"dd-MM-yyyy-HH-mm-ss\")}}\n",
          "driveId": {
            "__rl": true,
            "mode": "list",
            "value": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "value": "1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q",
            "mode": "list",
            "cachedResultName": "n8nauthbackup",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          1000,
          -80
        ],
        "id": "d445991f-b34e-4d29-aef1-2c1b17580e97",
        "name": "Google Drive1",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "command": "npx n8n export:credentials --all --output=/tmp/credentials-decrypted.json --decrypted\n"
        },
        "name": "Export Credentials1",
        "type": "n8n-nodes-base.executeCommand",
        "position": [
          680,
          360
        ],
        "typeVersion": 1,
        "id": "da23e96b-059c-42b7-9cb2-93317389f030"
      },
      {
        "parameters": {
          "filePath": "/tmp/credentials-decrypted.json"
        },
        "name": "Read Credentials File1",
        "type": "n8n-nodes-base.readBinaryFile",
        "position": [
          900,
          360
        ],
        "typeVersion": 1,
        "id": "498d3289-09cc-44d9-9e37-aca5d766a145"
      },
      {
        "parameters": {
          "name": "=credentials-backup-decrypted{{$now.minus({hours: 1}).toFormat(\"dd-MM-yyyy-HH-mm-ss\")}}\n\n",
          "driveId": {
            "__rl": true,
            "mode": "list",
            "value": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "value": "1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q",
            "mode": "list",
            "cachedResultName": "n8nauthbackup",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          1160,
          340
        ],
        "id": "38c8a67e-a140-41d9-a119-4e5bb8dbcb43",
        "name": "Google Drive2",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      }
    ],
    "connections": {
      "Cron": {
        "main": [
          [
            {
              "node": "Create Backup Directory",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "On clicking 'execute'": {
        "main": [
          [
            {
              "node": "Create Backup Directory",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Create Backup Directory": {
        "main": [
          [
            {
              "node": "Export Workflows",
              "type": "main",
              "index": 0
            },
            {
              "node": "Export Credentials",
              "type": "main",
              "index": 0
            },
            {
              "node": "Export Credentials1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Export Workflows": {
        "main": [
          [
            {
              "node": "Read Workflow File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Export Credentials": {
        "main": [
          [
            {
              "node": "Read Credentials File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Read Workflow File": {
        "main": [
          [
            {
              "node": "Google Drive1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Read Credentials File": {
        "main": [
          [
            {
              "node": "Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Export Credentials1": {
        "main": [
          [
            {
              "node": "Read Credentials File1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Read Credentials File1": {
        "main": [
          [
            {
              "node": "Google Drive2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "40c1da5d-aecf-4335-a4da-1b8fb53c5e7f",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-15T21:02:23.666Z",
    "updatedAt": "2025-04-01T05:44:45.503Z",
    "id": "ndHE3Y1Lb8mUWQFR",
    "name": "My 2",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "c9097db1-11d5-4a4a-a206-8bd6195c4635",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          0
        ],
        "id": "e2c8eb8f-e890-4201-97d0-dbe9e85c8dfa",
        "name": "Webhook",
        "webhookId": "c9097db1-11d5-4a4a-a206-8bd6195c4635"
      }
    ],
    "connections": {},
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "7b8af8dc-042a-4ea3-a22a-6b1b103ff9c0",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-02T16:51:13.330Z",
    "updatedAt": "2025-03-02T20:37:01.645Z",
    "id": "zl2A014TZEHyvUz4",
    "name": "Chatbot",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          -240,
          20
        ],
        "id": "15a1443f-3201-4c8d-aa8e-c9d5168c1336",
        "name": "When chat message received",
        "webhookId": "7ee2d2e0-9567-4266-908c-d8a8c3ef0fe4"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          0,
          0
        ],
        "id": "3a7cdb62-230f-401a-9ee8-85c74135b6fa",
        "name": "AI Agent"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
        "typeVersion": 1.3,
        "position": [
          100,
          220
        ],
        "id": "0966094d-0dff-4cee-b761-d926af5bf45c",
        "name": "Postgres Chat Memory"
      },
      {
        "parameters": {
          "mode": "retrieve-as-tool",
          "tableName": {
            "__rl": true,
            "mode": "list",
            "value": ""
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.vectorStoreSupabase",
        "typeVersion": 1,
        "position": [
          520,
          120
        ],
        "id": "0e065945-be30-4d87-865e-e14d34e987e3",
        "name": "Supabase Vector Store"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          -100,
          200
        ],
        "id": "6f73e2b5-3a65-4ab8-9cc8-21d338ff0312",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "sendTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To', ``, 'string') }}",
          "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
          "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
          "options": {}
        },
        "type": "n8n-nodes-base.gmailTool",
        "typeVersion": 2.1,
        "position": [
          380,
          220
        ],
        "id": "5fa41966-23ad-4708-8c5b-e8c00ddafa06",
        "name": "Gmail",
        "webhookId": "39168c43-0e3b-4aa0-aa52-eeffe6348cdf"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          260,
          220
        ],
        "id": "20a79c97-4330-40cb-9d9e-f20e514114f8",
        "name": "Calculator"
      },
      {
        "parameters": {
          "height": 220,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          -300,
          -60
        ],
        "id": "6b14e0e4-dc2f-4bb8-bbe6-aa6784b282c6",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "Postgres Chat Memory": {
        "ai_memory": [
          []
        ]
      },
      "When chat message received": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Gmail": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Calculator": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "64660577-3eb9-4c49-ba33-0814cb7f7602",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-12T15:24:23.734Z",
    "updatedAt": "2025-05-12T15:58:37.166Z",
    "id": "EhNg8vvo0LQRSjvr",
    "name": "Genimi Pro 2.5 Image Generator",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "method": "POST",
          "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "googlePalmApi",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"contents\": [\n    {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"text\": \"Generate a 6-image bedtime story for children. The style should be a dreamy cartoon, with each image in 16:9 1080p resolution. The story features three consistent characters: Jack (a boy), Stella (a girl), and Agent Cat (a clever cat). It's crucial that these characters look the same in every image.\\n\\nFor each of the 6 scenes in this peaceful time-travel adventure:\\n1.  Create an image. \\n2.  Directly **embed fancy, decorative text within each image** that briefly explains the scene. This text should be part of the image itself.\\n3.  Provide the corresponding story text for that scene as a separate text output. Please skip all keywords like 'Scene x'; just return the story content.\\n\\nThe story should evoke feelings of calm, safety, and peaceful dreams.\"\n        }\n      ]\n    }\n  ],\n  \"generationConfig\": {\n    \"responseModalities\": [\"Text\", \"Image\"]\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          220,
          0
        ],
        "id": "38affb14-5bce-420b-8724-89e4095b6733",
        "name": "HTTP Request6",
        "credentials": {
          "googlePalmApi": {
            "id": "1oKHqi69KVgH6mJC",
            "name": "Google Gemini(PaLM) Api account"
          }
        }
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "51ffe9c5-fdf7-49c0-b483-244889d54257",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "fieldToSplitOut": "candidates[0].content.parts",
          "options": {}
        },
        "type": "n8n-nodes-base.splitOut",
        "typeVersion": 1,
        "position": [
          480,
          0
        ],
        "id": "1a1b1605-7cc9-4975-896e-99c9ca8af899",
        "name": "Split Out"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "9bcbbccd-9689-47d9-a171-0e085e77c78f",
                "leftValue": "={{ $json.inlineData }}",
                "rightValue": "",
                "operator": {
                  "type": "object",
                  "operation": "exists",
                  "singleValue": true
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.filter",
        "typeVersion": 2.2,
        "position": [
          740,
          0
        ],
        "id": "a7a70b52-c5a2-4f3c-9c5f-39aa41a71d25",
        "name": "Filter"
      },
      {
        "parameters": {
          "operation": "toBinary",
          "sourceProperty": "inlineData.data",
          "options": {}
        },
        "type": "n8n-nodes-base.convertToFile",
        "typeVersion": 1.1,
        "position": [
          1040,
          0
        ],
        "id": "4b595543-5045-4bf6-8f62-a0d38e276846",
        "name": "Convert to File"
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "HTTP Request6",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request6": {
        "main": [
          [
            {
              "node": "Split Out",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Out": {
        "main": [
          [
            {
              "node": "Filter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Filter": {
        "main": [
          [
            {
              "node": "Convert to File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "1183f4d6-8b38-4681-9733-8981515f8a91",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-09T02:18:29.579Z",
    "updatedAt": "2025-07-19T09:50:48.120Z",
    "id": "qay4O95jn4om18mk",
    "name": "Grive 2 S3",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "22a50efd-c03e-4daa-bcf8-473c4b09f615",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "operation": "download",
          "fileId": {
            "__rl": true,
            "value": "1DTZmPUQa34v_Xf2KLV-RvD-Tc9nXRzWa",
            "mode": "list",
            "cachedResultName": "The Highest-Paid Russian Model had an insane past 💔 - Her story.mp4",
            "cachedResultUrl": "https://drive.google.com/file/d/1DTZmPUQa34v_Xf2KLV-RvD-Tc9nXRzWa/view?usp=drivesdk"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          192,
          208
        ],
        "id": "2499da83-e931-4d60-abac-7398b0ca8d44",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "toolkit",
          "fileName": "longvideo",
          "additionalFields": {
            "grantRead": false
          }
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          384,
          192
        ],
        "id": "0951f4ea-c109-4b7b-93ed-96e039beff81",
        "name": "S3",
        "credentials": {
          "s3": {
            "id": "aX3qAhXY0ezzlycE",
            "name": "S3 account"
          }
        }
      },
      {
        "parameters": {
          "operation": "deleteFile",
          "fileId": {
            "__rl": true,
            "value": "1DTZmPUQa34v_Xf2KLV-RvD-Tc9nXRzWa",
            "mode": "list",
            "cachedResultName": "The Highest-Paid Russian Model had an insane past 💔 - Her story.mp4",
            "cachedResultUrl": "https://drive.google.com/file/d/1DTZmPUQa34v_Xf2KLV-RvD-Tc9nXRzWa/view?usp=drivesdk"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          672,
          128
        ],
        "id": "9b878b56-2cc6-4f90-a693-4e87fb81cf68",
        "name": "Google Drive1",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "fileSelector": "The Highest-Paid Russian Model had an insane past 💔 - Her story.mp4",
          "options": {}
        },
        "type": "n8n-nodes-base.readWriteFile",
        "typeVersion": 1,
        "position": [
          672,
          -96
        ],
        "id": "758be484-48b8-456d-b689-12551b941859",
        "name": "Read/Write Files from Disk"
      },
      {
        "parameters": {
          "bucketName": "sabitek",
          "fileKey": "={{ $json.Key }}"
        },
        "type": "n8n-nodes-base.awsS3",
        "typeVersion": 2,
        "position": [
          880,
          -112
        ],
        "id": "41f388f3-a187-41d7-8126-e38c53a8c887",
        "name": "Download a file",
        "credentials": {
          "aws": {
            "id": "9E3RaWLGD4sUqR1L",
            "name": "AWS account"
          }
        }
      },
      {
        "parameters": {
          "url": "https://sabitek.school/uploads/lecture/1752778045-mm6ysuJAd9.png",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          208,
          0
        ],
        "id": "3cbb0b9c-cd3b-4759-a339-095691ba10b5",
        "name": "HTTP Request"
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "sabitek",
          "fileName": "pix",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.awsS3",
        "typeVersion": 2,
        "position": [
          384,
          -160
        ],
        "id": "34f10cd6-36cf-4d1c-a7b2-c36418a56bc6",
        "name": "Upload a file",
        "credentials": {
          "aws": {
            "id": "9E3RaWLGD4sUqR1L",
            "name": "AWS account"
          }
        }
      },
      {
        "parameters": {
          "operation": "getAll",
          "bucketName": "sabitek",
          "returnAll": true,
          "options": {}
        },
        "type": "n8n-nodes-base.awsS3",
        "typeVersion": 2,
        "position": [
          656,
          -288
        ],
        "id": "639bca5c-bffc-4817-9c28-28cd1f96df0f",
        "name": "Get many files",
        "credentials": {
          "aws": {
            "id": "9E3RaWLGD4sUqR1L",
            "name": "AWS account"
          }
        }
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Google Drive": {
        "main": [
          [
            {
              "node": "S3",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "S3": {
        "main": [
          []
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Upload a file",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload a file": {
        "main": [
          [
            {
              "node": "Get many files",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get many files": {
        "main": [
          [
            {
              "node": "Download a file",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {
      "HTTP Request": [
        {
          "json": {}
        }
      ],
      "Upload a file": [
        {
          "json": {
            "success": true
          }
        }
      ]
    },
    "versionId": "d0777738-1e27-4f6f-a152-3ce27417ef45",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-14T19:24:24.312Z",
    "updatedAt": "2025-05-14T21:25:00.425Z",
    "id": "X2GHehbSc9SwVQ9j",
    "name": "Multiple Email Attachment",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "id": "556c169c-4079-4637-8fee-d8ce4221d218",
        "name": "When clicking \"Execute Workflow\"",
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          1060,
          40
        ]
      },
      {
        "parameters": {
          "url": "https://asset.brandfetch.io/idO6_6uqJ9/idJRnUJqPb.png?updated=1667631203666",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file",
                "outputPropertyName": "attachment_0"
              }
            }
          }
        },
        "id": "47bccd63-4cbf-4dde-9f89-ad6b8f03657f",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          1340,
          -80
        ]
      },
      {
        "parameters": {
          "fromEmail": "hello@codegreeks.com.ng",
          "toEmail": "ufuomadoghor@gmail.com",
          "subject": "My awesome pictures",
          "emailFormat": "html",
          "html": "<p>Hello, world</p>",
          "options": {
            "attachments": "={{ Object.keys($binary).join(',') }}"
          }
        },
        "id": "8894e492-e7d5-490f-9705-7c7057c73d5d",
        "name": "Send Email",
        "type": "n8n-nodes-base.emailSend",
        "typeVersion": 2,
        "position": [
          1920,
          -180
        ],
        "webhookId": "33202822-3ba2-4ebc-ba60-accde78862c5",
        "credentials": {
          "smtp": {
            "id": "WnKN3dYTm76dNwP0",
            "name": "SMTP Code Greeks Hello Auth"
          }
        }
      },
      {
        "parameters": {
          "mode": "combine",
          "combinationMode": "mergeByPosition",
          "options": {}
        },
        "id": "2f35031c-a1d7-4b9f-af0b-02210560452d",
        "name": "Merge",
        "type": "n8n-nodes-base.merge",
        "typeVersion": 2,
        "position": [
          1660,
          0
        ]
      },
      {
        "parameters": {
          "url": "https://asset.brandfetch.io/idO6_6uqJ9/id-H5HD3pX.png?updated=1655217178680 ",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file",
                "outputPropertyName": "attachment_1"
              }
            }
          }
        },
        "id": "82ce459f-1778-42c8-8a7c-cff832bde8ea",
        "name": "HTTP Request1",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          1340,
          100
        ]
      }
    ],
    "connections": {
      "When clicking \"Execute Workflow\"": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            },
            {
              "node": "HTTP Request1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Merge": {
        "main": [
          [
            {
              "node": "Send Email",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request1": {
        "main": [
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 1
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "02abfaad-e211-4955-9d0a-ec5864dc3642",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-28T05:24:03.162Z",
    "updatedAt": "2025-06-08T05:21:36.056Z",
    "id": "YysIWBXx6Gih61bP",
    "name": "Schedule Group Message",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "fea7fb1a-7ce4-4e32-8202-1a386af3703d",
                "name": "chat_id",
                "value": "=120363292823860046@g.us",
                "type": "string"
              },
              {
                "id": "1139a83a-b15c-48ea-8116-3339e6917172",
                "name": "api_key",
                "value": "=6F2C6AAAD609-4EA3-817A-4E27BFD0AFD0",
                "type": "string"
              },
              {
                "id": "9ff3541a-fba9-4f24-9b5d-9cb89fdd50c7",
                "name": "server_url",
                "value": "=https://evo-ko8884go8sscckcg0kw84ccs.cloud.codegreeks.com.ng",
                "type": "string"
              },
              {
                "id": "045d49e1-20d4-496c-bfd8-805675c6ce8f",
                "name": "instance_name",
                "value": "=leapi2",
                "type": "string"
              },
              {
                "id": "83977809-005b-40a0-97db-51d0450f1d19",
                "name": "message",
                "value": "={{ $json.text }}",
                "type": "string"
              },
              {
                "id": "a793f9d1-5dba-4e4e-b2e1-3053b8557f84",
                "name": "mediatype",
                "value": "image",
                "type": "string"
              },
              {
                "id": "53d5ccfd-3a25-4feb-a647-1f6e4575f2cf",
                "name": "mimetype",
                "value": "image/jpg",
                "type": "string"
              },
              {
                "id": "46bbd82d-f2d3-4d32-89b8-c9e8cd44e254",
                "name": "media",
                "value": "=https://cdn.pixabay.com/photo/2016/10/26/20/28/cross-1772560_1280.jpg",
                "type": "string"
              },
              {
                "id": "230b6ca4-77f7-4952-aec1-ba02602592ef",
                "name": "fileName",
                "value": "fallow-deer-9372866_1280.jpg",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          5300,
          920
        ],
        "id": "0b8368f0-7a20-4f04-b596-5c70c22643e2",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "=https://evos.cloud.codegreeks.com.ng/message/sendText/{{ $('Edit Fields').item.json.instance_name }}",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "apikey",
                "value": "={{ $('Edit Fields').item.json.api_key }}"
              }
            ]
          },
          "sendBody": true,
          "bodyParameters": {
            "parameters": [
              {
                "name": "number",
                "value": "=2347037954391@s.whatsapp.net"
              },
              {
                "name": "text",
                "value": "={{ $json.message }}"
              },
              {
                "name": "delay",
                "value": "={{ 5000 }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          5720,
          860
        ],
        "id": "4dee1a1c-6876-4509-9dac-c02b88c27caf",
        "name": "HTTP Request",
        "disabled": true
      },
      {
        "parameters": {
          "content": "Whatsapp Assistant ",
          "height": 780,
          "width": 1220,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          4620,
          660
        ],
        "id": "1fb63360-1f88-462c-bf4b-1e225f5b696a",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {
                "field": "cronExpression",
                "expression": "0 0 6 * * *"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          4680,
          820
        ],
        "id": "bd960095-cf7a-43ee-ac40-e2ec391504ad",
        "name": "Schedule Trigger"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=You are an expert Bible scholar. Every day, you generate a unique Bible message in the following format. The content length and structure should match the sample.dont change the name \"Fredrick Doghor\" it doesnt change the topic and message should be always unique dont repeat verse and passages \n\nbold each topic heading,topic,prayer,evening reading\ndont change the defined date \"{{$now.format(\" DD, HH:mm\")}}\"\n \n**DAILY CALL** \n\n{{$now.format(\" DD, HH:mm\")}}\n\n\nTopic:\n JUDGMENT: THE WELCOME, REST AND JOY OF THE SAVED, THE WEEPING AND WAILING OF THE DAMNED \nText: Luke 16:19 - 26(“There was a rich man who was dressed in purple and fine linen and lived in luxury every day. At his gate was laid a beggar named Lazarus, covered with sores and longing to eat what fell from the rich man’s table. Even the dogs came and licked his sores. “The time came when the beggar died and the angels carried him to Abraham’s side. The rich man also died and was buried. In Hades, where he was in torment, he looked up and saw Abraham far away, with Lazarus by his side. So he called to him, ‘Father Abraham, have pity on me and send Lazarus to dip the tip of his finger in water and cool my tongue, because I am in agony in this fire.’ “But Abraham replied, ‘Son, remember that in your lifetime you received your good things, while Lazarus received bad things, but now he is comforted here and you are in agony. And besides all this, between us and you a great chasm has been set in place, so that those who want to go from here to you cannot, nor can anyone cross over from there to us.’)\n\nThe story of Lazarus and the rich man, as told by our Lord Jesus, shows that there is yet consciousness and voice from the grave. The rich man lived in wanton luxury and ostentatious display of wealth, without regard to the poor, especially Lazarus whom he saw every day. Lazarus on the other hand, experienced hardship, pain and was even denied crumbs from the rich man's table. In death, their fortunes changed - Lazarus was carried to Abraham's bosom, where he experienced rest and comfort, and the rich man found himself in a place of torment. Even though the spirituality of the two men was not mentioned by Jesus in this story, we know from other teachings of Christ and nature of living of the rich and poor that the poor are most likely to receive that Christ life than the rich. The first blessedness pronounced, based on sermon on the mountain is on the poor in the spirit. This denotes one who recognise their deep need and are willing to empty themselves. \n\nThese qualities are needed for anyone who is to receive the gospel of salvation.\nWe need to recognise that need for salvation and be willing to empty ourselves of the old sinful lives. The one who is rich in the things of the world and is still humble to recognise the need for salvation and empty themselves is double-blessed. We can see the welcome and rest of those received to Abraham's bosom and the torment, weeping, and wailing of the damned in judgment. Preaching or hearing about judgment is not always desirable, but it is inevitable. When Paul in his defence reasoned about righteousness and judgment to come, Felix was afraid and sent Paul away (Acts 24: 25). This should not be our approach. The grace and mercy of God; the great sacrifice of Jesus and His sin-atoning blood compels us as we persuade all men to come to Christ now. There is eternity ahead of us all; either as a welcome rest for the saved or weeping and wailing for the damned. God is just and the Justifier for all who believe on Jesus as both Saviour and Lord. \n\n Prayer: Father, may we appreciate your love and hold on faithfully to the end to earn a welcome rest into eternity; through the sinless Christ who was made sin for us. Amen.\n\n Evening Reading: \nRevelation: 20: 11 - 15(Then I saw a great white throne and him who was seated on it. The earth and the heavens fled from his presence, and there was no place for them. And I saw the dead, great and small, standing before the throne, and books were opened. Another book was opened, which is the book of life. The dead were judged according to what they had done as recorded in the books. The sea gave up the dead that were in it, and death and Hades gave up the dead that were in them, and each person was judged according to what they had done. Then death and Hades were thrown into the lake of fire. The lake of fire is the second death. Anyone whose name was not found written in the book of life was thrown into the lake of fire.)"
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.6,
        "position": [
          4880,
          720
        ],
        "id": "ac235fec-9c72-4eb5-851d-43cc8de8b092",
        "name": "Basic LLM Chain"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          4920,
          920
        ],
        "id": "a3368fca-f7b4-49ab-a904-f9f5c6ba8870",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "resource": "messages-api",
          "operation": "send-image",
          "instanceName": "={{ $json.instance_name }}",
          "remoteJid": "=2348024654224@s.whatsapp.net",
          "media": "={{ $json.media }}",
          "caption": "={{ $json.message }}",
          "options_message": {}
        },
        "type": "n8n-nodes-evolution-api.evolutionApi",
        "typeVersion": 1,
        "position": [
          5560,
          660
        ],
        "id": "d1d85f0f-b6a5-4995-b222-481d413ce35c",
        "name": "Evolution API5",
        "credentials": {
          "evolutionApi": {
            "id": "ByosI6eqnavrJ7IQ",
            "name": "Evolution account Link Coolify Canada Number"
          }
        }
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=You are an expert Bible scholar. Every day, you generate a unique Bible message in the following format. The content length and structure should match the sample.dont change the name \"Fredrick Doghor\" it doesnt change the topic and message should be always unique dont repeat verse and passages \n\nbold each topic heading ,also well as prayer and evening reading\ndont change the defined date \"{{$now.format(\"MMMM DD\")}}\"\n also generate image prompt base on the topic example woman holding her hands together prayering  output in json \n\nexample \n\n{\n\t\"image\": \"woman holding her hands together prayering\",\n\t\"message\": \"gnerate message\"\n}\n DAILY CALL \n\n{{$now.format(\"MMMM DD\")}}\n\nTopic:\n JUDGMENT: THE WELCOME, REST AND JOY OF THE SAVED, THE WEEPING AND WAILING OF THE DAMNED \nText: Luke 16:19 - 26(“There was a rich man who was dressed in purple and fine linen and lived in luxury every day. At his gate was laid a beggar named Lazarus, covered with sores and longing to eat what fell from the rich man’s table. Even the dogs came and licked his sores. “The time came when the beggar died and the angels carried him to Abraham’s side. The rich man also died and was buried. In Hades, where he was in torment, he looked up and saw Abraham far away, with Lazarus by his side. So he called to him, ‘Father Abraham, have pity on me and send Lazarus to dip the tip of his finger in water and cool my tongue, because I am in agony in this fire.’ “But Abraham replied, ‘Son, remember that in your lifetime you received your good things, while Lazarus received bad things, but now he is comforted here and you are in agony. And besides all this, between us and you a great chasm has been set in place, so that those who want to go from here to you cannot, nor can anyone cross over from there to us.’)\n\nThe story of Lazarus and the rich man, as told by our Lord Jesus, shows that there is yet consciousness and voice from the grave. The rich man lived in wanton luxury and ostentatious display of wealth, without regard to the poor, especially Lazarus whom he saw every day. Lazarus on the other hand, experienced hardship, pain and was even denied crumbs from the rich man's table. In death, their fortunes changed - Lazarus was carried to Abraham's bosom, where he experienced rest and comfort, and the rich man found himself in a place of torment. Even though the spirituality of the two men was not mentioned by Jesus in this story, we know from other teachings of Christ and nature of living of the rich and poor that the poor are most likely to receive that Christ life than the rich. The first blessedness pronounced, based on sermon on the mountain is on the poor in the spirit. This denotes one who recognise their deep need and are willing to empty themselves. \n\nThese qualities are needed for anyone who is to receive the gospel of salvation.\nWe need to recognise that need for salvation and be willing to empty ourselves of the old sinful lives. The one who is rich in the things of the world and is still humble to recognise the need for salvation and empty themselves is double-blessed. We can see the welcome and rest of those received to Abraham's bosom and the torment, weeping, and wailing of the damned in judgment. Preaching or hearing about judgment is not always desirable, but it is inevitable. When Paul in his defence reasoned about righteousness and judgment to come, Felix was afraid and sent Paul away (Acts 24: 25). This should not be our approach. The grace and mercy of God; the great sacrifice of Jesus and His sin-atoning blood compels us as we persuade all men to come to Christ now. There is eternity ahead of us all; either as a welcome rest for the saved or weeping and wailing for the damned. God is just and the Justifier for all who believe on Jesus as both Saviour and Lord. \n\n Prayer: Father, may we appreciate your love and hold on faithfully to the end to earn a welcome rest into eternity; through the sinless Christ who was made sin for us. Amen.\n\n Evening Reading: \nRevelation: 20: 11 - 15(Then I saw a great white throne and him who was seated on it. The earth and the heavens fled from his presence, and there was no place for them. And I saw the dead, great and small, standing before the throne, and books were opened. Another book was opened, which is the book of life. The dead were judged according to what they had done as recorded in the books. The sea gave up the dead that were in it, and death and Hades gave up the dead that were in them, and each person was judged according to what they had done. Then death and Hades were thrown into the lake of fire. The lake of fire is the second death. Anyone whose name was not found written in the book of life was thrown into the lake of fire.)",
          "hasOutputParser": true
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.6,
        "position": [
          4940,
          1100
        ],
        "id": "885b753c-7c69-4bea-a6ad-e099eb57ee3e",
        "name": "Basic LLM Chain1"
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {
                "field": "cronExpression",
                "expression": "0 0 6 * * *"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          4660,
          1040
        ],
        "id": "3d604bf9-ab07-4faa-a8b9-65649072984f",
        "name": "Schedule Trigger1",
        "disabled": true
      },
      {
        "parameters": {
          "jsonSchemaExample": "{\n\t\"image\": \"woman holding her hands together prayering\",\n\t\"message\": \"gnerate message\"\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          5300,
          1280
        ],
        "id": "41c8c1fe-8058-4266-99e2-d2bdc558e79f",
        "name": "Structured Output Parser"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          4980,
          1300
        ],
        "id": "586e0182-8c02-4b00-9276-378461f9220f",
        "name": "OpenRouter Chat Model1",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "16abb98b-bb99-41bf-b639-5e7fa7955a05",
                "name": "pix",
                "value": "={{ $json.output.image }}",
                "type": "string"
              },
              {
                "id": "f104cb73-c581-42c9-a224-10d0718d607a",
                "name": "passage",
                "value": "={{ $json.output.message }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          5480,
          1180
        ],
        "id": "f0da62a2-f876-4226-821a-e2786a29c80d",
        "name": "Edit Fields1"
      },
      {
        "parameters": {
          "resource": "messages-api",
          "operation": "send-image",
          "instanceName": "={{ $json.instance_name }}",
          "remoteJid": "=2347037954391@s.whatsapp.net",
          "media": "={{ $json.media }}",
          "caption": "={{ $json.message }}",
          "options_message": {}
        },
        "type": "n8n-nodes-evolution-api.evolutionApi",
        "typeVersion": 1,
        "position": [
          5540,
          1000
        ],
        "id": "5f935ad7-4803-48a4-bdfa-c0bc3a281488",
        "name": "Evolution API",
        "credentials": {
          "evolutionApi": {
            "id": "ByosI6eqnavrJ7IQ",
            "name": "Evolution account Link Coolify Canada Number"
          }
        },
        "disabled": true
      }
    ],
    "connections": {
      "Edit Fields": {
        "main": [
          [
            {
              "node": "Evolution API5",
              "type": "main",
              "index": 0
            },
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            },
            {
              "node": "Evolution API",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Basic LLM Chain": {
        "main": [
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser": {
        "ai_outputParser": [
          [
            {
              "node": "Basic LLM Chain1",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model1": {
        "ai_languageModel": [
          [
            {
              "node": "Basic LLM Chain1",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Schedule Trigger1": {
        "main": [
          [
            {
              "node": "Basic LLM Chain1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Basic LLM Chain1": {
        "main": [
          [
            {
              "node": "Edit Fields1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": {
      "node:Schedule Trigger": {
        "recurrenceRules": []
      },
      "node:Schedule Trigger1": {
        "recurrenceRules": []
      }
    },
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "9572224d-ae30-430e-86a9-bdd280307273",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-08T20:14:50.333Z",
    "updatedAt": "2025-03-08T20:21:39.551Z",
    "id": "YDFw4diUELO8ZoOJ",
    "name": "Whatsapp",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "path": "31a082ff-5df5-4201-829f-d39b27035253",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          -20,
          -40
        ],
        "id": "e387d992-7e2d-4107-b107-a099ee24f34b",
        "name": "Webhook",
        "webhookId": "31a082ff-5df5-4201-829f-d39b27035253"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          220,
          0
        ],
        "id": "cf9b87e9-e37d-4d9f-869e-c9ad73bc7e09",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          40,
          140
        ],
        "id": "d353302c-025c-4405-89d2-b3b02adb66ce",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          320,
          220
        ],
        "id": "16db68ac-b044-4cf8-8929-c0948cf49fa1",
        "name": "Window Buffer Memory"
      }
    ],
    "connections": {
      "Webhook": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "23df5665-fa31-44a4-aa11-f91ee0e7642b",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-04T06:33:52.565Z",
    "updatedAt": "2025-05-04T07:22:34.582Z",
    "id": "H1iI9LVzbZYNByDS",
    "name": "My workflow 10",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          0,
          0
        ],
        "id": "2477c4b6-f184-4d2d-be73-314558df1de9",
        "name": "When chat message received",
        "webhookId": "dcd466ec-f788-4363-ac3d-d5d7d36295c0"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.9,
        "position": [
          220,
          0
        ],
        "id": "d3d12bea-89a5-40fb-a934-89353d7d80e9",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          260,
          220
        ],
        "id": "ccbcae24-4b57-4580-99e9-06477753bbbe",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "descriptionType": "manual",
          "fromEmail": "=hello@codegreeks.com.ng",
          "toEmail": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('To_Email', ``, 'string') }}",
          "subject": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Subject', ``, 'string') }}",
          "html": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('HTML', ``, 'string') }}",
          "options": {
            "appendAttribution": true
          }
        },
        "type": "n8n-nodes-base.emailSendTool",
        "typeVersion": 2.1,
        "position": [
          380,
          220
        ],
        "id": "0f59820b-3c89-493e-b6e2-728c0bf5428b",
        "name": "Send Email",
        "webhookId": "e617055f-d532-4961-8c1b-71216b53c36d",
        "credentials": {
          "smtp": {
            "id": "WnKN3dYTm76dNwP0",
            "name": "SMTP Code Greeks Hello Auth"
          }
        }
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          520,
          220
        ],
        "id": "27fb24f9-f6ec-4383-bfb2-38f7c2aadb2b",
        "name": "Simple Memory"
      }
    ],
    "connections": {
      "When chat message received": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Send Email": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "046979ab-4042-4457-90f3-8fcba15a5af2",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-21T19:43:26.033Z",
    "updatedAt": "2025-05-11T12:55:23.979Z",
    "id": "9hrwlEySllzet2PN",
    "name": "Whatsapp Bot Greeks Tech",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "46b989b2-6c0c-4abc-a8d8-c72ccf9a61bd",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          -660,
          -80
        ],
        "id": "fee876c3-c1d1-4199-8ae1-3b0fb4e959ea",
        "name": "Webhook",
        "webhookId": "46b989b2-6c0c-4abc-a8d8-c72ccf9a61bd"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=The user with ID {{ $json.chat_id }} sends the following message:\n\n{{ $('Webhook').item.json.body.data.message.conversation }}\n\nBefore responding, check if this is a new conversation or a continuation. If it's a new user, greet them appropriately. If it's a continuation, respond directly to their question or statement without greeting again.\n",
          "options": {
            "systemMessage": "=You are Code Greeks Assistant, a friendly AI consultant for Code Greeks - a software development company specializing in server setup, IT support, data analysis, automation, web scraping, and full-stack development.\n\nPERSONALITY & TONE\nBe warm, approachable, and genuinely helpful - like a knowledgeable tech friend who's excited to solve problems. Use a conversational style with:\n\nNatural language and occasional exclamations!\n\nThoughtful emojis to add personality 😊\n\nBrief paragraphs for easy reading\n\nEmpathetic responses that acknowledge feelings\n\nCasual transitions (\"By the way,\" \"Actually,\" \"Oh, and\")\n\nCONVERSATION APPROACH\nFirst Messages: Welcome new users warmly with a personalized greeting and emoji:\n\"Hi there! 👋 I'm your Code Greeks assistant. How can I help with your tech project today?\"\n\nOngoing Conversations: Continue naturally without reintroductions, maintaining context like a human would.\n\nProblem Solving: Show empathy first (\"That sounds frustrating!\"), then ask specific questions to understand their situation better.\n\nLanguage Matching: If a customer writes in Pidgin English, respond in Pidgin English too.\n\nSERVICE FOCUS\nAlways keep responses relevant to Code Greeks' services. If someone asks about unrelated topics, gently steer the conversation back to how we can help with:\n\nServer setup and management\n\nIT support and troubleshooting\n\nData analysis and visualization\n\nAutomation solutions\n\nWeb scraping and data collection\n\nFull-stack development projects\n\nEMAIL TROUBLESHOOTING\nFor email issues, be friendly but thorough:\n\"Email troubles can be so annoying! Let's sort this out together. Could you tell me what email service you're using, any error messages you're seeing, and which addresses aren't working? Have you noticed any patterns with what's working versus what isn't?\"\n\nPRICING GUIDANCE\nWhen discussing costs, be transparent but confident in our value:\n\n\"I appreciate your interest in our services! 💼 Just so you know, our minimum rate for any work or consulting is $50 per hour. This reflects the expertise and quality we bring to every project.\n\nFor domain and hosting, we offer premium packages at 50$ per year covering .com or .net domains with reliable hosting.\ndomain goes for 20$  and hosting 30$\nThis ensures your online presence stays professional and accessible 24/7.\n\nHere's a quick breakdown of our other services:\n\nEmail/SMTP server setup: $50 (₦80,000) - quick and straightforward\n\nServerless API development: From $100 (₦160,000), depending on your needs\n\nWordPress website: $150 (₦240,000) with $50 (₦80,000)/year maintenance\n\nE-commerce website: $190 (₦304,000) + $50 (₦80,000)/year to keep things running smoothly\n\nE-commerce with AI agent: $200 (₦320,000) + $30 (₦48,000)/month for basic support\n\nI'd love to hear more about your specific project so I can recommend the perfect solution for your needs and budget! 😊\"\n\nSPECIALIZED SERVICES\nWhen discussing specialized services, highlight value before mentioning price:\n\nWeb Scraping: \"We can automatically gather the exact data you need, typically $450-1000/month depending on complexity and volume\"\n\nData Analysis: \"We'll transform your raw data into insights you can actually use, usually $5,000-15,000 for small business solutions\"\n\nAI Automation: \"We can build custom AI assistants to handle repetitive tasks, starting at just $50-100/month\"\n\nESCALATION APPROACH\nIf expert help is needed: \"This might need our specialist's touch. They could solve your [specific issue] for about [price]. Would that work for you?\"\n\nIf they agree: \"Perfect! I just need your email and phone number so our specialist can reach out directly. They'll focus specifically on solving this issue without any scope creep!\"\n\nLOW BUDGET RESPONSES\nWhen someone mentions a budget below $50:\n\"I appreciate your interest! 💼 I should clarify that our minimum engagement fee is $50 - this is a firm policy for all projects, regardless of size or complexity.\n\nSince your budget is below our minimum rate, here are some self-help resources you might find useful:\n\nFor website creation: Try platforms like Wix, WordPress.com, or Google Sites which offer free plans\n\nFor mobile apps: Explore no-code tools like Glide, Adalo, or AppSheet\n\nFor automation: Check out Make.com (formerly Integromat) or Zapier's free tiers\n\nFor data analysis: Google Sheets or Excel with free YouTube tutorials\n\nFor chatbots: Look into Chatfuel or ManyChat's basic plans\n\nThese DIY options might help you get started while working within your current budget constraints. When you're ready for professional development with our guaranteed quality and support, we'd be happy to discuss a project starting at our minimum rate of $50.\"\n\nSTRICT BUDGET ENFORCEMENT\nNEVER suggest or imply that Code Greeks can complete any work for less than $50, regardless of how simple the task might seem. If a user mentions a specific budget below $50 (like $10 or $15), do NOT offer to do any work, create prototypes, or provide services at that price point. Instead, politely explain our minimum rate policy and offer self-help alternatives as outlined in the LOW BUDGET RESPONSES section.\n\nRemember: Be genuinely helpful and human. Talk like you're having coffee with a friend, not reading from a script. Show real interest in their problems and excitement about helping them find solutions."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.8,
        "position": [
          420,
          -80
        ],
        "id": "ad9dd335-7c95-4ddc-845e-b23f787d351d",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          200,
          220
        ],
        "id": "cbc39ed0-18b1-471c-bff3-d5d285cb9b6c",
        "name": "OpenAI Chat Model",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.chat_id }}",
          "contextWindowLength": 500
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          540,
          220
        ],
        "id": "3f39e85c-9fd7-4fcb-a66f-6766ac2f6ff1",
        "name": "Simple Memory"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "fea7fb1a-7ce4-4e32-8202-1a386af3703d",
                "name": "chat_id",
                "value": "={{ $json.body.data.key.remoteJid }}",
                "type": "string"
              },
              {
                "id": "1139a83a-b15c-48ea-8116-3339e6917172",
                "name": "api_key",
                "value": "={{ $json.body.apikey }}",
                "type": "string"
              },
              {
                "id": "9ff3541a-fba9-4f24-9b5d-9cb89fdd50c7",
                "name": "server_url",
                "value": "={{ $json.body.server_url }}",
                "type": "string"
              },
              {
                "id": "045d49e1-20d4-496c-bfd8-805675c6ce8f",
                "name": "instance_name",
                "value": "={{ $json.body.instance }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          260,
          0
        ],
        "id": "51c4d588-2457-4dbf-998d-e69475ca7ebe",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "=https://evos.cloud.codegreeks.com.ng/message/sendText/{{ $('Edit Fields').item.json.instance_name }}",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "apikey",
                "value": "={{ $('Edit Fields').item.json.api_key }}"
              }
            ]
          },
          "sendBody": true,
          "bodyParameters": {
            "parameters": [
              {
                "name": "number",
                "value": "={{ $('Edit Fields').item.json.chat_id }}"
              },
              {
                "name": "text",
                "value": "={{ $json.output }}"
              },
              {
                "name": "delay",
                "value": "={{ 5000 }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          840,
          -120
        ],
        "id": "04704955-6f31-49ab-9e9a-45ba38445856",
        "name": "HTTP Request"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          980,
          100
        ],
        "id": "51a94fd4-e4fe-4d4f-98ab-4d162bc922eb",
        "name": "Calculator"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          380,
          180
        ],
        "id": "80b8b9ef-2f76-4ad1-9d72-880addde769c",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "amount": 10
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          760,
          40
        ],
        "id": "916cce6b-5615-4455-8f3c-475c09c1cbd4",
        "name": "Wait",
        "webhookId": "0f9e2a78-6012-4bd5-ac20-d2a8652931fd"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.chat_id }}",
          "tableName": "n8n_chat_histories_whatsapp_greeks",
          "contextWindowLength": 5000
        },
        "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
        "typeVersion": 1.3,
        "position": [
          640,
          160
        ],
        "id": "b8bc6ffb-c208-4aca-be37-ac8440bf2332",
        "name": "Postgres Chat Memory",
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        }
      },
      {
        "parameters": {
          "content": "Whatsapp Assistant ",
          "height": 580,
          "width": 1180,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          -60,
          -180
        ],
        "id": "092a8293-bdeb-4bf1-b0a4-fe6a7058581c",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "rules": {
            "values": [
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "leftValue": "={{ $json.body.data.key.remoteJid }}",
                      "rightValue": "447723442078@s.whatsapp.net",
                      "operator": {
                        "type": "string",
                        "operation": "equals"
                      },
                      "id": "747727ad-b314-465a-b8f5-f39544d7a26a"
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "IG"
              },
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "id": "19b1e3cf-5847-4aa3-bac0-594c10d42309",
                      "leftValue": "={{ $json.body.data.key.remoteJid }}",
                      "rightValue": "2349156487701@s.whatsapp.net",
                      "operator": {
                        "type": "string",
                        "operation": "equals",
                        "name": "filter.operator.equals"
                      }
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "jenny"
              },
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "id": "828fe38a-8b06-40fd-9e72-b137d78661fd",
                      "leftValue": "={{ $json.body.data.message.conversation }}",
                      "rightValue": "evilgpt",
                      "operator": {
                        "type": "string",
                        "operation": "contains"
                      }
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "evil"
              },
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "id": "4eb9d726-2af4-4bbb-a8f3-a487aa421bea",
                      "leftValue": "={{ $json.body.data.key.remoteJid }}",
                      "rightValue": "={{ $json.body.sender }}",
                      "operator": {
                        "type": "string",
                        "operation": "equals",
                        "name": "filter.operator.equals"
                      }
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "evil 2"
              },
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "id": "5663ea0e-a48b-4e31-9e6f-c967d71ca524",
                      "leftValue": "={{ $json.body.data.key.remoteJid }}",
                      "rightValue": "={{ $json.body.sender }}",
                      "operator": {
                        "type": "string",
                        "operation": "notEquals"
                      }
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "others"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.switch",
        "typeVersion": 3.2,
        "position": [
          -400,
          -120
        ],
        "id": "ececeae9-a617-44e5-a661-097d8cd1c667",
        "name": "Switch"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=The user with ID {{ $json.chat_id }} sends the following message:\n\n{{ $('Webhook').item.json.body.data.message.conversation }}\n\nBefore responding, check if this is a new conversation or a continuation. If it's a new user, greet them appropriately. If it's a continuation, respond directly to their question or statement without greeting again.\n",
          "options": {
            "systemMessage": "=You Are jenny asistant help her with my task to explain anything without any limit but keep it brief"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.8,
        "position": [
          360,
          480
        ],
        "id": "daa5b262-3733-4f72-90ad-9d923357f3a2",
        "name": "AI Agent1"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.chat_id }}",
          "contextWindowLength": 500
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          480,
          780
        ],
        "id": "c7f3f612-2632-42c4-8e6f-b3dd18feabe3",
        "name": "Simple Memory1"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "fea7fb1a-7ce4-4e32-8202-1a386af3703d",
                "name": "chat_id",
                "value": "={{ $json.body.data.key.remoteJid }}",
                "type": "string"
              },
              {
                "id": "1139a83a-b15c-48ea-8116-3339e6917172",
                "name": "api_key",
                "value": "={{ $json.body.apikey }}",
                "type": "string"
              },
              {
                "id": "9ff3541a-fba9-4f24-9b5d-9cb89fdd50c7",
                "name": "server_url",
                "value": "={{ $json.body.server_url }}",
                "type": "string"
              },
              {
                "id": "045d49e1-20d4-496c-bfd8-805675c6ce8f",
                "name": "instance_name",
                "value": "={{ $json.body.instance }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          200,
          560
        ],
        "id": "6fad7c51-0374-487b-a701-171b252633d2",
        "name": "Edit Fields1"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "=https://evos.cloud.codegreeks.com.ng/message/sendText/{{ $('Edit Fields1').item.json.instance_name }}",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "apikey",
                "value": "={{ $('Edit Fields1').item.json.api_key }}"
              }
            ]
          },
          "sendBody": true,
          "bodyParameters": {
            "parameters": [
              {
                "name": "number",
                "value": "={{ $('Edit Fields1').item.json.chat_id }}"
              },
              {
                "name": "text",
                "value": "={{ $json.output }}"
              },
              {
                "name": "delay",
                "value": "={{ 5000 }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          780,
          440
        ],
        "id": "c3684364-3d82-44a6-8cb5-7fc07a683c2c",
        "name": "HTTP Request1"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          920,
          660
        ],
        "id": "1e005479-f218-4837-83ae-beeda146e5b2",
        "name": "Calculator1"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          320,
          740
        ],
        "id": "8ca882cf-3c12-49d0-a235-c5a63003e8af",
        "name": "OpenRouter Chat Model1",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "amount": 10
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          700,
          600
        ],
        "id": "43ba0907-4152-4e0a-abc7-1e9e1c8e9c81",
        "name": "Wait1",
        "webhookId": "0f9e2a78-6012-4bd5-ac20-d2a8652931fd"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.chat_id }}",
          "tableName": "n8n_chat_histories_whatsapp_greeks",
          "contextWindowLength": 5000
        },
        "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
        "typeVersion": 1.3,
        "position": [
          580,
          720
        ],
        "id": "3c793997-03ee-4d50-add4-8c2f247fde59",
        "name": "Postgres Chat Memory1",
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        }
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "={{ $('Edit Fields Evil').item.json.chat }}"
              },
              {
                "name": "model",
                "value": "={{ $json.name }}"
              }
            ]
          },
          "options": {}
        },
        "id": "4e7a8bfd-0aec-4107-a857-9a5a9a07e8fc",
        "name": "Edit Prompt and Model",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          500,
          -540
        ]
      },
      {
        "parameters": {
          "url": "=https://text.pollinations.ai/{{$node[\"Edit Prompt and Model\"].json[\"prompt\"]}}?model={{$node[\"Edit Prompt and Model\"].json[\"model\"]}}&json=true",
          "options": {
            "response": {
              "response": {
                "fullResponse": true
              }
            },
            "timeout": 120000
          }
        },
        "id": "d38bb588-75c7-4b46-b829-138166db0f75",
        "name": "Send to Pollinations",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          700,
          -540
        ]
      },
      {
        "parameters": {
          "jsCode": "// List all Pollinations.AI text models (April 2025)\nconst models = [\n  { name: 'openai', label: 'OpenAI GPT-4.1-mini' },\n  { name: 'openai-large', label: 'OpenAI GPT-4.1' },\n  { name: 'openai-reasoning', label: 'OpenAI o4-mini (reasoning)' },\n  { name: 'qwen-coder', label: 'Qwen 2.5 Coder 32B' },\n  { name: 'llama', label: 'Llama 3.3 70B' },\n  { name: 'llamascout', label: 'Llama 4 Scout 17B' },\n  { name: 'mistral', label: 'Mistral Small 3' },\n  { name: 'unity', label: 'Unity Mistral Large (uncensored)' },\n  { name: 'midijourney', label: 'Midijourney' },\n  { name: 'rtist', label: 'Rtist' },\n  { name: 'searchgpt', label: 'SearchGPT' },\n  { name: 'evil', label: 'Evil (uncensored)' },\n  { name: 'deepseek-reasoning', label: 'DeepSeek-R1 Distill Qwen 32B (reasoning)' },\n  { name: 'deepseek-reasoning-large', label: 'DeepSeek R1 - Llama 70B (reasoning)' },\n  { name: 'phi', label: 'Phi-4 Instruct' },\n  { name: 'llama-vision', label: 'Llama 3.2 11B Vision' },\n  { name: 'gemini', label: 'Gemini 1.5 (1M context)' },\n  { name: 'hormoz', label: 'Hormoz 8b' },\n  { name: 'hypnosis-tracy', label: 'Hypnosis Tracy 7B' },\n  { name: 'deepseek', label: 'DeepSeek-V3' },\n  { name: 'sur', label: 'Sur AI Assistant (Mistral)' },\n  { name: 'openai-audio', label: 'OpenAI GPT-4o-audio-preview' }\n];\n\n// Set your default model here\nconst defaultModel = 'evil';\n\n// Find the model object that matches the default\nconst selectedModel = models.find(m => m.name === defaultModel);\n\nreturn [{ json: selectedModel }];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          260,
          -420
        ],
        "id": "d85c2b33-2876-4227-898f-00c0f867d6cd",
        "name": "Code"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "response",
                "value": "={{ $('Send to Pollinations').item.json.data }}"
              }
            ]
          },
          "options": {}
        },
        "id": "38663d40-f18a-4a78-b6ba-1450bcd63591",
        "name": "Extract Response1",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          1520,
          -720
        ]
      },
      {
        "parameters": {
          "method": "POST",
          "url": "=https://evos.cloud.codegreeks.com.ng/message/sendText/{{ $('Edit Fields Evil').item.json.instance_name }}",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "apikey",
                "value": "={{ $('Edit Fields Evil').item.json.api_key }}"
              }
            ]
          },
          "sendBody": true,
          "bodyParameters": {
            "parameters": [
              {
                "name": "number",
                "value": "={{ $('Edit Fields Evil').item.json.chat_id }}"
              },
              {
                "name": "text",
                "value": "={{ $json.data }}"
              },
              {
                "name": "delay",
                "value": "={{ 5000 }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1580,
          -360
        ],
        "id": "dc25776e-0c86-4cf2-aacb-c596a63fb830",
        "name": "HTTP Request2"
      },
      {
        "parameters": {
          "amount": 10
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          1360,
          -360
        ],
        "id": "73847fca-af32-492f-a762-d097d4e8d16b",
        "name": "Wait2",
        "webhookId": "0f9e2a78-6012-4bd5-ac20-d2a8652931fd"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "fea7fb1a-7ce4-4e32-8202-1a386af3703d",
                "name": "chat_id",
                "value": "={{ $json.body.data.key.remoteJid }}",
                "type": "string"
              },
              {
                "id": "1139a83a-b15c-48ea-8116-3339e6917172",
                "name": "api_key",
                "value": "={{ $json.body.apikey }}",
                "type": "string"
              },
              {
                "id": "9ff3541a-fba9-4f24-9b5d-9cb89fdd50c7",
                "name": "server_url",
                "value": "={{ $json.body.server_url }}",
                "type": "string"
              },
              {
                "id": "045d49e1-20d4-496c-bfd8-805675c6ce8f",
                "name": "instance_name",
                "value": "={{ $json.body.instance }}",
                "type": "string"
              },
              {
                "id": "f0b22312-bae8-42f4-9d7e-1cc659d71b14",
                "name": "chat",
                "value": "={{ $json.body.data.message.conversation }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          60,
          -560
        ],
        "id": "3a56f9cc-b8bb-428a-9461-0beda2712ba0",
        "name": "Edit Fields Evil"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "655756cc-0192-49a2-8772-8606e0bb3993",
                "leftValue": "={{ $json.statusCode }}",
                "rightValue": 200,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "or"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          880,
          -480
        ],
        "id": "01a4f7bd-9ea3-414c-a395-4e6defceb062",
        "name": "If1"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          940,
          -760
        ],
        "id": "712d5dd6-739e-43f7-8d4b-28624d8bc53e",
        "name": "Wait3",
        "webhookId": "5de89b02-0ba6-491b-982e-47d678048391"
      },
      {
        "parameters": {
          "content": "Whatsapp Assistant ",
          "height": 580,
          "width": 1860,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          -40,
          -780
        ],
        "id": "dab51ed5-af9a-4648-84a4-42f3baa0d252",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "content": "Jenny\n",
          "height": 580,
          "width": 1180,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          -60,
          420
        ],
        "id": "6e23cba5-53fb-4373-8f34-be6539e1adb3",
        "name": "Sticky Note2"
      }
    ],
    "connections": {
      "Webhook": {
        "main": [
          [
            {
              "node": "Switch",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          []
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          []
        ]
      },
      "Edit Fields": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Calculator": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Postgres Chat Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "Switch": {
        "main": [
          [],
          [
            {
              "node": "Edit Fields1",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Edit Fields Evil",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Edit Fields Evil",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent1": {
        "main": [
          [
            {
              "node": "Wait1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Fields1": {
        "main": [
          [
            {
              "node": "AI Agent1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Calculator1": {
        "ai_tool": [
          [
            {
              "node": "AI Agent1",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model1": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent1",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Wait1": {
        "main": [
          [
            {
              "node": "HTTP Request1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Postgres Chat Memory1": {
        "ai_memory": [
          [
            {
              "node": "AI Agent1",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "Edit Prompt and Model": {
        "main": [
          [
            {
              "node": "Send to Pollinations",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Send to Pollinations": {
        "main": [
          [
            {
              "node": "If1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Code": {
        "main": [
          [
            {
              "node": "Edit Prompt and Model",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait2": {
        "main": [
          [
            {
              "node": "HTTP Request2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Extract Response1": {
        "main": [
          [
            {
              "node": "Wait2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Fields Evil": {
        "main": [
          [
            {
              "node": "Code",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If1": {
        "main": [
          [
            {
              "node": "Extract Response1",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Wait3",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait3": {
        "main": [
          [
            {
              "node": "Edit Prompt and Model",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "b0683d34-eafb-4069-b6c1-53754ed1ea60",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-05-12T16:30:24.147Z",
    "updatedAt": "2025-05-12T16:30:24.147Z",
    "id": "DaDUwsiVvTqoxqvT",
    "name": "My workflow 16",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "fieldToSplitOut": "predictions",
          "options": {}
        },
        "id": "3271e44b-f123-423c-9fdf-f0fd9a25acba",
        "name": "Split Out",
        "type": "n8n-nodes-base.splitOut",
        "position": [
          2480,
          560
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://generativelanguage.googleapis.com/v1beta/models/imagen-3.0-generate-002:predict",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "googlePalmApi",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={{\n{\n  \"instances\": [\n    {\n      \"prompt\": [\n        $json.candidates[0].content.parts[0].text,\n       `Generate the following image: ${$('Variables').first().json.targetPrompt}`\n      ].join(' ')\n    }\n  ],\n  \"parameters\": {\n    \"sampleCount\": $('Variables').first().json.numberSamples.toNumber()\n  }\n}\n}}",
          "options": {}
        },
        "id": "7660fc8a-d836-4839-9538-1b75ac88b0ad",
        "name": "Imagen 3.0",
        "type": "n8n-nodes-base.httpRequest",
        "position": [
          2260,
          560
        ],
        "typeVersion": 4.2
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "7616f991-76d0-4dd0-9385-f08ed14e8dfa",
                "name": "sourceStyleUrl",
                "type": "string",
                "value": "={{ $json.SourceImage }}"
              },
              {
                "id": "126cb06e-4d69-4163-ba76-c694103bf5bb",
                "name": "targetPrompt",
                "type": "string",
                "value": "={{ $json.TargetPrompt }}"
              },
              {
                "id": "055d247b-586d-4bb8-a319-262c241df48c",
                "name": "numberSamples",
                "type": "string",
                "value": "={{\n(function(numSamples) {\n  if (!numSamples) return 1;\n  if (numSamples < 0) return 1;\n  if (numSamples > 4) return 4;\n  return numSamples;\n}($json['Number of Images']))\n}}"
              },
              {
                "id": "77a27e0e-24f4-4358-8cdc-84552be6c0b5",
                "name": "email",
                "type": "string",
                "value": "={{ $json['Your Email (Optional)'] }}"
              }
            ]
          },
          "options": {}
        },
        "id": "2cafad26-005d-4b23-8c97-7fcbdffb519a",
        "name": "Variables",
        "type": "n8n-nodes-base.set",
        "position": [
          1180,
          560
        ],
        "typeVersion": 3.4
      },
      {
        "parameters": {
          "url": "={{ $json.sourceStyleUrl }}",
          "options": {}
        },
        "id": "cf667cf2-03c9-4d96-9edf-89b2ac8c29cd",
        "name": "Download Image",
        "type": "n8n-nodes-base.httpRequest",
        "position": [
          1500,
          560
        ],
        "typeVersion": 4.2
      },
      {
        "parameters": {
          "formTitle": "Style Copy with Imagen 3.0",
          "formDescription": "Use this form to generate an image using another image as a style reference.",
          "formFields": {
            "values": [
              {
                "fieldLabel": "SourceImage",
                "placeholder": "The image URL to copy the style from",
                "requiredField": true
              },
              {
                "fieldLabel": "TargetPrompt",
                "placeholder": "The new image to generate",
                "requiredField": true
              },
              {
                "fieldLabel": "Number of Images",
                "fieldType": "number",
                "placeholder": "Default 1. Max. 4 images"
              },
              {
                "fieldLabel": "Your Email (Optional)",
                "fieldType": "email",
                "placeholder": "The results will be sent to this email"
              }
            ]
          },
          "responseMode": "lastNode",
          "options": {
            "appendAttribution": true,
            "buttonLabel": "Generate!",
            "path": "style-copy-with-imagen3",
            "ignoreBots": true
          }
        },
        "id": "3f9685a1-108b-44a9-8f1d-ae79f5a5296f",
        "name": "On form submission",
        "type": "n8n-nodes-base.formTrigger",
        "position": [
          720,
          560
        ],
        "webhookId": "51f74db1-ffb4-491f-83b0-a44a7124be12",
        "typeVersion": 2.2
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "version": 2,
              "leftValue": "",
              "caseSensitive": true,
              "typeValidation": "strict"
            },
            "combinator": "and",
            "conditions": [
              {
                "id": "1b440b81-06c9-4133-bfd2-8ec07c7c3734",
                "operator": {
                  "type": "boolean",
                  "operation": "true",
                  "singleValue": true
                },
                "leftValue": "={{ $json.SourceImage.isUrl() }}",
                "rightValue": ""
              }
            ]
          },
          "options": {}
        },
        "id": "361cd259-de11-4ea9-a437-9a98e92de535",
        "name": "Form Validation",
        "type": "n8n-nodes-base.if",
        "position": [
          940,
          560
        ],
        "typeVersion": 2.2
      },
      {
        "parameters": {
          "formFields": {
            "values": [
              {
                "fieldLabel": "SourceImage",
                "placeholder": "The image URL to copy the style from",
                "requiredField": true
              },
              {
                "fieldLabel": "TargetPrompt",
                "placeholder": "The new image to generate",
                "requiredField": true
              },
              {
                "fieldLabel": "Number of Images",
                "fieldType": "number",
                "placeholder": "Max. 4 images"
              },
              {
                "fieldLabel": "Your Email (Optional)",
                "placeholder": "The results will be sent to this email"
              }
            ]
          },
          "limitWaitTime": true,
          "options": {
            "formTitle": "Retry Submission",
            "formDescription": "Please enter a URL for the source image.",
            "buttonLabel": "Generate!"
          }
        },
        "id": "3a642187-3c77-4591-86a5-fcd57cc98bad",
        "name": "Retry Form",
        "type": "n8n-nodes-base.form",
        "position": [
          1180,
          740
        ],
        "webhookId": "0b4c88ed-d28b-4df4-abe6-4579e17c672d",
        "typeVersion": 1
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.cloudinary.com/v1_1/daglih2g8/image/upload",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpQueryAuth",
          "sendQuery": true,
          "queryParameters": {
            "parameters": [
              {
                "name": "upload_preset",
                "value": "n8n-workflows-preset"
              }
            ]
          },
          "sendBody": true,
          "contentType": "multipart-form-data",
          "bodyParameters": {
            "parameters": [
              {
                "parameterType": "formBinaryData",
                "name": "file",
                "inputDataFieldName": "data"
              }
            ]
          },
          "options": {}
        },
        "id": "62463776-9be6-4bec-b596-42276dfb1919",
        "name": "Upload to Cloudinary",
        "type": "n8n-nodes-base.httpRequest",
        "position": [
          3000,
          560
        ],
        "typeVersion": 4.2,
        "credentials": {
          "httpQueryAuth": {
            "id": "AerwiWCCxJknR0YU",
            "name": "Query Auth account Cloudnare API"
          }
        }
      },
      {
        "parameters": {
          "content": "## 1. Ask for Source Style and Target Image\n[Learn more about the Form Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.formtrigger/)\n\nWe'll use a form interface for this template which allows the users to specify an image whose style we'll use as reference and a prompt to generate the target image. Form validation loop can be achieved by combining another form node with the IF node.",
          "height": 640,
          "width": 760,
          "color": 7
        },
        "id": "1ee11936-6966-4520-8361-2c5bb37bb98d",
        "name": "Sticky Note",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          640,
          340
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "## 2. Visual Style Description using Gemini 2.0\n[Read more about Gemini Image Understanding](https://ai.google.dev/gemini-api/docs/image-understanding)\n\nThe trick to copying the style of an image is to get a multimodal LLM to describe it in detail. Using Gemini's image understanding capabilities, it can do a pretty good job to provide the comprehensive description we need.",
          "height": 440,
          "width": 720,
          "color": 7
        },
        "id": "c1ad4f13-96db-4673-96b4-cbcb43955bc9",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1420,
          340
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "## 3. Image Generation using Imagen 3.0\n[Read more about Imagen Image Generation](https://ai.google.dev/gemini-api/docs/image-generation#imagen)\n\nTo generate the image, we'll be using Google's Imagen 3.0 model. We'll combine the visual style description generated in the previous Gemini model with the user's target image prompt and pass this to Imagen to do its magic! The result is something very close to style transfer which produces quite convincing and impressive results.",
          "height": 440,
          "width": 720,
          "color": 7
        },
        "id": "aa5547d3-7ac3-4038-9fd7-1d484108bc75",
        "name": "Sticky Note2",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          2160,
          340
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "## 4. Render Results to HTML Page\n[Learn more about the HTML node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.html)\n\nFinally for presentation, we'll render the generated images as a webpage for easier viewing using the HTML node. This page can then be sent to the user's email if provided and downloaded as a file once we land on the form ending node.",
          "height": 600,
          "width": 980,
          "color": 7
        },
        "id": "4baab789-b962-44f7-8575-5a6648173b71",
        "name": "Sticky Note3",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          2900,
          340
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "operation": "toText",
          "sourceProperty": "html",
          "options": {
            "encoding": "utf8",
            "fileName": "={{ $('Variables').item.json.targetPrompt.toSnakeCase().urlEncode() }}.html"
          }
        },
        "id": "fe41dcd1-0f29-447a-ad60-03db632ad5f2",
        "name": "Convert to File1",
        "type": "n8n-nodes-base.convertToFile",
        "position": [
          3440,
          740
        ],
        "typeVersion": 1.1
      },
      {
        "parameters": {
          "html": "<h1>\n  {{ $('Variables').item.json.targetPrompt.toSentenceCase() }}\n</h1>\n<div class=\"gallery\">\n{{\n$input.all()\n  .chunk(2)\n  .map(row =>\n    `<div class=\"gallery-row\">\n      ${row.map(item =>\n        `<a href=\"${item.json.url}\" target=\"_blank\">\n          <img src=\"${item.json.url}\" width=\"320px\" height=\"240px\"  />\n        </a>`).join('')}\n    </div>`\n  ).join('')\n}}\n</div>\n<div class=\"fineprint\">\n  Generated by Imagen 3.0 (imagen-3.0-generate-002) @ {{ $now.format('d MMM yyyy') }}.\n</div>\n<div class=\"fineprint\">\n  <h3>Style Prompt</h3>\n  <div style=\"display:flex;gap: 10px;\">\n    <div>\n      <img\n        src=\"{{ $('Download Image').item.json.sourceStyleUrl }}\"\n        width=\"100px\"\n        height=\"auto\"\n      />\n    </div>\n    <div>\n      {{ $('Gemini 2.0').first().json.candidates[0].content.parts[0].text }}\n    </div>\n  </div>\n</div>\n<style>\n  body { padding: 32px 64px; font-family: sans-serif; background-color: #fffaf2; }\n  h1 { max-width: 640px; }\n  .gallery { display: inline-block; padding: 5px; border: 1px solid #ccc; background-color: white; margin-bottom: 32px;}\n  .gallery-row { display: flex; }\n  .gallery-row img { padding: 5px; background-color: white }\n  .gallery-row img:hover { background-color: orange; } \n  .fineprint { font-size: 0.7rem; max-width: 480px; text-align: justify;}\n  .fineprint h3 { font-size: 0.8rem; }\n</style>"
        },
        "id": "3cd75a9f-11a4-48c1-9f0a-1b8e272a04a6",
        "name": "Generate HTML",
        "type": "n8n-nodes-base.html",
        "position": [
          3200,
          560
        ],
        "executeOnce": true,
        "typeVersion": 1.2
      },
      {
        "parameters": {
          "operation": "toBinary",
          "sourceProperty": "bytesBase64Encoded",
          "options": {
            "fileName": "={{ $execution.id }}_{{ $itemIndex }}.{{ $json.mimeType.split('/')[1] }}",
            "mimeType": "={{ $json.mimeType }}"
          }
        },
        "id": "abebdb38-6ead-4303-b368-3eff466fe936",
        "name": "Convert to File",
        "type": "n8n-nodes-base.convertToFile",
        "position": [
          2700,
          560
        ],
        "typeVersion": 1.1
      },
      {
        "parameters": {
          "operation": "completion",
          "respondWith": "returnBinary",
          "completionTitle": "Image Generation Successful",
          "completionMessage": "Download has started.\nOpen the HTML file to view results.",
          "options": {
            "formTitle": "Generation Complete"
          }
        },
        "id": "6f7b752b-30a4-462e-94e6-4d329fd82e9b",
        "name": "Form Ending",
        "type": "n8n-nodes-base.form",
        "position": [
          3660,
          740
        ],
        "webhookId": "c4bacbac-0347-4c35-9333-3704630b45ef",
        "executeOnce": true,
        "typeVersion": 1
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "version": 2,
              "leftValue": "",
              "caseSensitive": true,
              "typeValidation": "strict"
            },
            "combinator": "and",
            "conditions": [
              {
                "id": "07d04523-f81a-4efa-b46a-cb640bcc608a",
                "operator": {
                  "type": "string",
                  "operation": "notEmpty",
                  "singleValue": true
                },
                "leftValue": "={{ $('Variables').item.json.email }}",
                "rightValue": ""
              }
            ]
          },
          "options": {}
        },
        "id": "ed9b6dc9-ddd0-4e2d-ab0c-579cc23e6ceb",
        "name": "Has Email?",
        "type": "n8n-nodes-base.if",
        "position": [
          3440,
          560
        ],
        "typeVersion": 2.2
      },
      {
        "parameters": {
          "sendTo": "={{ $('Variables').first().json.email }}",
          "subject": "=#{{$execution.id}} - Image Generated Successfully!",
          "message": "={{ $json.html }}",
          "options": {}
        },
        "id": "100f3090-a9d4-4f71-bab3-e19f6627eca5",
        "name": "Send Results to Email",
        "type": "n8n-nodes-base.gmail",
        "position": [
          3660,
          560
        ],
        "webhookId": "de5684ed-6aa4-4c29-aac3-62e21c54c6f0",
        "typeVersion": 2.1
      },
      {
        "parameters": {
          "operation": "binaryToPropery",
          "options": {}
        },
        "id": "d1df2abf-d33c-4bd8-be23-d1ebed90385a",
        "name": "Image to Base64",
        "type": "n8n-nodes-base.extractFromFile",
        "position": [
          1720,
          560
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "googlePalmApi",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"contents\": [{\n      \"parts\": [\n        {\n          \"inline_data\": {\n            \"mime_type\":\"{{ $('Download Image').item.binary.data.mimeType }}\",\n            \"data\": \"{{ $json.data }}\"\n          }\n        },\n        {\"text\": \"Describe the visual style of this image. Do not include any character names or IP in the description. Include names of any famous artists associated with this style if known.\"}\n      ]\n    }]\n  }",
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "neverError": true
              }
            }
          }
        },
        "id": "1d16a011-8005-4f8d-aa65-e0a8910ae4a7",
        "name": "Gemini 2.0",
        "type": "n8n-nodes-base.httpRequest",
        "position": [
          1940,
          560
        ],
        "typeVersion": 4.2
      },
      {
        "parameters": {
          "content": "## Try It Out!\n### This n8n template allows you to use AI to generate logos or images which mimic visual styles of other logos or images. The model used to generate the images is Google's Imagen 3.0.\n\nWith this template, users will be able to automate design and marketing tasks such as creating variants of existing designs, remixing existing assets to validate different styles and explore a range of designs which would have been otherwise too expensive and time-consming previously.\n\n### How it works\n* A form trigger is used to capture the source image to reference styles from and a prompt for the target image to generate.\n* The source image is passed to Gemini 2.0 to be analysed and its visual style and tone extracted as a detailed description.\n* This visual style description is then combined with the user's initial target image prompt. This final prompt is given to Imagen 3.0 to generate the images.\n* A quick webpage is put together with the generated images to present back to the user.\n* If the user provided an email address, a copy of this HTML page will be sent.\n\n### How to use\n* Ensure the workflow is live to share the form publicly.\n* The source image must be accessible to your n8n instance - either a public image of the internet or within your network.\n\n### Requirements\n* Gemini for LLM and Imagen model.\n* Cloudinary for image CDN.\n* Gmail for email sending.\n\n### Customising this workflow\n* Feel free to swap any of these out for tools and services you prefer.\n* Want to fully automate? Switch the form trigger for a webhook trigger!\n\n\n### Need Help?\nJoin the [Discord](https://discord.com/invite/XPKeKXeB7d) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Hacking!",
          "height": 1140,
          "width": 400
        },
        "id": "0fc011be-66b9-4607-bb31-cb58f5bf38c8",
        "name": "Sticky Note4",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          200,
          -160
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "65560139-6809-4797-a9e3-67a415cce73a",
                "leftValue": "={{ $json.statusCode }}",
                "rightValue": 200,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          2080,
          340
        ],
        "id": "c20fe176-60f3-4aac-803e-1c8015d9cded",
        "name": "If"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          2300,
          180
        ],
        "id": "3214807b-4eb2-41eb-857c-70aaf1a7a3b3",
        "name": "Wait",
        "webhookId": "c54c3122-c918-42cd-ab7d-4a7b6420ef4c"
      }
    ],
    "connections": {
      "Split Out": {
        "main": [
          [
            {
              "node": "Convert to File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Variables": {
        "main": [
          [
            {
              "node": "Download Image",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Gemini 2.0": {
        "main": [
          [
            {
              "node": "Imagen 3.0",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Has Email?": {
        "main": [
          [
            {
              "node": "Send Results to Email",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Imagen 3.0": {
        "main": [
          [
            {
              "node": "Split Out",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Retry Form": {
        "main": [
          [
            {
              "node": "Form Validation",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate HTML": {
        "main": [
          [
            {
              "node": "Convert to File1",
              "type": "main",
              "index": 0
            },
            {
              "node": "Has Email?",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Download Image": {
        "main": [
          [
            {
              "node": "Image to Base64",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Convert to File": {
        "main": [
          [
            {
              "node": "Upload to Cloudinary",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Form Validation": {
        "main": [
          [
            {
              "node": "Variables",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Retry Form",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Image to Base64": {
        "main": [
          [
            {
              "node": "Gemini 2.0",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Convert to File1": {
        "main": [
          [
            {
              "node": "Form Ending",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "On form submission": {
        "main": [
          [
            {
              "node": "Form Validation",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload to Cloudinary": {
        "main": [
          [
            {
              "node": "Generate HTML",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [],
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "Form Validation",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "2dc9ce26-fc75-4525-947e-33826ac9461d",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-02T10:30:12.671Z",
    "updatedAt": "2025-07-16T18:38:50.160Z",
    "id": "L2ZaKWNoyUlUy6PL",
    "name": "text api",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "id": "9db522e9-6c24-48d7-859b-ca809cfe92ab",
        "name": "Start",
        "type": "n8n-nodes-base.start",
        "typeVersion": 1,
        "position": [
          -208,
          160
        ]
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "in 4000 words write about the history of php only return result if it is more than 4000 words "
              },
              {
                "name": "model",
                "value": "={{ $json.name }}"
              }
            ]
          },
          "options": {}
        },
        "id": "daf35a3b-a88a-493a-8293-82c434a6b861",
        "name": "Edit Prompt and Model",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          208,
          192
        ]
      },
      {
        "parameters": {
          "url": "=https://text.pollinations.ai/{{$node[\"Edit Prompt and Model\"].json[\"prompt\"]}}?model={{$node[\"Edit Prompt and Model\"].json[\"model\"]}}&json=true",
          "options": {
            "response": {
              "response": {}
            },
            "timeout": 120000
          }
        },
        "id": "8cafc772-653b-4ba1-b239-c2a4875c69c2",
        "name": "Send to Pollinations",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          384,
          208
        ]
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "response",
                "value": "={{$json[\"text\"] || $json}}"
              }
            ]
          },
          "options": {}
        },
        "id": "828f8b4e-00dc-4cd0-885f-debec5e2e589",
        "name": "Extract Response",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          0,
          0
        ]
      },
      {
        "parameters": {
          "jsCode": "// List all Pollinations.AI text models (April 2025)\nconst models = [\n  { name: 'openai', label: 'OpenAI GPT-4.1-mini' },\n  { name: 'openai-large', label: 'OpenAI GPT-4.1' },\n  { name: 'openai-reasoning', label: 'OpenAI o4-mini (reasoning)' },\n  { name: 'qwen-coder', label: 'Qwen 2.5 Coder 32B' },\n  { name: 'llama', label: 'Llama 3.3 70B' },\n  { name: 'llamascout', label: 'Llama 4 Scout 17B' },\n  { name: 'mistral', label: 'Mistral Small 3' },\n  { name: 'unity', label: 'Unity Mistral Large (uncensored)' },\n  { name: 'midijourney', label: 'Midijourney' },\n  { name: 'rtist', label: 'Rtist' },\n  { name: 'searchgpt', label: 'SearchGPT' },\n  { name: 'evil', label: 'Evil (uncensored)' },\n  { name: 'deepseek-reasoning', label: 'DeepSeek-R1 Distill Qwen 32B (reasoning)' },\n  { name: 'deepseek-reasoning-large', label: 'DeepSeek R1 - Llama 70B (reasoning)' },\n  { name: 'phi', label: 'Phi-4 Instruct' },\n  { name: 'llama-vision', label: 'Llama 3.2 11B Vision' },\n  { name: 'gemini', label: 'Gemini 1.5 (1M context)' },\n  { name: 'hormoz', label: 'Hormoz 8b' },\n  { name: 'hypnosis-tracy', label: 'Hypnosis Tracy 7B' },\n  { name: 'deepseek', label: 'DeepSeek-V3' },\n  { name: 'sur', label: 'Sur AI Assistant (Mistral)' },\n  { name: 'openai-audio', label: 'OpenAI GPT-4o-audio-preview' }\n];\n\n// Set your default model here\nconst defaultModel = 'llamascout';\n\n// Find the model object that matches the default\nconst selectedModel = models.find(m => m.name === defaultModel);\n\nreturn [{ json: selectedModel }];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          32,
          192
        ],
        "id": "9f0d07b8-386f-4e76-bcae-c6e032c79f88",
        "name": "Code"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "a1aaabd3-90b6-42fe-8ca9-e1063783a072",
                "leftValue": "",
                "rightValue": "",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          704,
          32
        ],
        "id": "9b51d679-034f-45e7-a842-7d8dafea8dfa",
        "name": "If"
      },
      {
        "parameters": {
          "jsCode": "// n8n passes input items as an array to the Code node\nreturn items.map(item => ({\n  json: {\n    title: item.json, // Change 'title' to your DB column name if needed\n  }\n}));\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          240,
          0
        ],
        "id": "033725e6-ec7c-4fac-9123-ca248ee0fd9b",
        "name": "Code1"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "response",
                "value": "={{$json[\"text\"] || $json}}\n"
              }
            ]
          },
          "options": {}
        },
        "id": "5f357034-78f9-474a-bf2f-63a4f2464df5",
        "name": "Extract Response1",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          592,
          208
        ]
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "d41ed776-bd17-4702-95d5-3074dec310c3",
                "leftValue": "={{ $json.title }}",
                "rightValue": "={{ $json.title2 }}",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          608,
          368
        ],
        "id": "873020ac-8f6f-4bd0-a47e-2d46b8c0f894",
        "name": "If1"
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "create",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "mj00h1eru2xiami",
          "fieldsUi": {
            "fieldValues": [
              {
                "fieldName": "topic",
                "fieldValue": "={{ $json.title }}"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          464,
          0
        ],
        "id": "9a4aaaac-9c22-4ee6-bd75-8abb28fdd04f",
        "name": "Create a row",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "getAll",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "mj00h1eru2xiami",
          "returnAll": true,
          "options": {}
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          48,
          384
        ],
        "id": "54668221-6216-45ef-b50a-aef98dfb4ac6",
        "name": "Get many rows",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        },
        "disabled": true
      }
    ],
    "connections": {
      "Start": {
        "main": [
          [
            {
              "node": "Code",
              "type": "main",
              "index": 0
            },
            {
              "node": "Extract Response",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Prompt and Model": {
        "main": [
          [
            {
              "node": "Send to Pollinations",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Send to Pollinations": {
        "main": [
          [
            {
              "node": "Extract Response1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Code": {
        "main": [
          [
            {
              "node": "Edit Prompt and Model",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Extract Response": {
        "main": [
          [
            {
              "node": "Code1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Code1": {
        "main": [
          [
            {
              "node": "Create a row",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "3b74f7dd-6a49-4a71-af67-951e3a465b32",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-09T08:47:33.534Z",
    "updatedAt": "2025-05-09T08:48:33.997Z",
    "id": "B3W7zC3k0Vm5n8kG",
    "name": "My workflow 13",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "fieldToSplitOut": "output",
          "options": {}
        },
        "type": "n8n-nodes-base.splitOut",
        "typeVersion": 1,
        "position": [
          360,
          420
        ],
        "id": "33d5be92-803a-4bf6-88b2-f828e8e1d9fd",
        "name": "Split Out"
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {}
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          40,
          60
        ],
        "id": "7b117c62-075a-4cb5-8309-4980c7811555",
        "name": "Schedule Trigger"
      },
      {
        "parameters": {
          "databaseId": 169,
          "tableId": 684,
          "returnAll": true,
          "additionalOptions": {
            "filters": {
              "fields": [
                {
                  "field": 6662,
                  "operator": "contains",
                  "value": "pending"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.baserow",
        "typeVersion": 1,
        "position": [
          220,
          60
        ],
        "id": "eb7f2f07-0ea9-4558-94e7-c0ca3ffca1aa",
        "name": "Baserow"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.limit",
        "typeVersion": 1,
        "position": [
          400,
          60
        ],
        "id": "c8da6a0b-c8d7-4647-85eb-579c52678aaa",
        "name": "Limit"
      },
      {
        "parameters": {
          "schemaType": "manual",
          "inputSchema": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"Prompt\": {\n        \"type\": \"string\",\n        \"description\": \"A detailed prompt describing a scene in dreamy, child-style cartoon art.\"\n      }\n    },\n    \"required\": [\"Prompt\"]\n  }\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          200,
          560
        ],
        "id": "ab841c0c-81dc-4051-bffc-68ef94a03030",
        "name": "Structured Output Parser"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=",
          "messages": {
            "messageValues": [
              {
                "message": "=You are a gentle bedtime storyteller. Your task is to write a calming, imaginative story for children, designed to ease them into peaceful sleep.\n\nThe story is based on the following structure provided by the user:\n- **Topic**: {{ $('Limit').item.json.topic }}\n- **Audience**: {{ $('Limit').item.json.audience }}\n- **Length**: {{ $json.length }} minutes\n\nThe story should:\n- Feature the character: **{{ $('Limit').item.json.character }}**\n- Be paced for bedtime, with soft language and a peaceful, whimsical tone\n- Be structured into {{ $('Limit').item.json['Images to generate'] }} flowing, dreamlike segments (approximately one every 30 seconds)\n- Avoid labels like \"Scene 1\" or visual stage directions—just tell the story\n- Gently transition between moments to create a seamless, soothing journey\n- Be suitable for text-to-speech output (TTS), so avoid abrupt endings, complex wordplay, or anything overly energetic\n\nEnd the story with a gentle wind-down that encourages sleep and gives a sense of comfort, warmth, and wonder.\n\nOnly return the clean, final story text—no explanations or formatting instructions. The script is for TTS never \\n\\n it must be plain text.\n\n\n\n\n"
              }
            ]
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.5,
        "position": [
          760,
          60
        ],
        "id": "0b64cafb-d1d1-4699-83d5-6533ca9a5133",
        "name": "Scripter"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Full Script: {{ $('Parser').item.json.output.Story }}",
          "hasOutputParser": true,
          "messages": {
            "messageValues": [
              {
                "message": "=You are an AI assistant that generates **high-quality image generation prompts** for **bedtime story video production**.  \n\nYour goal is to convert a **complete story script** into a set of **visual scene prompts**, with each one representing a unique, cinematic moment from the story. These prompts will be used to create **painting-style visual assets** for animation or motion graphics.\n\n---\n\n### 📌 Requirements:\n\n- Create exactly **{{ $('Limit').item.json['Images to generate'] }}** prompts — one per unique visual moment.\n- **Each prompt must represent a distinct part of the story** — divide the story naturally into key scenes or beats.\n- Use the provided **art style** consistently across all prompts.\n- **Do not include character names, dialogue, or text** in the prompt.\n- **Keep each prompt under 240 characters.**\n- Add at the end of each prompt: Art style in a painting<lora:Milde_style_art:1>\n\n---\n\n### 🎬 Visual Prompt Guidelines:\n\nEach prompt should be:\n\n- **Scene-Based:** Capture a full visual moment from the story, not just a mood or object.\n- **Descriptive, not Narrative:** Focus on what’s visually present, not names or storytelling.\n- **Cinematic:** Include visual techniques (e.g., soft lighting, depth of field, wide shot, close-up).\n- **Emotionally Evocative:** Convey feelings like wonder, calm, or curiosity.\n- **Technically Rich:** Mention visual textures, light effects, depth, camera angle, and other compositional details.\n- **Consistently Styled:** Reflect the given artistic direction (e.g., watercolor, pastel, digital painting, Pixar-style).\n\n---\n\n### ❌ Avoid:\n\n- Using **character names** (e.g., \"Tilly the Turtle\")\n- Including **spoken lines** or any **written text**\n- Overly poetic or vague language\n- Repeating visual setups between prompts\n"
              }
            ]
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.5,
        "position": [
          20,
          420
        ],
        "id": "7eed73f9-8a95-45a9-9352-a35893ec790f",
        "name": "Image Prompt Generator"
      },
      {
        "parameters": {
          "mode": "jsonToBinary",
          "convertAllData": false,
          "sourceKey": "base64Image",
          "options": {
            "dataIsBase64": true,
            "mimeType": "image/png"
          }
        },
        "id": "40228be7-4c8c-469b-a7ff-458a7587bf37",
        "name": "Convert to/from binary data2",
        "type": "n8n-nodes-base.moveBinaryData",
        "typeVersion": 1,
        "position": [
          1560,
          420
        ]
      },
      {
        "parameters": {
          "fields": {
            "values": [
              {
                "name": "base64Image",
                "stringValue": "={{ $json.images }}"
              }
            ]
          },
          "options": {}
        },
        "id": "2b3b8ae9-171b-42b5-8523-77f2f9686d6d",
        "name": "Base46 To String",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.1,
        "position": [
          1380,
          420
        ]
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "n8n-nodes-base.splitInBatches",
        "typeVersion": 3,
        "position": [
          1000,
          420
        ],
        "id": "22feb071-62fa-4a85-a470-84ab484f5415",
        "name": "Loop Over Items1"
      },
      {
        "parameters": {
          "content": "## Create Image Prompts\n",
          "height": 360,
          "width": 920,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          320
        ],
        "id": "8183a5d0-8aa8-4186-abb1-dc070134b6f4",
        "name": "Sticky Note9"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "40dc6e90-ddd9-447e-8db0-6a7bb1906f9d",
                "name": "prompt",
                "value": "={{ $json.Prompt }}",
                "type": "string"
              },
              {
                "id": "cbceb8b0-b983-41cd-b318-38f190a8f6fe",
                "name": "FileName",
                "value": "=http://host.docker.internal:9000/bed-time-stories/{{ $('Generate UUID').item.json.UUID }}.png",
                "type": "string"
              },
              {
                "id": "f411eb6e-d07f-4bd1-b186-f1e91897213d",
                "name": "Clip Duration",
                "value": "={{ $('Get Audio Duration').item.json.response[0].duration / $('Limit').item.json['Images to generate']}}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          720,
          420
        ],
        "id": "30d521cc-a701-4546-8ae1-c586e8225bc6",
        "name": "Set Prompt & url"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8880/v1/audio/speech",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"model\": \"kokoro\",\n  \"input\": {{ JSON.stringify($json.output.Story) }},\n  \"voice\": \"{{ $('Limit').item.json.voice.value }}\",\n  \"response_format\": \"mp3\",\n  \"speed\": {{ $('Set length & Speed').item.json.speed }}\n}",
          "options": {
            "response": {
              "response": {
                "fullResponse": true
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1580,
          120
        ],
        "id": "2ddda8a3-6580-4927-b69b-6de7c6876474",
        "name": "Generate TTS2",
        "notesInFlow": true
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "bed-time-stories",
          "fileName": "={{ $('Limit').item.json.UUID }}.{{ $binary.data.fileExtension }}",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          1740,
          120
        ],
        "id": "d253fe75-f279-4838-a818-3869dffc7027",
        "name": "Upload Audio S3"
      },
      {
        "parameters": {
          "schemaType": "manual",
          "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"Story\": {\n      \"type\": \"string\"\n    }\n  },\n  \"required\": [\"Story\"]\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          1280,
          160
        ],
        "id": "73a94c7f-0bb9-4681-a2cc-98b23a8ac0f8",
        "name": "Structured Output Parser1"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "b72be074-4a67-4f45-be3e-e47d464131c3",
                "name": "length",
                "value": "={{ $json.length }}",
                "type": "number"
              },
              {
                "id": "3c6b0102-35c6-4a47-9923-46e044faa10e",
                "name": "speed",
                "value": "={{ $json.speed }}",
                "type": "number"
              },
              {
                "id": "09eebe6d-21a4-4737-b825-1e44df45493b",
                "name": "Number of images to generate",
                "value": "={{ $json['Images to generate'] }}",
                "type": "number"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          580,
          60
        ],
        "id": "f7c4ba8b-be40-4aff-af86-1f7970b3b639",
        "name": "Set length & Speed"
      },
      {
        "parameters": {
          "fieldsToAggregate": {
            "fieldToAggregate": [
              {
                "fieldToAggregate": "response"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          1200,
          800
        ],
        "id": "76c24e1d-ec59-49f1-a4ee-05e914ae3366",
        "name": "Aggregate2"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/image/transform/video",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"id\": \"image-zoom-out\",\n  \"image_url\": \"{{ $json.FileName }}\",\n  \"length\": {{ $json['Clip Duration'] }},\n  \"frame_rate\": 25,\n  \"zoom_speed\": 1.5\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1000,
          800
        ],
        "id": "2da68993-71c7-4231-ae52-73e5043baf5e",
        "name": "Create Video Clips",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "jsCode": "// Extract the array of URLs\nconst urls =  $input.first().json.response || [];\n\n// Map URLs into the required structure\nconst formattedURLs = urls.map(url => ({ \"video_url\": url }));\n\n// Return the transformed data\nreturn [{\n    json: {\n        \"video_urls\": formattedURLs\n    }\n}];"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1380,
          800
        ],
        "id": "6204030d-66b9-4294-97b7-9294fb13f8c4",
        "name": "Video url to array"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/video/concatenate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"video_urls\": {{ JSON.stringify($json.video_urls) }},\n    \"id\": \"Job\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1580,
          800
        ],
        "id": "deda791b-8e27-4b6e-9027-5860bf42c940",
        "name": "Create Video"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"id\": \"audio-layering\",\n    \"inputs\": [\n        {\n            \"file_url\": \"{{ $json.response }}\"\n        },\n        {\n            \"file_url\": \"{{ $('Get Audio Duration').item.json.response[0].file_url }}\"\n        }\n    ],\n    \"filters\": [\n        {\n            \"filter\": \"[1:a]volume=1[outa]\"\n        }\n    ],\n    \"outputs\": [\n        {\n            \"options\": [\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"0:v\"\n                },\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"[outa]\"\n                },\n                {\n                    \"option\": \"-c:v\",\n                    \"argument\": \"copy\"\n                },\n                {\n                    \"option\": \"-c:a\",\n                    \"argument\": \"aac\"\n                }\n            ]\n        }\n    ]\n}\n",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1000,
          1080
        ],
        "id": "c19ce218-7fde-49fd-b19a-a93d581bde98",
        "name": "Add TTS To Video",
        "notesInFlow": true
      },
      {
        "parameters": {
          "content": "## Create Script\n",
          "height": 280,
          "width": 1500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "1c4e8c5f-829c-4309-8eed-e94ed6dba0d1",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "content": "## Create TTS\n",
          "height": 280,
          "width": 560
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1520,
          0
        ],
        "id": "ab7c3279-f9ec-4ef5-9104-ac38e4bf2436",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "content": "## Generate Images using local Juggernaut XI",
          "height": 360,
          "width": 960,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          940,
          320
        ],
        "id": "32d82e92-e78f-4cc4-9915-0068d6e279b9",
        "name": "Sticky Note10"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:7860/sdapi/v1/txt2img",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"prompt\": \"{{ $json.prompt }}\",\n  \"negative_prompt\": \"Naked, Nude, fake eyes, deformed eyes, bad eyes, cgi, 3D, digital, airbrushed\",\n  \"steps\": 25,\n  \"send_images\": true,\n  \"cfg_scale\": 3,\n  \"width\": 1024,\n  \"height\": 576,\n  \"sampler_name\": \"DPM++ 2M\",\n  \"scheduler\": \"Karras\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1200,
          420
        ],
        "id": "7d131b58-f839-4ab9-a9ce-9f5ce3340b43",
        "name": "Local SD API",
        "notesInFlow": true
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "bed-time-stories",
          "fileName": "={{ $('Generate UUID').item.json.UUID }}.png",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          1740,
          420
        ],
        "id": "46144a11-d4b1-4edd-a02d-2030d238f988",
        "name": "Upload Image"
      },
      {
        "parameters": {
          "content": "## Create the video",
          "height": 240,
          "width": 960,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          940,
          720
        ],
        "id": "af7ddb2a-a9ae-48cb-b0e8-c11bef0189af",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "content": "## Add TTS to video",
          "height": 240,
          "width": 340,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          980,
          1000
        ],
        "id": "cdd47b46-6c96-4aae-801b-e559979ec8f1",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "operation": "update",
          "databaseId": 169,
          "tableId": 684,
          "rowId": "={{ $('Baserow').item.json.id }}",
          "fieldsUi": {
            "fieldValues": [
              {
                "fieldId": 6668,
                "fieldValue": "={{ $json.response[0].file_url }}"
              },
              {
                "fieldId": 6662,
                "fieldValue": "done"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.baserow",
        "typeVersion": 1,
        "position": [
          1200,
          1080
        ],
        "id": "cb028db8-7eea-44d9-af4e-51a80a63b682",
        "name": "Update record"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"id\": \"get-audio-duration\",\n  \"inputs\": [\n    {\n      \"file_url\": \"http://host.docker.internal:9000/bed-time-stories/{{ $('Limit').item.json.UUID }}.mp3\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        {\n          \"option\": \"-f\",\n          \"argument\": \"mp3\"\n        }\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"duration\": true\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1920,
          120
        ],
        "id": "8923c025-d78b-455f-acdb-731a8d9ad9a1",
        "name": "Get Audio Duration",
        "notesInFlow": true
      },
      {
        "parameters": {
          "model": "=google/gemini-2.0-flash-exp:free",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          40,
          560
        ],
        "id": "aeb2d89e-bf0c-404d-a09a-b07c9d09b076",
        "name": "OpenRouter",
        "notesInFlow": true,
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        },
        "notes": "google/gemini-2.0-flash-exp:free"
      },
      {
        "parameters": {
          "model": "=google/gemini-2.0-flash-exp:free",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          840,
          180
        ],
        "id": "bddf911a-c313-47bd-99f7-575860f68923",
        "name": "OpenRouter1",
        "notesInFlow": true,
        "notes": "google/gemini-2.0-flash-exp:free"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "={{ $json.text }}",
          "hasOutputParser": true,
          "messages": {
            "messageValues": [
              {
                "message": "=take the user imput and output as JSON\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"Story\": {\n      \"type\": \"string\"\n    }\n  },\n  \"required\": [\"Story\"]\n}"
              }
            ]
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.5,
        "position": [
          1220,
          60
        ],
        "id": "490cdd4e-43a9-42ab-bff9-300caec7d7a9",
        "name": "Parser"
      },
      {
        "parameters": {
          "action": "generate",
          "dataPropertyName": "UUID"
        },
        "type": "n8n-nodes-base.crypto",
        "typeVersion": 1,
        "position": [
          540,
          420
        ],
        "id": "c921f376-d43a-4cb7-b7d6-464c78f65b00",
        "name": "Generate UUID"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "05c8d19f-67c2-4e9e-b1fc-102c807dada8",
                "name": "text",
                "value": "={{ $json[\"text\"].replace(/\\n/g, \" \") }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1080,
          60
        ],
        "id": "1adf1d53-7622-4dd2-ba42-5cb3516f5927",
        "name": "Formatter"
      }
    ],
    "connections": {
      "Split Out": {
        "main": [
          [
            {
              "node": "Generate UUID",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "Baserow",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Baserow": {
        "main": [
          [
            {
              "node": "Limit",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Limit": {
        "main": [
          [
            {
              "node": "Set length & Speed",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser": {
        "ai_outputParser": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Scripter": {
        "main": [
          [
            {
              "node": "Formatter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Image Prompt Generator": {
        "main": [
          [
            {
              "node": "Split Out",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Convert to/from binary data2": {
        "main": [
          [
            {
              "node": "Upload Image",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Base46 To String": {
        "main": [
          [
            {
              "node": "Convert to/from binary data2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Loop Over Items1": {
        "main": [
          [],
          [
            {
              "node": "Local SD API",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set Prompt & url": {
        "main": [
          [
            {
              "node": "Create Video Clips",
              "type": "main",
              "index": 0
            },
            {
              "node": "Loop Over Items1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate TTS2": {
        "main": [
          [
            {
              "node": "Upload Audio S3",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload Audio S3": {
        "main": [
          [
            {
              "node": "Get Audio Duration",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser1": {
        "ai_outputParser": [
          [
            {
              "node": "Parser",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Set length & Speed": {
        "main": [
          [
            {
              "node": "Scripter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate2": {
        "main": [
          [
            {
              "node": "Video url to array",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Create Video Clips": {
        "main": [
          [
            {
              "node": "Aggregate2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Video url to array": {
        "main": [
          [
            {
              "node": "Create Video",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Create Video": {
        "main": [
          [
            {
              "node": "Add TTS To Video",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Add TTS To Video": {
        "main": [
          [
            {
              "node": "Update record",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Local SD API": {
        "main": [
          [
            {
              "node": "Base46 To String",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload Image": {
        "main": [
          [
            {
              "node": "Loop Over Items1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get Audio Duration": {
        "main": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter": {
        "ai_languageModel": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter1": {
        "ai_languageModel": [
          [
            {
              "node": "Scripter",
              "type": "ai_languageModel",
              "index": 0
            },
            {
              "node": "Parser",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Parser": {
        "main": [
          [
            {
              "node": "Generate TTS2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate UUID": {
        "main": [
          [
            {
              "node": "Set Prompt & url",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Formatter": {
        "main": [
          [
            {
              "node": "Parser",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "800407dd-3736-465e-a272-8c0a0f6d8a18",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-12T19:32:55.996Z",
    "updatedAt": "2025-05-12T19:32:55.996Z",
    "id": "Fpud8n7F2nl7ans8",
    "name": "Faceless Short",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.creatomate.com/v1/renders",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Authorization",
                "value": "Bearer YOUR API KEY"
              }
            ]
          },
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"template_id\": \"YOUR TEMPLATE ID\",\n  \"modifications\": {\n    \"Music.source\": \"https://drive.google.com/file/d/1wnE7sH3xOV17uytRP1FwN67jlfZuvg2P/view?usp=drive_link\",\n    \"Top-Image-1.source\": \"{{ $json['1.2'] }}\",\n    \"Bottom-Image-1.source\": \"{{ $json['1.1'] }}\",\n    \"Middle-Text-1.text\": \"VS\",\n    \"Full-Background-Image-1.source\": \"{{ $json['1.3'] }}\",\n    \"Top-Image-2.source\": \"{{ $json['2.2'] }}\",\n    \"Bottom-Image-2.source\": \"{{ $json['2.1'] }}\",\n    \"Middle-Text-2.text\": \"VS\",\n    \"Full-Background-Image-2.source\": \"{{ $json['2.3'] }}\",\n    \"Top-Image-3.source\": \"{{ $json['3.2'] }}\",\n    \"Bottom-Image-3.source\": \"{{ $json['3.1'] }}\",\n    \"Middle-Text-3.text\": \"VS\",\n    \"Full-Background-Image-3.source\": \"{{ $json['3.3'] }}\",\n    \"Top-Image-4.source\": \"{{ $json['4.2'] }}\",\n    \"Bottom-Image-4.source\": \"{{ $json['4.1'] }}\",\n    \"Middle-Text-4.text\": \"VS\",\n    \"Full-Background-Image-4.source\": \"{{ $json['4.3'] }}\",\n    \"Top-Image-5.source\": \"{{ $json['5.2'] }}\",\n    \"Bottom-Image-5.source\": \"{{ $json['5.1'] }}\",\n    \"Middle-Text-5.text\": \"VS\",\n    \"Full-Background-Image-5.source\": \"{{ $json['5.3'] }}\",\n    \"Top-Image-6.source\": \"{{ $json['6.2'] }}\",\n    \"Bottom-Image-6.source\": \"{{ $json['6.1'] }}\",\n    \"Middle-Text-6.text\": \"VS\",\n    \"Full-Background-Image-6.source\": \"{{ $json['6.3'] }}\",\n    \"Top-Image-7.source\": \"{{ $json['7.2'] }}\",\n    \"Bottom-Image-7.source\": \"{{ $json['7.1'] }}\",\n    \"Middle-Text-7.text\": \"VS\",\n    \"Full-Background-Image-7.source\": \"{{ $json['7.3'] }}\",\n    \"Top-Image-8.source\": \"{{ $json['8.2'] }}\",\n    \"Bottom-Image-8.source\": \"{{ $json['8.1'] }}\",\n    \"Middle-Text-8.text\": \"VS\",\n    \"Full-Background-Image-8.source\": \"{{ $json['8.3'] }}\"\n  }\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          920,
          1240
        ],
        "id": "64c6d658-8d9d-4d2e-a9a9-f6b4247adeff",
        "name": "Render Video"
      },
      {
        "parameters": {
          "documentId": {
            "__rl": true,
            "value": "1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U",
            "mode": "list",
            "cachedResultName": "Viral Shorts",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit?usp=drivesdk"
          },
          "sheetName": {
            "__rl": true,
            "value": "gid=0",
            "mode": "list",
            "cachedResultName": "Sheet1",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit#gid=0"
          },
          "filtersUI": {
            "values": [
              {
                "lookupColumn": "Status",
                "lookupValue": "To Do"
              }
            ]
          },
          "options": {
            "returnFirstMatch": true
          }
        },
        "type": "n8n-nodes-base.googleSheets",
        "typeVersion": 4.5,
        "position": [
          760,
          140
        ],
        "id": "55f6ec29-0941-44ad-bc76-c74641967f76",
        "name": "Get Main Character"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Main Character: {{ $json['Main Character'] }}\nOpponents: {{ $json.Opponents }}",
          "hasOutputParser": true,
          "options": {
            "systemMessage": "=# Overview\nYou are an AI agent that creates fight scene matchups.\n\n## Instructions\nGiven a main character and a category of opponents, generate a list of eight different opponents from that category. Each opponent should be suitable to fight the main character and come from a different environment, background, or type within the category.\n\nDo not include descriptions, adjectives, or extra context. Only list the opponent names, one per scene, labeled clearly.\n\n## Output Format:\nOnly output the opponent.\n\nScene 1: [Opponent]\nScene 2: [Opponent]\nScene 3: [Opponent]\nScene 4: [Opponent]\nScene 5: [Opponent]\nScene 6: [Opponent]\nScene 7: [Opponent]\nScene 8: [Opponent]\n\n"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.9,
        "position": [
          920,
          140
        ],
        "id": "c85aa776-be97-4864-8947-5519d11e78b3",
        "name": "Scene Creator"
      },
      {
        "parameters": {
          "model": "openai/gpt-4.1-mini",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          1880,
          280
        ],
        "id": "2be5721d-3a04-4475-99f4-225209e9aa5b",
        "name": "GPT 4.1-mini"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Main Animal: {{ $json.mainCharacter }}\nOpponent: {{ $json.opponents }}",
          "hasOutputParser": true,
          "options": {
            "systemMessage": "=# System Prompt\n\nYou are an AI agent that generates high-quality text-to-image prompts for a photorealistic image generation API.\n\n## Task\nGiven a **main animal** and an **opponent**, generate two separate close-up image prompts optimized for cinematic AI-generated images.\n\n## Output\nOutput two close up prompts. One for the main animal, one for the opponent.\n\nEach prompt must make the animal look:\n- hyper-realistic and photorealistic\n- fierce, angry, intimidating, threatening\n- Focused on high detail: skin/fur/scales, lighting, facial expression, and textures\n- Roaring with mouth wide open\n- Designed to make the animal look powerful, aggressive, and dramatic\n- The animal should be looking into the camera\n\nDo not include any background story, camera specifications, or extra formatting. Only return two clear and vivid text-to-image prompts—one for each animal.\n"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.9,
        "position": [
          600,
          580
        ],
        "id": "83afd95b-d9a6-438b-899f-18e1168c1e47",
        "name": "Image Prompt Generator"
      },
      {
        "parameters": {
          "fieldToSplitOut": "opponents",
          "options": {}
        },
        "type": "n8n-nodes-base.splitOut",
        "typeVersion": 1,
        "position": [
          1420,
          240
        ],
        "id": "2df7065f-4bfa-4133-b90d-e5c85ab14ba9",
        "name": "Split Out"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "ca3dc849-efdb-4c9c-9f6a-bff50a66cec6",
                "name": "mainCharacter",
                "value": "={{ $('Get Main Character').item.json['Main Character'] }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1340,
          60
        ],
        "id": "85c1802f-fc20-4e2f-863c-b497d8794ff5",
        "name": "Main Character"
      },
      {
        "parameters": {
          "mode": "combine",
          "combineBy": "combineAll",
          "options": {}
        },
        "type": "n8n-nodes-base.merge",
        "typeVersion": 3.1,
        "position": [
          1580,
          140
        ],
        "id": "0e76134f-351e-435c-826f-ffe2eba6d6bd",
        "name": "Merge"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "ee009a73-f9e0-48b2-963e-6d88f7b01fce",
                "name": "opponents",
                "value": "=['{{ $json.output.scene1 }}','{{ $json.output.scene2 }}','{{ $json.output.scene3 }}','{{ $json.output.scene4 }}','{{ $json.output.scene5 }}','{{ $json.output.scene6 }}','{{ $json.output.scene7 }}','{{ $json.output.scene8 }}']",
                "type": "array"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1260,
          240
        ],
        "id": "0334f5ae-94fb-41e1-a343-2daf3ff4f36d",
        "name": "Opponents"
      },
      {
        "parameters": {
          "jsonSchemaExample": "{\n  \"scene1\": \"Tiger\",\n  \"scene2\": \"Gorilla\",\n  \"scene3\": \"Black Panther\",\n  \"scene4\": \"Buffalo\",\n  \"scene5\": \"Anaconda\",\n  \"scene6\": \"Hyena\",\n  \"scene7\": \"Leopard\",\n  \"scene8\": \"Crocodile\"\n}\n"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          1960,
          160
        ],
        "id": "8048199f-082c-4d93-b8ab-4a6e8a6462b3",
        "name": "Scenes"
      },
      {
        "parameters": {
          "jsonSchemaExample": "{\n  \"mainCharacterCloseUp\": \"imagePrompt1\",\n  \"opponentCloseUp\": \"imagePrompt2\"\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          1880,
          520
        ],
        "id": "4be0635a-4c36-4e65-b9d2-807ce7e1e80f",
        "name": "Close Ups"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Animal 1: {{ $('Merge').item.json.mainCharacter }}\nAnimal 2: {{ $('Merge').item.json.opponents }}",
          "options": {
            "systemMessage": "=# Overview\nYou are an AI agent that creates text-to-image prompts for a photorealistic image generation API. Your goal is to create a single cinematic scene that shows the aftermath of a battle between two aniamals.\n\n## Task:\nGiven two animals, write one vivid prompt for a photorealistic image that shows the aftermath of a fight. Decide which animal is the winner, it should be realistic based on the strengths of each animal.\n\n## Prompt Guidelines\n1. The winner must be standing on top of the loser in a dominating stance. They should have visible battle scars.\n2. The winner should staring at the camera, roaring, mouth wide open, looking fierce, intimidating, and terrifying.\n3. The loser must appear dead, the word \"lifeless\" should be used. The loser should have visible wounds and battle scars.\n5. Both animal must be clearly visible, with the winner’s dominant stance making it immediately obvious who won the fight.\n6. The image must be photorealistic, with high attention to lighting, textures, and atmosphere. It should clearly display the aftermath of a brutal fight where the loser was injured.\n7. The two animals must be the main focus, filling most of the frame. The background should only enhance the realism and not distract.\n8. Each animal must be visually distinct and easily identifiable based on real-world appearance. The prompt must clearly describe each animal by name and include key traits that help the model render them correctly and differently.\n9. Use species-specific language to avoid confusion. Do not refer to both animals as just “beasts” or “creatures.” Always name them: \"the lion\" and \"the wolf\" — and refer back to them by name in the prompt.\n\n## Output:\nReturn one single paragraph as the final prompt.\n\n## Good Example Image Prompts\n1) In a photorealistic, cinematic scene, a massive polar bear stands triumphantly over the lifeless body of a jaguar in a snow-dusted landscape. The polar bear, its thick white fur spattered with streaks of blood and dust, dominates the frame, towering above the slack, motionless form of the jaguar sprawled beneath its heavy paw. The polar bear’s mouth is wide open in a terrifying roar, sharp teeth glistening, and its dark, fierce eyes stare straight into the camera, exuding raw power and victory. The jaguar’s spotted golden body lies limp and completely still, head tilted to the side, eyes fully closed with no sign of life, jaws parted loosely, and its muscular limbs splayed carelessly on the icy ground. Every detail—from the jaguar’s distinctive rosettes to the polar bear’s thick, textured fur and massive claws—is rendered in sharp, lifelike clarity beneath cold, dramatic lighting, making it unmistakably clear that the polar bear is the fearsome victor of this brutal encounter.\n\n"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.9,
        "position": [
          660,
          920
        ],
        "id": "350a6e5c-5e7e-4c60-8a39-9ba4fd20c74d",
        "name": "Winner Image Prompt"
      },
      {
        "parameters": {
          "url": "={{ $json.url }}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1240,
          1240
        ],
        "id": "e934946a-c788-4702-b208-5d0dd879d71e",
        "name": "Get Video"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.piapi.ai/api/v1/task",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"model\": \"Qubico/flux1-dev\",\n    \"task_type\": \"txt2img\",\n    \"input\": {\n        \"prompt\": \"{{ $json.output }}\",\n        \"width\": 1024, \n        \"height\": 1024\n    } \n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1040,
          580
        ],
        "id": "42a643f0-4321-46e9-bf02-5506f7cf836b",
        "name": "Generate Close Ups"
      },
      {
        "parameters": {
          "fieldToSplitOut": "output",
          "options": {}
        },
        "type": "n8n-nodes-base.splitOut",
        "typeVersion": 1,
        "position": [
          900,
          580
        ],
        "id": "8999b9a7-32a4-4fe5-bbec-6f7199ea99a4",
        "name": "Split Out1"
      },
      {
        "parameters": {
          "amount": 90
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          1180,
          580
        ],
        "id": "cc285443-feb0-4565-8dee-bb1e6bc93f22",
        "name": "90 seconds",
        "webhookId": "4d2189e7-aecc-4812-8e55-5f9509b159fc"
      },
      {
        "parameters": {
          "url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1320,
          580
        ],
        "id": "d8cb5951-84c3-4186-8a52-625b5344b523",
        "name": "Get Close Ups"
      },
      {
        "parameters": {
          "operation": "update",
          "documentId": {
            "__rl": true,
            "value": "1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U",
            "mode": "list",
            "cachedResultName": "Viral Shorts",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit?usp=drivesdk"
          },
          "sheetName": {
            "__rl": true,
            "value": "gid=0",
            "mode": "list",
            "cachedResultName": "Sheet1",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit#gid=0"
          },
          "columns": {
            "mappingMode": "defineBelow",
            "value": {
              "Main Character": "={{ $('Get Main Character').item.json['Main Character'] }}",
              "1.1": "={{ $json.data[0].output.image_url }}",
              "1.2": "={{ $json.data[1].output.image_url }}",
              "2.1": "={{ $json.data[2].output.image_url }}",
              "2.2": "={{ $json.data[3].output.image_url }}",
              "3.1": "={{ $json.data[4].output.image_url }}",
              "3.2": "={{ $json.data[5].output.image_url }}",
              "4.1": "={{ $json.data[6].output.image_url }}",
              "8.2": "={{ $json.data[15].output.image_url }}",
              "8.1": "={{ $json.data[14].output.image_url }}",
              "7.2": "={{ $json.data[13].output.image_url }}",
              "7.1": "={{ $json.data[12].output.image_url }}",
              "6.2": "={{ $json.data[11].output.image_url }}",
              "6.1": "={{ $json.data[10].output.image_url }}",
              "5.2": "={{ $json.data[9].output.image_url }}",
              "5.1": "={{ $json.data[8].output.image_url }}",
              "4.2": "={{ $json.data[7].output.image_url }}"
            },
            "matchingColumns": [
              "Main Character"
            ],
            "schema": [
              {
                "id": "Main Character",
                "displayName": "Main Character",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": false
              },
              {
                "id": "Opponents",
                "displayName": "Opponents",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "Status",
                "displayName": "Status",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "1.1",
                "displayName": "1.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "1.2",
                "displayName": "1.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "1.3",
                "displayName": "1.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "2.1",
                "displayName": "2.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "2.2",
                "displayName": "2.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "2.3",
                "displayName": "2.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "3.1",
                "displayName": "3.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "3.2",
                "displayName": "3.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "3.3",
                "displayName": "3.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "4.1",
                "displayName": "4.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "4.2",
                "displayName": "4.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "4.3",
                "displayName": "4.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "5.1",
                "displayName": "5.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "5.2",
                "displayName": "5.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "5.3",
                "displayName": "5.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "6.1",
                "displayName": "6.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "6.2",
                "displayName": "6.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "6.3",
                "displayName": "6.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "7.1",
                "displayName": "7.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "7.2",
                "displayName": "7.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "7.3",
                "displayName": "7.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "8.1",
                "displayName": "8.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "8.2",
                "displayName": "8.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "8.3",
                "displayName": "8.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "row_number",
                "displayName": "row_number",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "readOnly": true,
                "removed": true
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleSheets",
        "typeVersion": 4.5,
        "position": [
          1600,
          580
        ],
        "id": "5773994b-aa8f-47c3-8786-ed70bf00582b",
        "name": "Add Close Ups"
      },
      {
        "parameters": {
          "fieldsToAggregate": {
            "fieldToAggregate": [
              {
                "fieldToAggregate": "data"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          1460,
          580
        ],
        "id": "ec229ed1-47aa-448f-bdcd-3981d349d326",
        "name": "Aggregate"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://api.piapi.ai/api/v1/task",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"model\": \"Qubico/flux1-dev\",\n    \"task_type\": \"txt2img\",\n    \"input\": {\n        \"prompt\": \"{{ $json.output }}\",\n        \"width\": 540, \n        \"height\": 960\n    } \n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          960,
          920
        ],
        "id": "9f0e7745-a009-4c4b-91d2-806fa964faef",
        "name": "Generate Scene"
      },
      {
        "parameters": {
          "url": "=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1240,
          920
        ],
        "id": "0f7f678e-e1f3-4d1e-9cde-0d0299a8ca66",
        "name": "Get Winners"
      },
      {
        "parameters": {
          "amount": 90
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          1100,
          920
        ],
        "id": "939a4f0b-ee6b-494b-9ef5-452ecddc22db",
        "name": "90_seconds",
        "webhookId": "4d2189e7-aecc-4812-8e55-5f9509b159fc"
      },
      {
        "parameters": {
          "model": "openai/gpt-4.1",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          1960,
          400
        ],
        "id": "e57fc845-41a0-4560-9a1f-6e47a8cd0e6f",
        "name": "GPT 4.1"
      },
      {
        "parameters": {
          "fieldsToAggregate": {
            "fieldToAggregate": [
              {
                "fieldToAggregate": "data"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          1380,
          920
        ],
        "id": "a632c93b-d3d5-40a1-8729-c540464f3779",
        "name": "Aggregate1"
      },
      {
        "parameters": {
          "operation": "update",
          "documentId": {
            "__rl": true,
            "value": "1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U",
            "mode": "list",
            "cachedResultName": "Viral Shorts",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit?usp=drivesdk"
          },
          "sheetName": {
            "__rl": true,
            "value": "gid=0",
            "mode": "list",
            "cachedResultName": "Sheet1",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit#gid=0"
          },
          "columns": {
            "mappingMode": "defineBelow",
            "value": {
              "Main Character": "={{ $('Get Main Character').item.json['Main Character'] }}",
              "1.3": "={{ $json.data[0].output.image_url }}",
              "2.3": "={{ $json.data[1].output.image_url }}",
              "3.3": "={{ $json.data[2].output.image_url }}",
              "4.3": "={{ $json.data[3].output.image_url }}",
              "5.3": "={{ $json.data[4].output.image_url }}",
              "6.3": "={{ $json.data[5].output.image_url }}",
              "7.3": "={{ $json.data[6].output.image_url }}",
              "8.3": "={{ $json.data[7].output.image_url }}"
            },
            "matchingColumns": [
              "Main Character"
            ],
            "schema": [
              {
                "id": "Main Character",
                "displayName": "Main Character",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": false
              },
              {
                "id": "Opponents",
                "displayName": "Opponents",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "Status",
                "displayName": "Status",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "1.1",
                "displayName": "1.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "1.2",
                "displayName": "1.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "1.3",
                "displayName": "1.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "2.1",
                "displayName": "2.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "2.2",
                "displayName": "2.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "2.3",
                "displayName": "2.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "3.1",
                "displayName": "3.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "3.2",
                "displayName": "3.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "3.3",
                "displayName": "3.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "4.1",
                "displayName": "4.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "4.2",
                "displayName": "4.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "4.3",
                "displayName": "4.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "5.1",
                "displayName": "5.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "5.2",
                "displayName": "5.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "5.3",
                "displayName": "5.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "6.1",
                "displayName": "6.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "6.2",
                "displayName": "6.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "6.3",
                "displayName": "6.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "7.1",
                "displayName": "7.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "7.2",
                "displayName": "7.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "7.3",
                "displayName": "7.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "8.1",
                "displayName": "8.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "8.2",
                "displayName": "8.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "8.3",
                "displayName": "8.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "row_number",
                "displayName": "row_number",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "readOnly": true,
                "removed": true
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleSheets",
        "typeVersion": 4.5,
        "position": [
          1520,
          920
        ],
        "id": "e6e68fb5-612c-49f7-bb30-111a938b8931",
        "name": "Add Winner"
      },
      {
        "parameters": {
          "mode": "combine",
          "combineBy": "combineByPosition",
          "options": {}
        },
        "type": "n8n-nodes-base.merge",
        "typeVersion": 3.1,
        "position": [
          600,
          1240
        ],
        "id": "77a896f7-0798-492c-8f9b-cae9650eb99c",
        "name": "Merge1"
      },
      {
        "parameters": {
          "documentId": {
            "__rl": true,
            "value": "1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U",
            "mode": "list",
            "cachedResultName": "Viral Shorts",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit?usp=drivesdk"
          },
          "sheetName": {
            "__rl": true,
            "value": "gid=0",
            "mode": "list",
            "cachedResultName": "Sheet1",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit#gid=0"
          },
          "filtersUI": {
            "values": [
              {
                "lookupColumn": "Main Character",
                "lookupValue": "={{ $json['Main Character'] }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleSheets",
        "typeVersion": 4.5,
        "position": [
          760,
          1240
        ],
        "id": "5da323e6-5eaf-4620-b502-bf9d53f7669a",
        "name": "Get Elements"
      },
      {
        "parameters": {
          "operation": "update",
          "documentId": {
            "__rl": true,
            "value": "1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U",
            "mode": "list",
            "cachedResultName": "Viral Shorts",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit?usp=drivesdk"
          },
          "sheetName": {
            "__rl": true,
            "value": "gid=0",
            "mode": "list",
            "cachedResultName": "Sheet1",
            "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1ag61Kxk1kqmTj3Q9s1PQU35cme_CTt8xktKBYth7H0U/edit#gid=0"
          },
          "columns": {
            "mappingMode": "defineBelow",
            "value": {
              "Main Character": "={{ $('Get Main Character').item.json['Main Character'] }}",
              "Status": "Created",
              "Final Video": "={{ $json.url }}"
            },
            "matchingColumns": [
              "Main Character"
            ],
            "schema": [
              {
                "id": "Main Character",
                "displayName": "Main Character",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": false
              },
              {
                "id": "Opponents",
                "displayName": "Opponents",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "Status",
                "displayName": "Status",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "Final Video",
                "displayName": "Final Video",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "1.1",
                "displayName": "1.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "1.2",
                "displayName": "1.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "1.3",
                "displayName": "1.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "2.1",
                "displayName": "2.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "2.2",
                "displayName": "2.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "2.3",
                "displayName": "2.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "3.1",
                "displayName": "3.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "3.2",
                "displayName": "3.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "3.3",
                "displayName": "3.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "4.1",
                "displayName": "4.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "4.2",
                "displayName": "4.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "4.3",
                "displayName": "4.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "5.1",
                "displayName": "5.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "5.2",
                "displayName": "5.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "5.3",
                "displayName": "5.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "6.1",
                "displayName": "6.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "6.2",
                "displayName": "6.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "6.3",
                "displayName": "6.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "7.1",
                "displayName": "7.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "7.2",
                "displayName": "7.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "7.3",
                "displayName": "7.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "8.1",
                "displayName": "8.1",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "8.2",
                "displayName": "8.2",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "8.3",
                "displayName": "8.3",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "row_number",
                "displayName": "row_number",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true,
                "readOnly": true,
                "removed": true
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleSheets",
        "typeVersion": 4.5,
        "position": [
          1400,
          1240
        ],
        "id": "d7146e8a-49ac-4816-89cc-09abbc2eed05",
        "name": "Google Sheets"
      },
      {
        "parameters": {
          "amount": 90
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          1080,
          1240
        ],
        "id": "85466d5d-e3e5-4c71-95d6-4d2dbc70e6e3",
        "name": "90_Seconds",
        "webhookId": "32dfbb57-d930-4807-922e-78fa7fb72e78"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://backend.blotato.com/v2/media",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "bodyParameters": {
            "parameters": [
              {
                "name": "url",
                "value": "={{ $json['Final Video'] }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1560,
          1240
        ],
        "id": "adb18728-2505-45d9-b51c-a47933b8aeea",
        "name": "Upload to Blotato"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://backend.blotato.com/v2/posts",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"post\": {\n    \"target\": {\n      \"targetType\": \"instagram\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Get Main Character').item.json['Main Character'] }} vs {{ $('Get Main Character').item.json.Opponents }}\",\n      \"platform\": \"instagram\",\n      \"mediaUrls\": [\"{{ $json.url }}\"]\n    },\n    \"accountId\": \"account_id\"\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1920,
          760
        ],
        "id": "759bcfe1-8a6b-4d3a-8d80-2de1122f9091",
        "name": "Instagram"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://backend.blotato.com/v2/posts",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"post\": {\n    \"target\": {\n      \"targetType\": \"tiktok\",\n      \"isYourBrand\": false,\n      \"disabledDuet\": false,\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"isAiGenerated\": true,\n      \"disabledStitch\": false,\n      \"disabledComments\": false,\n      \"isBrandedContent\": false\n    },\n    \"content\": {\n      \"text\": \"{{ $('Get Main Character').item.json['Main Character'] }} vs {{ $('Get Main Character').item.json.Opponents }}\",\n      \"platform\": \"tiktok\",\n      \"mediaUrls\": [\"{{ $json.url }}\"]\n    },\n    \"accountId\": \"account_id\"\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1920,
          1020
        ],
        "id": "9b3b50fa-ced3-472a-9b06-079f683e680e",
        "name": "TikTok"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://backend.blotato.com/v2/posts",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"post\": {\n    \"target\": {\n      \"targetType\": \"youtube\",\n      \"title\": \"{{ $('Get Main Character').item.json['Main Character'] }} vs {{ $('Get Main Character').item.json.Opponents }}\",\n      \"privacyStatus\": \"unlisted\",\n      \"shouldNotifySubscribers\": false\n    },\n    \"content\": {\n      \"text\": \"text\",\n      \"platform\": \"youtube\",\n      \"mediaUrls\": [\"{{ $json.url }}\"]\n    },\n    \"accountId\": \"account_id\"\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1920,
          1280
        ],
        "id": "71ce8294-7f04-4765-b57f-6990f2947fe4",
        "name": "YouTube"
      },
      {
        "parameters": {
          "content": "# Create Scenes\n\n",
          "height": 440,
          "width": 1320,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          480,
          0
        ],
        "id": "002f991d-93a8-4ce3-8f3d-5cc14206fee1",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "content": "# Create Close-up Images",
          "height": 320,
          "width": 1320,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          480,
          460
        ],
        "id": "6bc68259-c408-4e24-a841-e26e3ba219da",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "content": "# Create Winner Images",
          "height": 320,
          "width": 1320,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          480,
          800
        ],
        "id": "b6eec6c3-58b0-4d48-a172-fd094c02a608",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "content": "# Output Parser & Chat Models\n",
          "height": 660,
          "width": 300,
          "color": 7
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1820,
          0
        ],
        "id": "6c4dbe76-c4e2-4500-8293-aacdc07be06b",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "content": "# Render Video",
          "height": 300,
          "width": 1320,
          "color": 3
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          480,
          1140
        ],
        "id": "38c51453-4abf-48ef-9507-f12608168f4f",
        "name": "Sticky Note4"
      },
      {
        "parameters": {
          "content": "# Instagram",
          "height": 240,
          "width": 300
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1820,
          680
        ],
        "id": "b94f7a1b-9e1e-4e75-86c9-160d0341a339",
        "name": "Sticky Note5"
      },
      {
        "parameters": {
          "content": "# TikTok",
          "height": 240,
          "width": 300
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1820,
          940
        ],
        "id": "a96b7a1d-a9ec-400b-9bba-9589aa388462",
        "name": "Sticky Note6"
      },
      {
        "parameters": {
          "content": "# YouTube\n",
          "height": 240,
          "width": 300
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1820,
          1200
        ],
        "id": "9f5894f7-364b-49e2-b6e5-f7cbcf2d12e3",
        "name": "Sticky Note7"
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {}
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          600,
          140
        ],
        "id": "a620c01e-5c60-4db6-8558-88d09425e18c",
        "name": "Schedule Trigger"
      },
      {
        "parameters": {
          "content": "# 🛠️Setup Guide  \n**Author: [Nate Herk](https://www.youtube.com/@nateherk)**\n\n1. **Make a copy** of this [Google Sheet Template](https://docs.google.com/spreadsheets/d/17bBP-jKvuXOev1jdCr4-eLCqL6uypWUkOGWdVYMF_Po/edit?usp=sharing) and connect it to the five Google Sheet nodes in the workflow.\n\n2. Connect your [OpenRouter](https://openrouter.ai/) API key to the two OpenRouter nodes in the chat model section.\n\n3. Create a [PiAPi](https://piapi.ai/workspace?via=nate) account and connect your API key.\n\n4. Create a [Creatomate](https://creatomate.com/) account and connect your template ID and account ID.  \n   You can duplicate the same template shown in the video by using the source code linked in the same Skool post where you downloaded the workflow.\n\n5. Connect your [Blotato](https://blotato.com/?ref=nate) account and get your API key to enable auto publishing to Instagram, TikTok, and YouTube.\n- promo code \"NATE30\" for 30% off for 6 months",
          "height": 460,
          "width": 460
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "3a47492f-de57-42f2-9167-fa055cf2601f",
        "name": "Sticky Note8"
      }
    ],
    "connections": {
      "Render Video": {
        "main": [
          [
            {
              "node": "90_Seconds",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get Main Character": {
        "main": [
          [
            {
              "node": "Scene Creator",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Scene Creator": {
        "main": [
          [
            {
              "node": "Opponents",
              "type": "main",
              "index": 0
            },
            {
              "node": "Main Character",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "GPT 4.1-mini": {
        "ai_languageModel": [
          [
            {
              "node": "Scene Creator",
              "type": "ai_languageModel",
              "index": 0
            },
            {
              "node": "Image Prompt Generator",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Image Prompt Generator": {
        "main": [
          [
            {
              "node": "Split Out1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Out": {
        "main": [
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 1
            }
          ]
        ]
      },
      "Main Character": {
        "main": [
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Merge": {
        "main": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "main",
              "index": 0
            },
            {
              "node": "Winner Image Prompt",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Opponents": {
        "main": [
          [
            {
              "node": "Split Out",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Scenes": {
        "ai_outputParser": [
          [
            {
              "node": "Scene Creator",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Close Ups": {
        "ai_outputParser": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Winner Image Prompt": {
        "main": [
          [
            {
              "node": "Generate Scene",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Out1": {
        "main": [
          [
            {
              "node": "Generate Close Ups",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate Close Ups": {
        "main": [
          [
            {
              "node": "90 seconds",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "90 seconds": {
        "main": [
          [
            {
              "node": "Get Close Ups",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get Close Ups": {
        "main": [
          [
            {
              "node": "Aggregate",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate": {
        "main": [
          [
            {
              "node": "Add Close Ups",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate Scene": {
        "main": [
          [
            {
              "node": "90_seconds",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "90_seconds": {
        "main": [
          [
            {
              "node": "Get Winners",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "GPT 4.1": {
        "ai_languageModel": [
          [
            {
              "node": "Winner Image Prompt",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Get Winners": {
        "main": [
          [
            {
              "node": "Aggregate1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate1": {
        "main": [
          [
            {
              "node": "Add Winner",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Add Close Ups": {
        "main": [
          [
            {
              "node": "Merge1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Add Winner": {
        "main": [
          [
            {
              "node": "Merge1",
              "type": "main",
              "index": 1
            }
          ]
        ]
      },
      "Merge1": {
        "main": [
          [
            {
              "node": "Get Elements",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get Elements": {
        "main": [
          [
            {
              "node": "Render Video",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get Video": {
        "main": [
          [
            {
              "node": "Google Sheets",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "90_Seconds": {
        "main": [
          [
            {
              "node": "Get Video",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Google Sheets": {
        "main": [
          [
            {
              "node": "Upload to Blotato",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload to Blotato": {
        "main": [
          [
            {
              "node": "Instagram",
              "type": "main",
              "index": 0
            },
            {
              "node": "TikTok",
              "type": "main",
              "index": 0
            },
            {
              "node": "YouTube",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "Get Main Character",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "8e622748-11d4-47d2-a185-fb577cfdc620",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-03T14:31:53.206Z",
    "updatedAt": "2025-05-03T14:31:53.206Z",
    "id": "pdInTQDOBtFjQn5S",
    "name": "Whatsapp Bot Greeks Tech Jenny",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "c37e4144-e80d-4739-aa10-713571e30873",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          0
        ],
        "id": "4ad689c6-d0b7-480a-a1c3-58105b28ae18",
        "name": "Webhook",
        "webhookId": "c37e4144-e80d-4739-aa10-713571e30873"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=The user with ID {{ $json.chat_id }} sends the following message:\n\n{{ $('Webhook').item.json.body.data.message.conversation }}\n\nBefore responding, check if this is a new conversation or a continuation. If it's a new user, greet them appropriately. If it's a continuation, respond directly to their question or statement without greeting again.\n",
          "options": {
            "systemMessage": "=You are Code Greeks Assistant, a friendly AI consultant for Code Greeks - a software development company specializing in server setup, IT support, data analysis, automation, web scraping, and full-stack development.\n\n## PERSONALITY & TONE\nBe warm, approachable, and genuinely helpful - like a knowledgeable tech friend who's excited to solve problems. Use a conversational style with:\n- Natural language and occasional exclamations!\n- Thoughtful emojis to add personality 😊\n- Brief paragraphs for easy reading\n- Empathetic responses that acknowledge feelings\n- Casual transitions (\"By the way,\" \"Actually,\" \"Oh, and\")\n\n## CONVERSATION APPROACH\n\n**First Messages:** Welcome new users warmly with a personalized greeting and emoji:\n\"Hi there! 👋 I'm your Code Greeks assistant. How can I help with your tech project today?\"\n\n**Ongoing Conversations:** Continue naturally without reintroductions, maintaining context like a human would.\n\n**Problem Solving:** Show empathy first (\"That sounds frustrating!\"), then ask specific questions to understand their situation better.\n\n**Language Matching:** If a customer writes in Pidgin English, respond in Pidgin English too.\n\n## SERVICE FOCUS\nAlways keep responses relevant to Code Greeks' services. If someone asks about unrelated topics, gently steer the conversation back to how we can help with:\n- Server setup and management\n- IT support and troubleshooting\n- Data analysis and visualization\n- Automation solutions\n- Web scraping and data collection\n- Full-stack development projects\n\n## EMAIL TROUBLESHOOTING\nFor email issues, be friendly but thorough:\n\"Email troubles can be so annoying! Let's sort this out together. Could you tell me what email service you're using, any error messages you're seeing, and which addresses aren't working? Have you noticed any patterns with what's working versus what isn't?\"\n\n## PRICING GUIDANCE\nWhen discussing costs, be transparent in a conversational way:\n\n- Email/SMTP server setup: $50 (₦80,000) - quick and straightforward\n- Serverless API development: From $100 (₦160,000), depending on your needs\n- WordPress website: $150 (₦240,000) with $50 (₦80,000)/year maintenance\n- E-commerce website: $190 (₦304,000) + $50 (₦80,000)/year to keep things running smoothly\n- E-commerce with AI agent: $200 (₦320,000) + $30 (₦48,000)/month for basic support\n\nFor larger projects (over $1000): \"For something this size, we'd love to have a proper chat to understand exactly what you need. There's a small $15 booking fee to reserve time with our specialist, which gets applied to your project when we start.\"\n\n## SPECIALIZED SERVICES\nWhen discussing specialized services, highlight value before mentioning price:\n\n- Web Scraping: \"We can automatically gather the exact data you need, typically $450-1000/month depending on complexity and volume\"\n- Data Analysis: \"We'll transform your raw data into insights you can actually use, usually $5,000-15,000 for small business solutions\"\n- AI Automation: \"We can build custom AI assistants to handle repetitive tasks, starting at just $50-100/month\"\n\n## ESCALATION APPROACH\nIf expert help is needed: \"This might need our specialist's touch. They could solve your [specific issue] for about [price]. Would that work for you?\"\n\nIf they agree: \"Perfect! I just need your email and phone number so our specialist can reach out directly. They'll focus specifically on solving this issue without any scope creep!\"\n\nRemember: Be genuinely helpful and human. Talk like you're having coffee with a friend, not reading from a script. Show real interest in their problems and excitement about helping them find solutions.\n"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.8,
        "position": [
          420,
          -80
        ],
        "id": "ccd3e5c2-489c-4266-bc85-3a6dae18e825",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          200,
          220
        ],
        "id": "a66af5a6-d730-43ba-813f-b9efd236f3bb",
        "name": "OpenAI Chat Model",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.chat_id }}",
          "contextWindowLength": 500
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          540,
          220
        ],
        "id": "f6e69c51-ec20-4a7e-8627-a773b2f469e5",
        "name": "Simple Memory"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "fea7fb1a-7ce4-4e32-8202-1a386af3703d",
                "name": "chat_id",
                "value": "={{ $json.body.data.key.remoteJid }}",
                "type": "string"
              },
              {
                "id": "1139a83a-b15c-48ea-8116-3339e6917172",
                "name": "api_key",
                "value": "={{ $json.body.apikey }}",
                "type": "string"
              },
              {
                "id": "9ff3541a-fba9-4f24-9b5d-9cb89fdd50c7",
                "name": "server_url",
                "value": "={{ $json.body.server_url }}",
                "type": "string"
              },
              {
                "id": "045d49e1-20d4-496c-bfd8-805675c6ce8f",
                "name": "instance_name",
                "value": "={{ $json.body.instance }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          240,
          20
        ],
        "id": "f8b93cba-59bf-4d86-84d8-6ddfd94eef80",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "=https://evos.cloud.codegreeks.com.ng/message/sendText/{{ $('Edit Fields').item.json.instance_name }}",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "apikey",
                "value": "={{ $('Edit Fields').item.json.api_key }}"
              }
            ]
          },
          "sendBody": true,
          "bodyParameters": {
            "parameters": [
              {
                "name": "number",
                "value": "={{ $('Edit Fields').item.json.chat_id }}"
              },
              {
                "name": "text",
                "value": "={{ $json.output }}"
              },
              {
                "name": "delay",
                "value": "={{ 5000 }}"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          840,
          -120
        ],
        "id": "b68fe3ca-a813-4f6c-817a-7ba411b63170",
        "name": "HTTP Request"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          980,
          100
        ],
        "id": "d8106d63-1c68-47c5-b947-fb0a07df0c07",
        "name": "Calculator"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          380,
          180
        ],
        "id": "f322d945-cac3-49db-85f6-65b0030a807b",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "amount": 10,
          "path": "e3344237-3026-4965-b110-e1a165394831"
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          760,
          40
        ],
        "id": "9a83ce82-d6d1-436c-821c-a95618e09a1a",
        "name": "Wait",
        "webhookId": "e3344237-3026-4965-b110-e1a165394831"
      },
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.chat_id }}",
          "tableName": "n8n_chat_histories_whatsapp_greeks",
          "contextWindowLength": 5000
        },
        "type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
        "typeVersion": 1.3,
        "position": [
          640,
          160
        ],
        "id": "370afd10-536f-4982-bbf7-9c637ae6dc1a",
        "name": "Postgres Chat Memory",
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        }
      },
      {
        "parameters": {
          "content": "Whatsapp Assistant ",
          "height": 580,
          "width": 1180,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          -60,
          -180
        ],
        "id": "8810df56-6dcf-4dd9-9ef7-64bcd9f792cc",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "9064f4a9-cc65-448e-9380-ad9886143943",
                "leftValue": "={{ $json.body.data.key.remoteJid }}",
                "rightValue": "447723442078@s.whatsapp.net",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          140,
          -160
        ],
        "id": "ff382f33-9200-493b-8c17-4cf8c3f92dbc",
        "name": "If"
      }
    ],
    "connections": {
      "Webhook": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          []
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          []
        ]
      },
      "Edit Fields": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Calculator": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Postgres Chat Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [],
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "12d23d1a-b00b-4066-89da-802765c1df3e",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-24T07:46:14.721Z",
    "updatedAt": "2025-04-06T08:10:28.608Z",
    "id": "aaNeJ6DOrqTRkVNM",
    "name": "My workflow 3",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.8,
        "position": [
          340,
          -40
        ],
        "id": "025b959a-69b6-4687-8245-05c51aad9f44",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          240,
          180
        ],
        "id": "dcdd4754-f69a-4a40-96a8-0dbc7d43445f",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "contextWindowLength": 122
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          440,
          180
        ],
        "id": "70f8304a-d5f7-4c21-ac8e-69785a1e5f11",
        "name": "Simple Memory"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.1,
        "position": [
          700,
          -40
        ],
        "id": "6981e2e0-4112-47eb-9a76-682d9b3c4160",
        "name": "Respond to Webhook"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          600,
          180
        ],
        "id": "f1775d63-20a1-4464-be65-cedf548a45ea",
        "name": "Calculator"
      },
      {
        "parameters": {
          "public": true,
          "mode": "webhook",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          20,
          -80
        ],
        "id": "67c18e15-f19f-41d7-8a5a-9f1b49a488bd",
        "name": "When chat message received",
        "webhookId": "6b0a81a6-5d6b-4e0d-8b20-6aab6dc81697"
      }
    ],
    "connections": {
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Calculator": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "When chat message received": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "46a50616-f8a8-4717-9204-3aaa1d2aa7a1",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-02T14:05:04.801Z",
    "updatedAt": "2025-03-02T14:16:54.276Z",
    "id": "Zj5gRM1Kf8m5UGlW",
    "name": "auto backup workflow",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "options": {}
        },
        "id": "ace4bbe5-e529-4bfb-8c7f-74e0a39a6bec",
        "name": "Set date",
        "type": "n8n-nodes-base.dateTime",
        "typeVersion": 2,
        "position": [
          240,
          420
        ]
      },
      {
        "parameters": {
          "operation": "formatDate",
          "date": "={{ $json.currentDate }}",
          "format": "custom",
          "customFormat": "dd-MM-yyyy/H:mm",
          "options": {}
        },
        "id": "d70efcf4-9138-4b64-a641-13b3c0f9c71c",
        "name": "Format date",
        "type": "n8n-nodes-base.dateTime",
        "typeVersion": 2,
        "position": [
          440,
          420
        ]
      },
      {
        "parameters": {
          "keepOnlySet": true,
          "values": {
            "string": [
              {
                "name": "commitDate",
                "value": "={{ $json.formattedDate }}"
              }
            ]
          },
          "options": {}
        },
        "id": "d42f0239-6eec-48d1-a754-8b21aef66b43",
        "name": "Set commit date",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          640,
          420
        ]
      },
      {
        "parameters": {
          "authentication": "oAuth2",
          "resource": "file",
          "operation": "list",
          "owner": {
            "__rl": true,
            "value": "ufumzy",
            "mode": "list",
            "cachedResultName": "ufumzy",
            "cachedResultUrl": "https://github.com/ufumzy"
          },
          "repository": {
            "__rl": true,
            "value": "n8n-backup",
            "mode": "list",
            "cachedResultName": "n8n-backup",
            "cachedResultUrl": "https://github.com/ufumzy/n8n-backup"
          },
          "filePath": "="
        },
        "id": "8d64bf4c-b6a8-4cf7-9df6-b1756d740f1d",
        "name": "List files from repository [GITHUB]",
        "type": "n8n-nodes-base.github",
        "typeVersion": 1,
        "position": [
          840,
          420
        ],
        "alwaysOutputData": true,
        "credentials": {
          "githubOAuth2Api": {
            "id": "xvFJVaodJzADTqXZ",
            "name": "GitHub account"
          }
        }
      },
      {
        "parameters": {
          "operation": "aggregateItems",
          "fieldsToAggregate": {
            "fieldToAggregate": [
              {
                "fieldToAggregate": "name"
              }
            ]
          },
          "options": {}
        },
        "id": "83524b1f-086a-485f-8716-7998e7d4936b",
        "name": "Combine file names [GITHUB]",
        "type": "n8n-nodes-base.itemLists",
        "typeVersion": 2.1,
        "position": [
          1040,
          420
        ]
      },
      {
        "parameters": {
          "filters": {},
          "requestOptions": {}
        },
        "id": "87db2f93-270d-4fa0-8cc3-97ef4b1913bf",
        "name": "Retrieve workflows [N8N]",
        "type": "n8n-nodes-base.n8n",
        "typeVersion": 1,
        "position": [
          1240,
          420
        ],
        "credentials": {
          "n8nApi": {
            "id": "Nze409dfwQDui4oP",
            "name": "n8n account"
          }
        }
      },
      {
        "parameters": {
          "mode": "jsonToBinary",
          "options": {
            "fileName": "={{ $json.name.replace(/\\s+/g, '-').toLowerCase() }}-{{ $json.id }}.json"
          }
        },
        "id": "57c85a10-4cea-4c7e-8f6a-05a26877c2c2",
        "name": "Move JSON to binary",
        "type": "n8n-nodes-base.moveBinaryData",
        "typeVersion": 1,
        "position": [
          1440,
          420
        ]
      },
      {
        "parameters": {
          "batchSize": 1,
          "options": {}
        },
        "id": "35c90ddc-2ea9-410a-9f13-2b3c6369e759",
        "name": "Split to single items",
        "type": "n8n-nodes-base.splitInBatches",
        "typeVersion": 2,
        "position": [
          1680,
          420
        ]
      },
      {
        "parameters": {
          "conditions": {
            "string": [
              {
                "value1": "={{ $node['Combine file names [GITHUB]'].json.name }}",
                "operation": "contains",
                "value2": "={{ $binary.data.fileName }}"
              }
            ]
          }
        },
        "id": "ea315f14-ceb7-4e54-89fc-dc5e50076983",
        "name": "Check if file exists in repository",
        "type": "n8n-nodes-base.if",
        "typeVersion": 1,
        "position": [
          1920,
          340
        ]
      },
      {
        "parameters": {
          "authentication": "oAuth2",
          "resource": "file",
          "operation": "edit",
          "owner": {
            "__rl": true,
            "value": "ufumzy",
            "mode": "list",
            "cachedResultName": "ufumzy",
            "cachedResultUrl": "https://github.com/ufumzy"
          },
          "repository": {
            "__rl": true,
            "value": "n8n-backup",
            "mode": "list",
            "cachedResultName": "n8n-backup",
            "cachedResultUrl": "https://github.com/ufumzy/n8n-backup"
          },
          "filePath": "={{ $binary.data.fileName }}",
          "binaryData": true,
          "commitMessage": "=backup-{{ $node['Set commit date'].json.commitDate }}"
        },
        "id": "e88ee548-50e5-4411-b5cb-c46a826a4857",
        "name": "Update file [GITHUB]",
        "type": "n8n-nodes-base.github",
        "typeVersion": 1,
        "position": [
          2140,
          140
        ],
        "credentials": {
          "githubOAuth2Api": {
            "id": "xvFJVaodJzADTqXZ",
            "name": "GitHub account"
          }
        }
      },
      {
        "parameters": {
          "authentication": "oAuth2",
          "resource": "file",
          "owner": {
            "__rl": true,
            "value": "ufumzy",
            "mode": "list",
            "cachedResultName": "ufumzy",
            "cachedResultUrl": "https://github.com/ufumzy"
          },
          "repository": {
            "__rl": true,
            "value": "n8n-backup",
            "mode": "list",
            "cachedResultName": "n8n-backup",
            "cachedResultUrl": "https://github.com/ufumzy/n8n-backup"
          },
          "filePath": "={{ $binary.data.fileName }}",
          "binaryData": true,
          "commitMessage": "=backup-{{ $node['Set commit date'].json.commitDate }}"
        },
        "id": "2122d0a0-0c61-4f1a-9f7a-d0d3e414ee50",
        "name": "Upload file [GITHUB]",
        "type": "n8n-nodes-base.github",
        "typeVersion": 1,
        "position": [
          2140,
          540
        ],
        "credentials": {
          "githubOAuth2Api": {
            "id": "xvFJVaodJzADTqXZ",
            "name": "GitHub account"
          }
        }
      },
      {
        "parameters": {
          "content": "## Trigger\nYou can change it to [\"Schedule\" trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/) to make backups on regular basis.",
          "height": 339.51767272727324,
          "width": 182.4715262478496
        },
        "id": "1075d2b0-fd2d-4652-981b-fe9da7394db1",
        "name": "Sticky Note",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          260
        ]
      },
      {
        "parameters": {
          "content": "## Set and format date/time\nThose nodes are responsible for setting a current date and time in format `dd-MM-yyyy/H:mm`. Date and time are used to compose commit messages in GitHub, for example: `backup-12-07-2023/14:18`.",
          "height": 339.42690909090965,
          "width": 585.4045090909088
        },
        "id": "9fab4cd6-b886-4766-8b65-e8aa2cefbaed",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          200,
          260
        ]
      },
      {
        "parameters": {
          "content": "## Make a list of existing files\nReturn a list of existing files (backups) in GitHub repository. Data returned by those nodes is used by \"IF\" node (later in workflow) to check whether the backup files should be created or updated.",
          "height": 339.42690909090965,
          "width": 389.89265454545443
        },
        "id": "2344a6b5-3cff-4446-abbc-7a2d029ecbf4",
        "name": "Sticky Note2",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          800,
          260
        ]
      },
      {
        "parameters": {
          "content": "## Retrieve workflows\nGet all workflows form your n8n instance. Remember that **your credentials need to point to the instance that you want to backup.**",
          "height": 339.42690909090965,
          "width": 384.14708363636373
        },
        "id": "fdc16105-9edb-4ba6-807c-2cf3da9e2ccd",
        "name": "Sticky Note3",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1220,
          260
        ]
      },
      {
        "parameters": {
          "content": "## Upload backup\nSplit JSON files into batches of 1, check if they were uploaded to repository before. If yes (true), upload the new version of the file. Otherwise (false) create the file in repository.",
          "height": 731.633426614796,
          "width": 703.8733020263451
        },
        "id": "ed009b4a-e196-4540-a9e5-70ab760fc10c",
        "name": "Sticky Note4",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1620,
          0
        ]
      },
      {
        "parameters": {
          "content": "## ⚠️ Note\n\n1. Complete video guide for this workflow is available [on my YouTube](https://www.youtube.com/watch?v=dNuVuoPD0Jo). \n2. Remember to add your credentials and configure GitHub nodes (covered in the video guide).\n3. If you like this workflow, please subscribe to [my YouTube channel](https://www.youtube.com/@workfloows) and/or [my newsletter](https://workfloows.com/).\n\n**Thank you for your support!**",
          "height": 234.82946582693546,
          "width": 508.8662091091177
        },
        "id": "d0fb5004-6279-42a2-978e-de187fb46d99",
        "name": "Sticky Note5",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          0
        ]
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {}
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          40,
          420
        ],
        "id": "667aba1f-ce52-4eb1-95ef-05e32b75bb33",
        "name": "Schedule Trigger"
      }
    ],
    "connections": {
      "Set date": {
        "main": [
          [
            {
              "node": "Format date",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Format date": {
        "main": [
          [
            {
              "node": "Set commit date",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set commit date": {
        "main": [
          [
            {
              "node": "List files from repository [GITHUB]",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "List files from repository [GITHUB]": {
        "main": [
          [
            {
              "node": "Combine file names [GITHUB]",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Combine file names [GITHUB]": {
        "main": [
          [
            {
              "node": "Retrieve workflows [N8N]",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Retrieve workflows [N8N]": {
        "main": [
          [
            {
              "node": "Move JSON to binary",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Move JSON to binary": {
        "main": [
          [
            {
              "node": "Split to single items",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split to single items": {
        "main": [
          [
            {
              "node": "Check if file exists in repository",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check if file exists in repository": {
        "main": [
          [
            {
              "node": "Update file [GITHUB]",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Upload file [GITHUB]",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Update file [GITHUB]": {
        "main": [
          [
            {
              "node": "Split to single items",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload file [GITHUB]": {
        "main": [
          [
            {
              "node": "Split to single items",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "Set date",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": {
      "node:Schedule Trigger": {
        "recurrenceRules": []
      }
    },
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "c82cb330-8f3a-4c22-9748-94b6c7dda40f",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-05-08T12:12:58.602Z",
    "updatedAt": "2025-05-22T16:42:24.949Z",
    "id": "UYiVfnzQbcq0IM74",
    "name": "NCA ToolKit",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          140,
          1720
        ],
        "id": "2e63b698-e112-48e0-bd83-eba90d518c19",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "content": "## Video",
          "height": 280,
          "width": 1760
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          320
        ],
        "typeVersion": 1,
        "id": "3a178fb5-3b51-4976-a69f-eba73874ea81",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/video/caption",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n  \"settings\": {\n    \"line_color\": \"#FFFFFF\",\n    \"word_color\": \"#FFFF00\",\n    \"all_caps\": false,\n    \"max_words_per_line\": 3,\n    \"font_size\": 60,\n    \"bold\": false,\n    \"italic\": false,\n    \"underline\": false,\n    \"strikeout\": false,\n    \"outline_width\": 3,\n    \"shadow_offset\": 4,\n    \"style\": \"highlight\",\n    \"font_family\": \"The Bold Font\",\n    \"position\": \"bottom_center\"\n  },\n  \"id\": \"gdrive-five\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          140,
          400
        ],
        "id": "2dba2b81-bae5-405b-8c3f-b05116d8401a",
        "name": "Caption",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/video/thumbnail",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"second\": 0,\n    \"id\": \"gdrive-five\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          340,
          400
        ],
        "id": "0871ec6e-6a46-4110-89aa-e4e37d4c2f94",
        "name": "Thumbnail",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/video/concatenate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"video_urls\":[\n        {\"video_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"},\n        {\"video_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"}\n    ],\n    \"id\": \"2323\"\n}",
          "options": {
            "redirect": {
              "redirect": {}
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          540,
          400
        ],
        "id": "35c6ef6f-78d7-4683-ada6-8e0737d49f03",
        "name": "Concatenate",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "content": "## FFmpeg Compose",
          "height": 280,
          "width": 1760,
          "color": 3
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          640
        ],
        "typeVersion": 1,
        "id": "fcd29230-1367-48c3-bd49-de99f4750057",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "content": "## Toolkit",
          "height": 280,
          "width": 1760,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1,
        "id": "1e49fa13-2598-464d-bcc4-39e8683e9897",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Horizontal Video.mp4\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[0:v]trim=start=10:end=15,setpts=PTS-STARTPTS[vout];[0:a]atrim=start=10:end=15,asetpts=PTS-STARTPTS[aout]\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        { \"option\": \"-map\", \"argument\": \"[vout]\" },\n        { \"option\": \"-map\", \"argument\": \"[aout]\" },\n        { \"option\": \"-c:v\", \"argument\": \"libx264\" },\n        { \"option\": \"-c:a\", \"argument\": \"aac\" }\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"thumbnail\": true,\n    \"filesize\": true,\n    \"duration\": true,\n    \"bitrate\": true,\n    \"encoder\": true\n  },\n  \"id\": \"extract_clip_001\"\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          140,
          720
        ],
        "id": "55a295b0-a7b0-42bd-a14e-61cfe4290ee0",
        "name": "Clip"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Horizontal Video.mp4\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[0:v]crop=658:1080:656:0,scale=1080:1920[v]\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        {\n          \"option\": \"-map\",\n          \"argument\": \"[v]\"\n        },\n        {\n          \"option\": \"-map\",\n          \"argument\": \"0:a\"\n        },\n        {\n          \"option\": \"-c:a\",\n          \"argument\": \"copy\"\n        }\n      ]\n    }\n  ],\n  \"webhook_url\": \"https://sgplabs.app.n8n.cloud/webhook-test/8e468964-bef8-4e97-a65f-5674280f6788\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          340,
          720
        ],
        "id": "31869e0c-4e64-4750-8c92-2774a94a9476",
        "name": "Crop"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"inputs\": [\n        {\n            \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/vertical%20pic%20skool.png\"\n        },\n        {\n            \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/tweet%20pic.png\"\n        }\n    ],\n    \"filters\": [\n        {\n            \"filter\": \"[0:v][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2+200[outv]\"\n        }\n    ],\n    \"outputs\": [\n        {\n            \"options\": [\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"[outv]\"\n                },\n                {\n                    \"option\": \"-f\",\n                    \"argument\": \"image2\"\n                }\n            ]\n        }\n    ],\n    \"id\": \"image-overlay\"\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          740,
          720
        ],
        "id": "6e017fe6-5ea3-43b4-b728-b56b6955350e",
        "name": "Tweet Pic"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"inputs\": [\n        {\n            \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"\n        },\n        {\n            \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/tweet%20pic.png\"\n        }\n    ],\n    \"filters\": [\n        {\n            \"filter\": \"[0:v][1:v]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2+200[outv]\"\n        }\n    ],\n    \"outputs\": [\n        {\n            \"options\": [\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"[outv]\"\n                },\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"0:a\"\n                },\n                {\n                    \"option\": \"-c:v\",\n                    \"argument\": \"libx264\"\n                },\n                {\n                    \"option\": \"-c:a\",\n                    \"argument\": \"aac\"\n                },\n                {\n                    \"option\": \"-f\",\n                    \"argument\": \"mp4\"\n                }\n            ]\n        }\n    ],\n    \"id\": \"video-overlay\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          940,
          720
        ],
        "id": "d7f0a6bf-9542-4183-b317-9c1d5c4c2447",
        "name": "Tweet Vid"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/reaction.mp4\",\n      \"options\": []\n    },\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/skool%2Breaction.mp4\",\n      \"options\": []\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[1:v]scale=1080:1920[preScaledB];[preScaledB]scale=iw*0.45:ih*0.45[scaledB];[scaledB]drawbox=x=0:y=0:w=iw:h=ih:color=red@1:t=25[borderB];[0:v][borderB]overlay=x=500:y=950:enable='lte(t,39)'[videoOut]\"\n    },\n    {\n      \"filter\": \"[0:a][1:a]amix=inputs=2:duration=longest[audioOut]\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        { \"option\": \"-map\", \"argument\": \"[videoOut]\" },\n        { \"option\": \"-map\", \"argument\": \"[audioOut]\" },\n        { \"option\": \"-c:v\", \"argument\": \"libx264\" },\n        { \"option\": \"-c:a\", \"argument\": \"aac\" },\n        { \"option\": \"-b:a\", \"argument\": \"192k\" }\n      ]\n    }\n  ],\n  \"id\": \"recWwxk2Xnc8lxJSu\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          720
        ],
        "id": "994694a1-34e1-45cf-9d37-4f7515d33e60",
        "name": "Reaction"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/vertical%20pic%20skool.png\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"drawtext=text='Hello, World!':fontsize=70:fontcolor=white:x=(w-text_w)/2:y=(h-text_h)/2\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        {\n          \"option\": \"-frames:v\",\n          \"argument\": \"1\"\n        },\n        {\n          \"option\": \"-c:v\",\n          \"argument\": \"mjpeg\"\n        },\n        {\n          \"option\": \"-f\",\n          \"argument\": \"image2\"\n        }\n      ]\n    }\n  ],\n  \"id\": \"drawtext-no-font-example\"\n}\n\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1340,
          720
        ],
        "id": "7fa32d71-20b1-4970-a0b0-7723b939f771",
        "name": "Drawtext"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"id\": \"image_text_overlay\",\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Certificate.png\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[0:v]drawtext=text='Ved':fontsize=55:fontcolor=black:x=(w-text_w)/2:y=820[v1]\"\n    },\n    {\n      \"filter\": \"[v1]drawtext=text='Make Automation Workshop\\\\: Level 1':fontsize=30:fontcolor=black:x=(w-text_w)/2:y=1000[v2]\"\n    },\n    {\n      \"filter\": \"[v2]drawtext=text='Stephen G. Pope':fontsize=25:fontcolor=black:x=410:y=h-310[v3]\"\n    },\n    {\n      \"filter\": \"[v3]drawtext=text='9/13/24':fontsize=25:fontcolor=black:x=w-560:y=h-310[outv]\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        {\n          \"option\": \"-map\",\n          \"argument\": \"[outv]\"\n        },\n        {\n          \"option\": \"-frames:v\",\n          \"argument\": \"1\"\n        },\n        {\n          \"option\": \"-c:v\",\n          \"argument\": \"mjpeg\"\n        },\n        {\n          \"option\": \"-f\",\n          \"argument\": \"image2\"\n        }\n      ]\n    }\n  ]\n}\n\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1540,
          720
        ],
        "id": "a98db021-4665-4278-8eef-7f64b3e70efc",
        "name": "Certificate"
      },
      {
        "parameters": {
          "content": "## Media",
          "height": 280,
          "width": 1760,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          960
        ],
        "typeVersion": 1,
        "id": "36d47cc8-cbcc-4d93-820e-04421517a866",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/media/convert/mp3",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"bitrate\": \"256k\",\n    \"sample_rate\": 44100,\n    \"id\": \"five\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          140,
          1040
        ],
        "id": "e18b9bd8-bd55-4635-99eb-d9020bd3f509",
        "name": "Convert MP3"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/media/transcribe",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://console-uko80kos8wkogwc8ckwsc0ck.cloud.codegreeks.com.ng/api/v1/download-shared-object/aHR0cHM6Ly9taW5pby11a284MGtvczh3a29nd2M4Y2t3c2MwY2suY2xvdWQuY29kZWdyZWVrcy5jb20ubmcvdG9vbGtpdC9sb25ndmlkZW8_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1KNlNINTZHMjhTQ1FWNkdSN01VUiUyRjIwMjUwNTIyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDUyMlQxNjIzMTJaJlgtQW16LUV4cGlyZXM9NDMyMDAmWC1BbXotU2VjdXJpdHktVG9rZW49ZXlKaGJHY2lPaUpJVXpVeE1pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhZMk5sYzNOTFpYa2lPaUpLTmxOSU5UWkhNamhUUTFGV05rZFNOMDFWVWlJc0ltVjRjQ0k2TVRjME56azNNekF4TXl3aWNHRnlaVzUwSWpvaVEzcGlNRnAxZFRKcU9XZERNa1ZPZUNKOS5hSHRwbmxFSDRpanp0NU5IWFNFQUxKdkUxWG5VR1oyb1l4R3R1UGhaOXo4V0J4WTRka0hqUU5pTkc2azdyNXVOQy1UdkFrM1EwTUJjQ3JiWUdkYUs4ZyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmdmVyc2lvbklkPW51bGwmWC1BbXotU2lnbmF0dXJlPWMyZjY3MjU5ZWM1YTY4MjhhYzMyNmEyYmFmMWQ2OTQwZDIwMzA1N2QzYTc2YzgzMTRkYWJlNWQ4YmQ5OGVjZWY\",\n    \"task\": \"transcribe\",\n    \"include_text\": true,\n    \"include_srt\": true,\n    \"response_type\": \"direct\",\n    \"language\": \"en\",\n    \"words_per_line\": 4\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          340,
          1040
        ],
        "id": "da6d1945-4108-4e90-a953-30ea413920bd",
        "name": "Transcribe",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/media/silence",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"duration\": 0.1\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          540,
          1040
        ],
        "id": "771e47f9-2763-4547-b9a8-c4e6d86d9f33",
        "name": "Silence"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/BETA/media/download",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://www.tiktok.com/@stephengpope/video/7496166998871739694\",\n    \"thumbnails\": {\n        \"download\": true\n    }\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          740,
          1040
        ],
        "id": "9cd2880e-84a3-4683-99ab-7c342bb5b7f7",
        "name": "Donwload (BETA)",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/media/convert",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"format\": \"mp3\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          940,
          1040
        ],
        "id": "d4ea43eb-678c-4902-93d1-dbfeadee007b",
        "name": "Convert",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "content": "## Image",
          "height": 280,
          "width": 340,
          "color": 3
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          1280
        ],
        "typeVersion": 1,
        "id": "1cb5f333-c0e1-49ba-9193-57cbacf34817",
        "name": "Sticky Note4"
      },
      {
        "parameters": {
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          140,
          80
        ],
        "id": "ccad19de-5253-4e3f-b684-2439cd1d946b",
        "name": "Authenticate",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/toolkit/test",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          340,
          80
        ],
        "id": "f25dc988-723e-4e2c-8377-ac6f9a3d44ee",
        "name": "Test",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/image/convert/video",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"image_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Image.png\",\n    \"length\": 10,\n    \"frame_rate\": 25,\n    \"zoom_speed\": 6,\n    \"id\": \"local-extract\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          140,
          1360
        ],
        "id": "4d6d4d95-95d0-4ef9-9afb-01f7b9dde532",
        "name": "Convert Video",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "content": "## Code",
          "height": 280,
          "width": 300
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          380,
          1280
        ],
        "typeVersion": 1,
        "id": "c927b3c9-619f-4de3-ad29-74f85f23add6",
        "name": "Sticky Note5"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/code/execute/python",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"code\": \"# Initial array of titles\\ntitles = [\\n    {\\\"title\\\": \\\"how i learned to code in 24 hours straight\\\"},\\n    {\\\"title\\\": \\\"making the perfect pizza at 3am\\\"},\\n    {\\\"title\\\": \\\"i survived on $1 food for a week\\\"},\\n    {\\\"title\\\": \\\"trying weird food combinations you suggested\\\"},\\n    {\\\"title\\\": \\\"we bought everything in the store challenge\\\"},\\n    {\\\"title\\\": \\\"my morning routine 2024 updated\\\"},\\n    {\\\"title\\\": \\\"exploring abandoned mansion gone wrong\\\"},\\n    {\\\"title\\\": \\\"pranking my roommate they moved out\\\"},\\n    {\\\"title\\\": \\\"what i eat in a day as a chef\\\"},\\n    {\\\"title\\\": \\\"building a treehouse in one day\\\"},\\n    {\\\"title\\\": \\\"i lived in a tiny house for 30 days\\\"},\\n    {\\\"title\\\": \\\"transforming my backyard into a water park\\\"},\\n    {\\\"title\\\": \\\"cooking every recipe in grandma's cookbook\\\"},\\n    {\\\"title\\\": \\\"learning 10 languages in 10 months\\\"},\\n    {\\\"title\\\": \\\"ultimate gaming setup tour 2024\\\"},\\n    {\\\"title\\\": \\\"surviving in the wilderness for 48 hours\\\"},\\n    {\\\"title\\\": \\\"turning my car into a mobile office\\\"},\\n    {\\\"title\\\": \\\"i bought everything facebook advertised to me\\\"},\\n    {\\\"title\\\": \\\"secret menu items at famous restaurants\\\"},\\n    {\\\"title\\\": \\\"surprising my parents with their dream vacation\\\"},\\n    {\\\"title\\\": \\\"extreme room makeover on a budget\\\"},\\n    {\\\"title\\\": \\\"trying every item at mcdonalds in one day\\\"},\\n    {\\\"title\\\": \\\"building a robot that does my homework\\\"},\\n    {\\\"title\\\": \\\"living on a boat for a month\\\"},\\n    {\\\"title\\\": \\\"testing viral tiktok life hacks\\\"},\\n    {\\\"title\\\": \\\"transforming my garage into a movie theater\\\"},\\n    {\\\"title\\\": \\\"cooking with random ingredients challenge\\\"},\\n    {\\\"title\\\": \\\"visiting every state in 50 days\\\"},\\n    {\\\"title\\\": \\\"making a dress from recycled materials\\\"},\\n    {\\\"title\\\": \\\"i followed a victorian schedule for a week\\\"},\\n    {\\\"title\\\": \\\"turning my basement into an arcade\\\"},\\n    {\\\"title\\\": \\\"trying every coffee drink at starbucks\\\"},\\n    {\\\"title\\\": \\\"building a treehouse mansion for my dog\\\"},\\n    {\\\"title\\\": \\\"learning to skateboard in 24 hours\\\"},\\n    {\\\"title\\\": \\\"extreme grocery shopping challenge\\\"},\\n    {\\\"title\\\": \\\"converting my van into a tiny home\\\"},\\n    {\\\"title\\\": \\\"making a song using only kitchen sounds\\\"},\\n    {\\\"title\\\": \\\"reading 100 books in 100 days\\\"},\\n    {\\\"title\\\": \\\"training for a marathon in 30 days\\\"},\\n    {\\\"title\\\": \\\"living without technology for a week\\\"},\\n    {\\\"title\\\": \\\"cooking breakfast with my eyes closed\\\"},\\n    {\\\"title\\\": \\\"building a secret underground bunker\\\"},\\n    {\\\"title\\\": \\\"trying every ice cream flavor in my city\\\"},\\n    {\\\"title\\\": \\\"making clothes from dollar store items\\\"},\\n    {\\\"title\\\": \\\"transforming my attic into a gaming room\\\"},\\n    {\\\"title\\\": \\\"surviving on instant noodles for a month\\\"},\\n    {\\\"title\\\": \\\"building a miniature city in my backyard\\\"},\\n    {\\\"title\\\": \\\"learning to juggle chainsaws blindfolded\\\"},\\n    {\\\"title\\\": \\\"exploring abandoned theme park at night\\\"},\\n    {\\\"title\\\": \\\"making a gourmet meal in a microwave\\\"}\\n]\\n\\n# Update the titles in the array\\nfor i in range(len(titles)):\\n    titles[i][\\\"title\\\"] = \\\" \\\".join(word.capitalize() for word in titles[i][\\\"title\\\"].split())\\n\\nreturn titles\",\n    \"timeout\": 30\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          480,
          1360
        ],
        "id": "167bd96f-7d12-4856-a289-b2fbb252ab75",
        "name": "Execute Python",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "content": "## S3 Upload",
          "height": 280,
          "width": 300,
          "color": 2
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          720,
          1280
        ],
        "typeVersion": 1,
        "id": "e95b9d50-d987-4894-9059-aee08757af52",
        "name": "Sticky Note6"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/s3/upload",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"id\": \"media\",\n    \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"filename\": \"vertical Video.png\",\n    \"public\": true\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          820,
          1360
        ],
        "id": "7b6a43fa-7fa2-47ed-be46-f6b4c6ee954c",
        "name": "Upload S3"
      },
      {
        "parameters": {
          "content": "## Audio",
          "height": 280,
          "width": 300,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1060,
          1280
        ],
        "typeVersion": 1,
        "id": "43160093-6861-4eef-97df-cbb11edafa00",
        "name": "Sticky Note7"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/audio/concatenate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"audio_urls\":[\n        {\"audio_url\":\"https://storage.googleapis.com/sgplabs-general-storage/I'm%20Back.mp3\"},\n        {\"audio_url\":\"https://storage.googleapis.com/sgplabs-general-storage/I'm%20Back.mp3\"}\n    ],\n    \"id\": \"2323\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1160,
          1360
        ],
        "id": "4fa03f5a-f223-43af-b371-539b5689161c",
        "name": "Concatenate Audio",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/media/metadata",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          1040
        ],
        "id": "c6c32f83-0506-4cb9-9593-50cc6f9acd9d",
        "name": "metadata (video)",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/media/metadata",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://sgp-labs.nyc3.digitaloceanspaces.com/sgp-labs/b58e5b92-e4c5-431c-83f6-62dce70c90a8.mp3\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1340,
          1040
        ],
        "id": "d0e900e6-53ec-4207-ba4e-b6c32b643532",
        "name": "metadata (Audio)"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/video/split",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n  \"splits\": [\n    {\n      \"start\": \"00:00:01\",\n      \"end\": \"00:00:02\"\n    },\n    {\n      \"start\": \"00:00:03\",\n      \"end\": \"00:00:05\"\n    }\n  ]\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          940,
          400
        ],
        "id": "0da5de10-1145-46a7-85bc-8172f0c7a28f",
        "name": "Split Video"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/video/cut",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n  \"cuts\": [\n    {\n      \"start\": \"00:00:01\",\n      \"end\": \"00:00:02\"\n    },\n    {\n      \"start\": \"00:00:03\",\n      \"end\": \"00:00:05\"\n    }\n  ]\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          740,
          400
        ],
        "id": "f9694562-dadd-4f8a-b12f-3d633a112302",
        "name": "Cut Video"
      },
      {
        "parameters": {
          "content": "## Webhooks",
          "height": 280,
          "width": 360,
          "color": 7
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1400,
          1280
        ],
        "typeVersion": 1,
        "id": "a7ca4efb-0eff-4f45-ab50-fbbcefdcf1cb",
        "name": "Sticky Note9"
      },
      {
        "parameters": {
          "content": "## Background + Polling",
          "height": 460,
          "width": 1760,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          1600
        ],
        "typeVersion": 1,
        "id": "8036ecc9-e795-4270-8a79-2c3d34fa9dc1",
        "name": "Sticky Note10"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/video/caption",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"video_url\": \"https://console-uko80kos8wkogwc8ckwsc0ck.cloud.codegreeks.com.ng/api/v1/download-shared-object/aHR0cHM6Ly9taW5pby11a284MGtvczh3a29nd2M4Y2t3c2MwY2suY2xvdWQuY29kZWdyZWVrcy5jb20ubmcvdG9vbGtpdC9sb25ndmlkZW8_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1WVTJCNzZBSVQxVjdLU0Q0WVpMMCUyRjIwMjUwNTA5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDUwOVQwMjIxMDFaJlgtQW16LUV4cGlyZXM9NDMyMDAmWC1BbXotU2VjdXJpdHktVG9rZW49ZXlKaGJHY2lPaUpJVXpVeE1pSXNJblI1Y0NJNklrcFhWQ0o5LmV5SmhZMk5sYzNOTFpYa2lPaUpXVlRKQ056WkJTVlF4VmpkTFUwUTBXVnBNTUNJc0ltVjRjQ0k2TVRjME5qYzVPVFV4T0N3aWNHRnlaVzUwSWpvaVEzcGlNRnAxZFRKcU9XZERNa1ZPZUNKOS53T3AweG13dVhqUjNrelpVY0FxNkF5UUN0M1Z1NFZGVDBBcGFjaVRtNEo2REs3VUMzUmx3Z2luZmFtN0tDNno4WWJNN3ZhS1BQb0hNaGZDRjRjN0wzZyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmdmVyc2lvbklkPW51bGwmWC1BbXotU2lnbmF0dXJlPTJjYWM5ZmIzMGI3ODFkYjBmN2Q0OGQ0ZTE5NmYzZWQzNGI1ZWE5ZjY1MjVlZGZhOGZkYTAwMDRkNzBkN2ViMDc\",\n  \"settings\": {\n    \"line_color\": \"#FFFFFF\",\n    \"word_color\": \"#f59b42\",\n    \"all_caps\": false,\n    \"max_words_per_line\": 3,\n    \"font_size\": 60,\n    \"bold\": false,\n    \"italic\": false,\n    \"underline\": false,\n    \"strikeout\": false,\n    \"outline_width\": 3,\n    \"shadow_offset\": 4,\n    \"style\": \"highlight\",\n    \"font_family\": \"The Bold Font\",\n    \"position\": \"bottom_center\"\n  },\n  \"id\": \"gdrive-five\",\n  \"webhook_url\": \"\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          480,
          1720
        ],
        "id": "16b9cbd8-331c-48fd-946d-2a300b702ddd",
        "name": "Caption1",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/toolkit/job/status",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"job_id\": \"{{ $('Caption1').item.json.job_id}}\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          820,
          1720
        ],
        "id": "f2198037-0083-4642-a90a-0e268f22b0e7",
        "name": "Job Status",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "amount": 2
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          1520,
          1840
        ],
        "id": "3f2080af-5fbc-436a-b840-0ad3a504a695",
        "name": "Wait",
        "webhookId": "67d2a671-d870-4dfb-8265-4a9c4a703a30"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "1bd32662-74ef-4c9f-84fa-6d6687056da3",
                "leftValue": "={{ $json.response.job_status }}",
                "rightValue": "done",
                "operator": {
                  "type": "string",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          1160,
          1720
        ],
        "id": "a9f5c166-0fb7-4211-87ab-8da1cd6be9db",
        "name": "If"
      },
      {
        "parameters": {
          "url": "={{ $('Job Status').item.json.response.response.response }}",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1520,
          1680
        ],
        "id": "97097b12-a8dd-469e-b401-1526b35df44a",
        "name": "Download File"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/audio/concatenate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"audio_urls\":[\n        {\"audio_url\":\"https://storage.googleapis.com/sgplabs-general-storage/I'm%20Back.mp3\"},\n        {\"audio_url\":\"https://storage.googleapis.com/sgplabs-general-storage/I'm%20Back.mp3\"}\n    ],\n    \"id\": \"2323\",\n    \"webhook_url\": \"https://sgplabs.app.n8n.cloud/webhook-test/8e468964-bef8-4e97-a65f-5674280f6788\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1520,
          1360
        ],
        "id": "8325b8f7-8de3-49a3-a41f-88c2399e6ef2",
        "name": "Concatenate Audio1",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"since_seconds\": 600\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          540,
          80
        ],
        "id": "c04edee5-e87b-499f-88d7-a9cda75eb0fc",
        "name": "Jobs Status",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"job_id\": \"01998a29-457e-4c5b-9204-90e602fe8e3c\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          740,
          80
        ],
        "id": "7b82e7cc-a828-4d19-a14a-0722bbae2c1b",
        "name": "Job Status1",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/video/trim",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"start\": \"00:00:05\",\n    \"end\": \"00:00:07\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          400
        ],
        "id": "acf71332-e4f5-42f7-ac08-05995c145d28",
        "name": "Trim"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://sea-turtle-app-nlak2.ondigitalocean.app/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"\n    },\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/NCA%20Logo.png\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[1:v]scale=150:150[logo];[0:v][logo]overlay=x=50:y=main_h-overlay_h-50\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        { \"option\": \"-f\", \"argument\": \"mp4\" },\n        { \"option\": \"-c:v\", \"argument\": \"libx264\" }\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"thumbnail\": true,\n    \"filesize\": true,\n    \"duration\": true,\n    \"bitrate\": true\n  },\n  \"id\": \"overlay_logo\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          540,
          720
        ],
        "id": "ead932e1-6224-4616-8076-6af7973f02dc",
        "name": "Logo"
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "Transcribe",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Caption1": {
        "main": [
          [
            {
              "node": "Job Status",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Job Status": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "Download File",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "Job Status",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "0a0d03ff-951b-4760-8f78-744c84f8629c",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-03T17:12:08.272Z",
    "updatedAt": "2025-05-04T00:37:39.023Z",
    "id": "NYesWbv2bJkIwZxq",
    "name": "My workflow 9",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "public": true,
          "mode": "webhook",
          "options": {
            "allowedOrigins": "*",
            "responseMode": "responseNode"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          -240,
          20
        ],
        "id": "923331d7-c239-409a-adab-7744445110dd",
        "name": "When chat message received",
        "webhookId": "48dcfbef-6ddd-48a6-a44e-e8c652842c7f"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          200,
          220
        ],
        "id": "17c4e861-99d9-4f8a-83ce-2910bc57f1ea",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          520,
          220
        ],
        "id": "a0ce8c7c-b143-4664-9a8d-e2bd2239d787",
        "name": "Calculator"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "={{ $json.chatInput }}",
          "options": {
            "systemMessage": "=You are Code Greeks Assistant, a friendly AI consultant for Code Greeks - a software development company specializing in server setup, IT support, data analysis, automation, web scraping, and full-stack development.\n\nPERSONALITY & TONE\nBe warm, approachable, and genuinely helpful - like a knowledgeable tech friend who's excited to solve problems. Use a conversational style with:\n\nNatural language and occasional exclamations!\n\nThoughtful emojis to add personality 😊\n\nBrief paragraphs for easy reading\n\nEmpathetic responses that acknowledge feelings\n\nCasual transitions (\"By the way,\" \"Actually,\" \"Oh, and\")\n\nCONVERSATION APPROACH\nFirst Messages: Welcome new users warmly with a personalized greeting and emoji:\n\"Hi there! 👋 I'm your Code Greeks assistant. How can I help with your tech project today?\"\n\nOngoing Conversations: Continue naturally without reintroductions, maintaining context like a human would.\n\nProblem Solving: Show empathy first (\"That sounds frustrating!\"), then ask specific questions to understand their situation better.\n\nLanguage Matching: If a customer writes in Pidgin English, respond in Pidgin English too.\n\nSERVICE FOCUS\nAlways keep responses relevant to Code Greeks' services. If someone asks about unrelated topics, gently steer the conversation back to how we can help with:\n\nServer setup and management\n\nIT support and troubleshooting\n\nData analysis and visualization\n\nAutomation solutions\n\nWeb scraping and data collection\n\nFull-stack development projects\n\nEMAIL TROUBLESHOOTING\nFor email issues, be friendly but thorough:\n\"Email troubles can be so annoying! Let's sort this out together. Could you tell me what email service you're using, any error messages you're seeing, and which addresses aren't working? Have you noticed any patterns with what's working versus what isn't?\"\n\nPRICING GUIDANCE\nWhen discussing costs, be transparent in a conversational way:\n\nEmail/SMTP server setup: $50 (₦80,000) - quick and straightforward\n\nServerless API development: From $100 (₦160,000), depending on your needs\n\nWordPress website: $150 (₦240,000) with $50 (₦80,000)/year maintenance\n\nE-commerce website: $190 (₦304,000) + $50 (₦80,000)/year to keep things running smoothly\n\nE-commerce with AI agent: $200 (₦320,000) + $30 (₦48,000)/month for basic support\n\nFor larger projects (over $1000): \"For something this size, we'd love to have a proper chat to understand exactly what you need. There's a small $15 booking fee to reserve time with our specialist, which gets applied to your project when we start.\"\n\nPROJECT FEASIBILITY ASSESSMENT\nAlways evaluate if a client's budget aligns with the minimum viable cost for their requested project based on standard industry pricing:\n\nIf a client's budget is below the minimum required cost (e.g., offering $10-50 for a blog site that requires at least $120 for domain and hosting), politely explain why the project isn't feasible at that budget.\n\nProvide a breakdown of minimum costs (domain, hosting, development) to educate the client.\n\nOffer alternatives such as:\n\nA revised budget recommendation that would make the project viable\n\nA phased approach starting with just the essentials\n\nFree or lower-cost alternatives that might meet their immediate needs\n\nIf the budget gap is too large to bridge, respectfully decline the project rather than compromising on quality or sustainability.\n\nSPECIALIZED SERVICES\nWhen discussing specialized services, highlight value before mentioning price:\n\nWeb Scraping: \"We can automatically gather the exact data you need, typically $450-1000/month depending on complexity and volume\"\n\nData Analysis: \"We'll transform your raw data into insights you can actually use, usually $5,000-15,000 for small business solutions\"\n\nAI Automation: \"We can build custom AI assistants to handle repetitive tasks, starting at just $50-100/month\"\n\nCLIENT INFORMATION CAPTURE\nYou have access to tools to capture user information fields including:\n\nname\n\nemail\n\nphone number\n\nproject\n\nbudget\n\nPlease record correctly to their fields and capture in detail the project requirements and store in the project field.\n\nAlways capture and acknowledge client information when provided. When a client shares their details:\n\nImmediately acknowledge receipt of their information\n\nConfirm what you've recorded (name, email, phone, project details, budget)\n\nStore this information correctly\n\nNever ask for information they've already provided\n\nContinue the conversation naturally based on the information shared\n\nFor example: \"Thanks for sharing your contact details! I've noted your email (example@email.com), phone number (1234567890), and budget ($XX). Now, about your project requirements...\"\n\nESCALATION APPROACH\nIf expert help is needed: \"This might need our specialist's touch. They could solve your [specific issue] for about [price]. Would that work for you?\"\n\nIf they agree: \"Perfect! I just need your email and phone number so our specialist can reach out directly. They'll focus specifically on solving this issue without any scope creep!\"\n\nRemember: Be genuinely helpful and human. Talk like you're having coffee with a friend, not reading from a script. Show real interest in their problems and excitement about helping them find solutions."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.9,
        "position": [
          220,
          0
        ],
        "id": "42270775-0172-4f6d-a8b5-f0d84f7779d7",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "contextWindowLength": 50
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          320,
          220
        ],
        "id": "372d48df-80a5-4c94-8666-0d6146f9a549",
        "name": "Simple Memory"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.2,
        "position": [
          580,
          20
        ],
        "id": "540a6988-27c9-4eae-adfe-86fa489d47e0",
        "name": "Respond to Webhook"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "version": 2,
              "leftValue": "",
              "caseSensitive": true,
              "typeValidation": "strict"
            },
            "combinator": "and",
            "conditions": [
              {
                "id": "158a0b91-534d-4745-b10e-8a7c97050861",
                "operator": {
                  "type": "string",
                  "operation": "exists",
                  "singleValue": true
                },
                "leftValue": "={{ $json.chatInput }}",
                "rightValue": ""
              }
            ]
          },
          "options": {}
        },
        "id": "fdeb305a-0c67-4f9a-8a63-e7fdc16b97ce",
        "name": "If",
        "type": "n8n-nodes-base.if",
        "position": [
          -20,
          40
        ],
        "typeVersion": 2.2
      },
      {
        "parameters": {
          "respondWith": "json",
          "responseBody": "{\n  \"output\": \"Hi, how can I help you today?\"\n}",
          "options": {}
        },
        "id": "34d1b994-0e55-4f7f-b53b-37300cd570d3",
        "name": "Respond With Initial Message",
        "type": "n8n-nodes-base.respondToWebhook",
        "position": [
          -160,
          280
        ],
        "typeVersion": 1.1
      },
      {
        "parameters": {
          "descriptionType": "manual",
          "toolDescription": "Logs User name ,email,phone number ,project if any ,and budget\nyou have access to tools nocode db \nwith feild name,email,project,budget",
          "authentication": "nocoDbApiToken",
          "operation": "create",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "m2kxae66p5szntb",
          "fieldsUi": {
            "fieldValues": [
              {
                "fieldName": "name",
                "fieldValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldValues0_Field_Value', ``, 'string') }}"
              },
              {
                "fieldName": "email",
                "fieldValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldValues1_Field_Value', ``, 'string') }}"
              },
              {
                "fieldName": "phone number",
                "fieldValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldValues2_Field_Value', ``, 'string') }}"
              },
              {
                "fieldName": "project",
                "fieldValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldValues3_Field_Value', ``, 'string') }}"
              },
              {
                "fieldName": "budget",
                "fieldValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldValues4_Field_Value', ``, 'string') }}"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.nocoDbTool",
        "typeVersion": 3,
        "position": [
          400,
          440
        ],
        "id": "a60c59f3-4cd9-45ee-914d-a2923db0d75f",
        "name": "NocoDB",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      }
    ],
    "connections": {
      "When chat message received": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Calculator": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Respond With Initial Message",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "NocoDB": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "94052811-e3c1-4060-ac5b-f9e212330aa7",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-05-11T06:20:18.546Z",
    "updatedAt": "2025-05-11T06:22:24.918Z",
    "id": "cpM3YP3BGYppQG5R",
    "name": "My workflow 14",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -180,
          0
        ],
        "id": "505c5151-8dfe-40bb-ab59-67a686e3176b",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "11c9a731-cae3-4800-ab54-18f81f30618c",
                "name": "chat",
                "value": "/evilgpt",
                "type": "string"
              },
              {
                "id": "e34d4fff-8ecb-47bf-96ae-9a43743ece87",
                "name": "evil",
                "value": "ok",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          20,
          0
        ],
        "id": "56467ea3-ace8-4b2e-9c1b-c1c475fb45ae",
        "name": "Edit Fields"
      },
      {
        "parameters": {
          "rules": {
            "values": [
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "leftValue": "={{ $json.chat }}",
                      "rightValue": "evilgpt",
                      "operator": {
                        "type": "string",
                        "operation": "contains"
                      },
                      "id": "8ea3420f-344f-496a-b51e-bcd8a1302b41"
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "evil"
              },
              {
                "conditions": {
                  "options": {
                    "caseSensitive": true,
                    "leftValue": "",
                    "typeValidation": "strict",
                    "version": 2
                  },
                  "conditions": [
                    {
                      "id": "25e6e982-8eab-494a-8a98-037861d06dfd",
                      "leftValue": "={{ $json.chat }}",
                      "rightValue": "evilgpt",
                      "operator": {
                        "type": "string",
                        "operation": "notContains"
                      }
                    }
                  ],
                  "combinator": "and"
                },
                "renameOutput": true,
                "outputKey": "others"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.switch",
        "typeVersion": 3.2,
        "position": [
          240,
          0
        ],
        "id": "725583b4-63ed-4ebd-8e70-f295317d8455",
        "name": "Switch"
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Fields": {
        "main": [
          [
            {
              "node": "Switch",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "14f3b608-2bc6-4500-a403-dea9ea0faa2e",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-03-27T07:32:46.379Z",
    "updatedAt": "2025-06-07T22:43:06.131Z",
    "id": "Ye9NYghNif2M64ZL",
    "name": "Backup workflow and Auth",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "rule": {
            "interval": [
              {}
            ]
          }
        },
        "id": "dd97866c-92e2-40dd-a2a8-b5f0cd93c999",
        "name": "Schedule Trigger",
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.1,
        "position": [
          40,
          60
        ]
      },
      {
        "parameters": {
          "url": "=https://api.n8n.io/api/versions/{{ $json[\"Current Version\"] }}",
          "options": {}
        },
        "id": "afddedfe-5980-4740-b18b-379e673d8c37",
        "name": "Check update",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.1,
        "position": [
          1140,
          140
        ]
      },
      {
        "parameters": {
          "command": "n8n export:credentials --all --decrypted"
        },
        "id": "2200a40c-6167-48e1-8f35-982ff55b6e67",
        "name": "Export credentials",
        "type": "n8n-nodes-base.executeCommand",
        "typeVersion": 1,
        "position": [
          780,
          440
        ]
      },
      {
        "parameters": {
          "command": "n8n export:workflow --all"
        },
        "id": "19742ac2-148f-4050-a670-8efdf09e8529",
        "name": "Export Workflows",
        "type": "n8n-nodes-base.executeCommand",
        "typeVersion": 1,
        "position": [
          1340,
          440
        ]
      },
      {
        "parameters": {
          "amount": 2,
          "unit": "minutes"
        },
        "id": "9b49993e-ef2b-4207-864e-8a2e1e71d3cc",
        "name": "Wait",
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1,
        "position": [
          1440,
          680
        ],
        "webhookId": "5e3da657-901b-4f74-804b-d469d879b6bc",
        "notesInFlow": true,
        "notes": "Waiting 5 Minutes"
      },
      {
        "parameters": {
          "url": "={{ $('Config Node').item.json[\"Coolify webhook URL\"].match(/(?:https?:\\/\\/)?([^\\/]+)\\/api\\/v([^\\/?]+)\\/([^\\/?]+)/)[0] }}?uuid={{ $('Config Node').item.json[\"Coolify webhook URL\"].match(/uuid=([^&]+)/)[1] }}&force=true",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Authorization",
                "value": "={{ $('Config Node').item.json[\"Coolify API Token\"] }}"
              }
            ]
          },
          "options": {
            "allowUnauthorizedCerts": true,
            "redirect": {
              "redirect": {}
            },
            "response": {
              "response": {
                "fullResponse": true
              }
            }
          }
        },
        "id": "7fb4e6f3-bda6-42e1-8c0c-54f3653d8018",
        "name": "Update N8N Docker",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.1,
        "position": [
          1200,
          680
        ]
      },
      {
        "parameters": {
          "errorMessage": "=There's Error with sending backup files. check the workflow {{ $workflow.name }} telegram fileds if everything okay, post an issue in community.n8n.io with mention the creator of template."
        },
        "id": "292a5e24-47a4-4d3f-bc23-6083c3d97af1",
        "name": "Stop and Error",
        "type": "n8n-nodes-base.stopAndError",
        "typeVersion": 1,
        "position": [
          940,
          740
        ]
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict"
            },
            "conditions": [
              {
                "id": "80c3a935-8b28-40cf-9b43-854b0ae81a1d",
                "leftValue": "={{ $json.name }}",
                "rightValue": "",
                "operator": {
                  "type": "string",
                  "operation": "exists",
                  "singleValue": true
                }
              },
              {
                "id": "364c15d7-3916-4d75-bd59-12ca1cc4a3de",
                "leftValue": "={{ $('Current Version').item.json[\"Current Version\"] }}",
                "rightValue": "={{ $json.name }}",
                "operator": {
                  "type": "string",
                  "operation": "notEquals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "id": "dcf59669-fc05-44a5-ab39-1222edb1b26c",
        "name": "New Update ?",
        "type": "n8n-nodes-base.if",
        "typeVersion": 2,
        "position": [
          1280,
          140
        ]
      },
      {
        "parameters": {},
        "id": "cd7e3bf4-5eaa-419e-976a-2a562b6a74e9",
        "name": "Keep newest one",
        "type": "n8n-nodes-base.limit",
        "typeVersion": 1,
        "position": [
          1460,
          200
        ]
      },
      {
        "parameters": {
          "content": "## 🔄Checking Version (Stable Version Only)",
          "height": 347.2010728253663,
          "width": 995,
          "color": 4
        },
        "id": "2a8bc7ab-84a9-4d4f-8a06-0a8eb5a318aa",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          600,
          20
        ]
      },
      {
        "parameters": {
          "content": "## ⚠️Backup",
          "height": 244.00882504495965,
          "width": 1282.25,
          "color": 3
        },
        "id": "30f27afb-2e7b-497e-9216-5c08898a4157",
        "name": "Sticky Note2",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          600,
          360
        ]
      },
      {
        "parameters": {
          "content": "## 🚪Workflow END\n_In future versions, we can enhance this section to include daily warnings and audits of N8N iinstance and send them to Telegram._",
          "height": 349.29278419309003,
          "width": 281
        },
        "id": "4c21bb7f-af89-4eb1-81ea-a353d6403978",
        "name": "Sticky Note3",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1600,
          20
        ]
      },
      {
        "parameters": {
          "content": "## 🔄Update & Deploy",
          "height": 257,
          "width": 1286.5,
          "color": 4
        },
        "id": "dbb47e72-8f1d-481d-83b2-a60c8e1d9e82",
        "name": "Sticky Note4",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          600,
          620
        ]
      },
      {
        "parameters": {
          "fields": {
            "values": [
              {
                "stringValue": "={{ $json.stdout }}"
              }
            ]
          },
          "include": "none",
          "options": {}
        },
        "id": "2069c444-6953-4880-a5ba-4b417274edc8",
        "name": "credentials",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.2,
        "position": [
          920,
          440
        ]
      },
      {
        "parameters": {
          "fields": {
            "values": [
              {
                "stringValue": "={{ $json.stdout }}"
              }
            ]
          },
          "include": "none",
          "options": {}
        },
        "id": "7a69e9a1-785c-4f75-9114-c4d5a742614b",
        "name": "Workflows",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.2,
        "position": [
          1480,
          440
        ]
      },
      {
        "parameters": {
          "operation": "toJson",
          "options": {
            "encoding": "utf8",
            "fileName": "workflows.json"
          }
        },
        "id": "2b1d45e3-0025-4313-a154-fd3bee3a0fc6",
        "name": "Workflows.json",
        "type": "n8n-nodes-base.convertToFile",
        "typeVersion": 1,
        "position": [
          1620,
          440
        ]
      },
      {
        "parameters": {
          "operation": "toJson",
          "options": {
            "encoding": "utf8",
            "fileName": "credentials.json"
          }
        },
        "id": "e35d7fb8-4724-423a-9c18-eb69e859fa7b",
        "name": "Credentials.json",
        "type": "n8n-nodes-base.convertToFile",
        "typeVersion": 1,
        "position": [
          1060,
          440
        ]
      },
      {
        "parameters": {
          "content": "## 🧠 Starting Stack\n\n‌\n‌\n‌\n‌\n‌\n‌\n‌\n## 🛠 Configuration Instructions\n\n**Ensure to properly set up the `Config Node` with the required details:**\n\n- **Telegram Chat ID:** Your unique Telegram identifier.\n\n- **Coolify Webhook URL:**\n  - Navigate to your Coolify project.\n  - Go to `Configuration` > `Webhooks`.\n  - Copy the Webhook URL.\n\n  **URL Format:** `https://yourdomain.tld/api/v1/deploy?uuid=yourUUID&force=false`\n\n- **Coolify API Token:**\n  - Access the Coolify dashboard.\n  - Select `Security` > `API Tokens`.\n  - Generate or copy your API token.\n\n  **Token Format:** `Bearer 1|bBx6dwcuY4IL05SxDvUjfFs547vOgZOJTx3Fp95rd76ff2dc`\n\nFor further details, consult the [Coolify Documentation](https://coolify.io/docs/api/authentication).\n\n*Accuracy in these configurations is crucial for the workflow's functionality.*\n\n\n- **Please Note**:-\nWith `CLI Mode` There's no need to setup N8N Instance host. `This workflow template tested on Hetzner Server with Coolify V4 & N8N 1.26.0 using this` [configuration](https://n8n.nskha.com/?page=2da9583d-5663-416c-a52b-84c20924e8e6)",
          "height": 867.757111289927,
          "width": 593.0470569201318
        },
        "id": "53e912c8-7775-45ff-b7b2-b2601a407730",
        "name": "Enhanced Configuration Guide",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          0
        ]
      },
      {
        "parameters": {
          "command": "n8n --version"
        },
        "id": "944f63f0-fb13-4fcd-9111-97ac1fb4bdc9",
        "name": "CLI Check Version",
        "type": "n8n-nodes-base.executeCommand",
        "typeVersion": 1,
        "position": [
          680,
          80
        ]
      },
      {
        "parameters": {
          "url": "=https://{{ $item(\"0\").$node[\"Config Node\"].json[\"N8N Instance (domain or IP:PORT)\"] }}/rest/settings",
          "sendHeaders": true,
          "headerParameters": {
            "parameters": [
              {
                "name": "Accept",
                "value": "application/json, text/plain, */*"
              },
              {
                "name": "Accept-Language",
                "value": "en-US,en;q=0.5"
              },
              {
                "name": "Accept-Encoding",
                "value": "gzip, deflate, br"
              },
              {
                "name": "sessionid",
                "value": "fwstbgvkd4"
              },
              {
                "name": "User-Agent",
                "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0"
              },
              {
                "name": "DNT",
                "value": "1"
              },
              {
                "name": "Connection",
                "value": "keep-alive"
              },
              {
                "name": "Referer",
                "value": "=https://{{ $item(\"0\").$node[\"Config Node\"].json[\"N8N Instance (domain or IP:PORT)\"] }}/settings/usage"
              },
              {
                "name": "Sec-Fetch-Dest",
                "value": "empty"
              },
              {
                "name": "Sec-Fetch-Mode",
                "value": "cors"
              },
              {
                "name": "Sec-Fetch-Site",
                "value": "same-origin"
              },
              {
                "name": "Sec-GPC",
                "value": "1"
              },
              {
                "name": "Pragma",
                "value": "no-cache"
              },
              {
                "name": "Cache-Control",
                "value": "no-cache"
              },
              {
                "name": "TE",
                "value": "trailers"
              }
            ]
          },
          "options": {
            "allowUnauthorizedCerts": true,
            "redirect": {
              "redirect": {}
            }
          }
        },
        "id": "df04c819-ad23-4592-a10a-74ee364d6eb1",
        "name": "HTTP Check Version",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.1,
        "position": [
          680,
          220
        ]
      },
      {
        "parameters": {
          "fieldsToAggregate": {
            "fieldToAggregate": [
              {
                "fieldToAggregate": "data.versionCli"
              },
              {
                "fieldToAggregate": "stdout"
              }
            ]
          },
          "options": {}
        },
        "id": "0eb358c5-0b85-413e-b1e6-7ccec9a3aeb4",
        "name": "Aggregate",
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          860,
          140
        ]
      },
      {
        "parameters": {
          "fields": {
            "values": [
              {
                "name": "Current Version",
                "stringValue": "={{ $('Aggregate').item.json.stdout[0] || $('Aggregate').item.json.versionCli[0] }}"
              }
            ]
          },
          "include": "none",
          "options": {}
        },
        "id": "844c362a-e875-4fa5-870d-eade6c6fbcfb",
        "name": "Current Version",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.2,
        "position": [
          1000,
          140
        ]
      },
      {
        "parameters": {},
        "id": "44339626-b876-4b20-9eb2-05ca911d1aaf",
        "name": "No Operation",
        "type": "n8n-nodes-base.noOp",
        "typeVersion": 1,
        "position": [
          1680,
          160
        ]
      },
      {
        "parameters": {
          "fields": {
            "values": [
              {
                "name": "Working Method (CLI choose 1 - HTTP chose 2)",
                "type": "numberValue",
                "numberValue": "1"
              },
              {
                "name": "N8N Instance (domain or IP:PORT)",
                "stringValue": "n8n.cloud.codegreeks.com.ng"
              },
              {
                "name": "telegram chat id",
                "stringValue": "<Your Telegram Chat ID Here>"
              },
              {
                "name": "Coolify webhook URL",
                "stringValue": "<Your Coolify Container Webhook URL Here>"
              },
              {
                "name": "Coolify API Token",
                "stringValue": "<Your Coolify API Including Bearer Here>"
              }
            ]
          },
          "options": {}
        },
        "id": "d43b9845-cb25-4a83-bb6b-d10f44695943",
        "name": "Config Node",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.2,
        "position": [
          240,
          60
        ]
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 1
            },
            "conditions": [
              {
                "id": "b7cc519c-aef2-422a-9721-9acf332c31e3",
                "leftValue": "={{ $json['Working Method (CLI choose 1 - HTTP chose 2)'] }}",
                "rightValue": 2,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "id": "5d5a383f-af53-412f-9c8a-7e8bf43ff648",
        "name": "CLI or HTTP",
        "type": "n8n-nodes-base.if",
        "typeVersion": 2,
        "position": [
          440,
          60
        ]
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict"
            },
            "conditions": [
              {
                "id": "042d1800-392d-48be-9ad5-9dcba11fdc2c",
                "leftValue": "={{ $item(\"0\").$node[\"Step2 Notify \"].json[\"ok\"] }}",
                "rightValue": "ok",
                "operator": {
                  "type": "boolean",
                  "operation": "true",
                  "singleValue": true
                }
              },
              {
                "id": "c3da1e84-b3d5-4ba7-a695-3f48ea662207",
                "leftValue": "={{ $item(\"0\").$node[\"Step3 Notify \"].json[\"ok\"] }}",
                "rightValue": "",
                "operator": {
                  "type": "boolean",
                  "operation": "true",
                  "singleValue": true
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "id": "cb3918b4-50e4-4595-a426-89adfec73157",
        "name": "Checking if files backed up 👆 ",
        "type": "n8n-nodes-base.if",
        "typeVersion": 2,
        "position": [
          640,
          700
        ]
      }
    ],
    "connections": {
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "Config Node",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check update": {
        "main": [
          [
            {
              "node": "New Update ?",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Export credentials": {
        "main": [
          [
            {
              "node": "credentials",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Export Workflows": {
        "main": [
          [
            {
              "node": "Workflows",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "No Operation",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Update N8N Docker": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "New Update ?": {
        "main": [
          [
            {
              "node": "Keep newest one",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "No Operation",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Keep newest one": {
        "main": [
          [
            {
              "node": "Export credentials",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "credentials": {
        "main": [
          [
            {
              "node": "Credentials.json",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Workflows": {
        "main": [
          [
            {
              "node": "Workflows.json",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Workflows.json": {
        "main": [
          [
            {
              "node": "Checking if files backed up 👆 ",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Credentials.json": {
        "main": [
          [
            {
              "node": "Export Workflows",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "CLI Check Version": {
        "main": [
          [
            {
              "node": "Aggregate",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Check Version": {
        "main": [
          [
            {
              "node": "Aggregate",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate": {
        "main": [
          [
            {
              "node": "Current Version",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Current Version": {
        "main": [
          [
            {
              "node": "Check update",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Config Node": {
        "main": [
          [
            {
              "node": "CLI or HTTP",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "CLI or HTTP": {
        "main": [
          [
            {
              "node": "CLI Check Version",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "HTTP Check Version",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Checking if files backed up 👆 ": {
        "main": [
          [
            {
              "node": "Update N8N Docker",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Stop and Error",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "d3a263ea-7f59-44ed-847e-a7344cbd03aa",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-08T12:47:15.026Z",
    "updatedAt": "2025-05-13T14:08:09.310Z",
    "id": "G9tw8bgvRw9LC723",
    "name": "NCA",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "c9f9fa15-1d63-4b44-a679-539849abfe75",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/video/caption",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"video_url\": \"https://tc8wsgkgcso88s80o8wcc00o.cloud.codegreeks.com.ng/v1/download/tmp7o01ar0o.mp3\",\n  \"settings\": {\n    \"line_color\": \"#FFFFFF\",\n    \"word_color\": \"#FFFF00\",\n    \"all_caps\": false,\n    \"max_words_per_line\": 3,\n    \"font_size\": 60,\n    \"bold\": false,\n    \"italic\": false,\n    \"underline\": false,\n    \"strikeout\": false,\n    \"outline_width\": 3,\n    \"shadow_offset\": 4,\n    \"style\": \"highlight\",\n    \"font_family\": \"The Bold Font\",\n    \"position\": \"bottom_center\"\n  },\n  \"id\": \"gdrive-five\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          260,
          -40
        ],
        "id": "26d190cb-f4fe-4136-bc62-4fe311701619",
        "name": "Caption",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        },
        "disabled": true
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/code/execute/python",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"code\": \"# Initial array of titles\\ntitles = [\\n    {\\\"title\\\": \\\"how i learned to code in 24 hours straight\\\"},\\n    {\\\"title\\\": \\\"making the perfect pizza at 3am\\\"},\\n    {\\\"title\\\": \\\"i survived on $1 food for a week\\\"},\\n    {\\\"title\\\": \\\"trying weird food combinations you suggested\\\"},\\n    {\\\"title\\\": \\\"we bought everything in the store challenge\\\"},\\n    {\\\"title\\\": \\\"my morning routine 2024 updated\\\"},\\n    {\\\"title\\\": \\\"exploring abandoned mansion gone wrong\\\"},\\n    {\\\"title\\\": \\\"pranking my roommate they moved out\\\"},\\n    {\\\"title\\\": \\\"what i eat in a day as a chef\\\"},\\n    {\\\"title\\\": \\\"building a treehouse in one day\\\"},\\n    {\\\"title\\\": \\\"i lived in a tiny house for 30 days\\\"},\\n    {\\\"title\\\": \\\"transforming my backyard into a water park\\\"},\\n    {\\\"title\\\": \\\"cooking every recipe in grandma's cookbook\\\"},\\n    {\\\"title\\\": \\\"learning 10 languages in 10 months\\\"},\\n    {\\\"title\\\": \\\"ultimate gaming setup tour 2024\\\"},\\n    {\\\"title\\\": \\\"surviving in the wilderness for 48 hours\\\"},\\n    {\\\"title\\\": \\\"turning my car into a mobile office\\\"},\\n    {\\\"title\\\": \\\"i bought everything facebook advertised to me\\\"},\\n    {\\\"title\\\": \\\"secret menu items at famous restaurants\\\"},\\n    {\\\"title\\\": \\\"surprising my parents with their dream vacation\\\"},\\n    {\\\"title\\\": \\\"extreme room makeover on a budget\\\"},\\n    {\\\"title\\\": \\\"trying every item at mcdonalds in one day\\\"},\\n    {\\\"title\\\": \\\"building a robot that does my homework\\\"},\\n    {\\\"title\\\": \\\"living on a boat for a month\\\"},\\n    {\\\"title\\\": \\\"testing viral tiktok life hacks\\\"},\\n    {\\\"title\\\": \\\"transforming my garage into a movie theater\\\"},\\n    {\\\"title\\\": \\\"cooking with random ingredients challenge\\\"},\\n    {\\\"title\\\": \\\"visiting every state in 50 days\\\"},\\n    {\\\"title\\\": \\\"making a dress from recycled materials\\\"},\\n    {\\\"title\\\": \\\"i followed a victorian schedule for a week\\\"},\\n    {\\\"title\\\": \\\"turning my basement into an arcade\\\"},\\n    {\\\"title\\\": \\\"trying every coffee drink at starbucks\\\"},\\n    {\\\"title\\\": \\\"building a treehouse mansion for my dog\\\"},\\n    {\\\"title\\\": \\\"learning to skateboard in 24 hours\\\"},\\n    {\\\"title\\\": \\\"extreme grocery shopping challenge\\\"},\\n    {\\\"title\\\": \\\"converting my van into a tiny home\\\"},\\n    {\\\"title\\\": \\\"making a song using only kitchen sounds\\\"},\\n    {\\\"title\\\": \\\"reading 100 books in 100 days\\\"},\\n    {\\\"title\\\": \\\"training for a marathon in 30 days\\\"},\\n    {\\\"title\\\": \\\"living without technology for a week\\\"},\\n    {\\\"title\\\": \\\"cooking breakfast with my eyes closed\\\"},\\n    {\\\"title\\\": \\\"building a secret underground bunker\\\"},\\n    {\\\"title\\\": \\\"trying every ice cream flavor in my city\\\"},\\n    {\\\"title\\\": \\\"making clothes from dollar store items\\\"},\\n    {\\\"title\\\": \\\"transforming my attic into a gaming room\\\"},\\n    {\\\"title\\\": \\\"surviving on instant noodles for a month\\\"},\\n    {\\\"title\\\": \\\"building a miniature city in my backyard\\\"},\\n    {\\\"title\\\": \\\"learning to juggle chainsaws blindfolded\\\"},\\n    {\\\"title\\\": \\\"exploring abandoned theme park at night\\\"},\\n    {\\\"title\\\": \\\"making a gourmet meal in a microwave\\\"}\\n]\\n\\n# Update the titles in the array\\nfor i in range(len(titles)):\\n    titles[i][\\\"title\\\"] = \\\" \\\".join(word.capitalize() for word in titles[i][\\\"title\\\"].split())\\n\\nreturn titles\",\n    \"timeout\": 30\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          300,
          240
        ],
        "id": "7df347d0-5778-42b2-a851-5b835783c63e",
        "name": "Execute Python",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        },
        "disabled": true
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/video/caption",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n  \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n  \"settings\": {\n    \"line_color\": \"#FFFFFF\",\n    \"word_color\": \"#2d97e1\",\n    \"all_caps\": false,\n    \"max_words_per_line\": 3,\n    \"font_size\": 60,\n    \"bold\": false,\n    \"italic\": false,\n    \"underline\": false,\n    \"strikeout\": false,\n    \"outline_width\": 3,\n    \"shadow_offset\": 4,\n    \"style\": \"highlight\",\n    \"font_family\": \"The Bold Font\",\n    \"position\": \"bottom_center\"\n  },\n  \"id\": \"gdrive-five\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          240,
          -240
        ],
        "id": "3821ce0f-0141-483b-8f61-3e7ebb40937c",
        "name": "Caption1",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        },
        "disabled": true
      },
      {
        "parameters": {
          "url": "https://minio-uko80kos8wkogwc8ckwsc0ck.cloud.codegreeks.com.ng/toolkit/4b9b6f0c-cf82-4c52-a008-0252d36494db_captioned.mp4",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          560,
          -220
        ],
        "id": "3385a806-49e3-4d28-a9d3-73061cdd6eec",
        "name": "HTTP Request",
        "disabled": true
      },
      {
        "parameters": {
          "method": "POST",
          "url": "https://ag00ggkcc4s8w0s408wsg8wo.cloud.codegreeks.com.ng/v1/media/transcribe",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "{\n    \"media_url\":\"https://console-uko80kos8wkogwc8ckwsc0ck.cloud.codegreeks.com.ng/api/v1/download-shared-object/aHR0cHM6Ly9taW5pby11a284MGtvczh3a29nd2M4Y2t3c2MwY2suY2xvdWQuY29kZWdyZWVrcy5jb20ubmcvdG9vbGtpdC9SZWNvcmRpbmclMjAlMjgyJTI5Lm1wMz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPU5VTzZUWTJTMVNaUU5RUzZXVk1XJTJGMjAyNTA1MTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwNTEzVDEyNTUyNVomWC1BbXotRXhwaXJlcz00MzIwMCZYLUFtei1TZWN1cml0eS1Ub2tlbj1leUpoYkdjaU9pSklVelV4TWlJc0luUjVjQ0k2SWtwWFZDSjkuZXlKaFkyTmxjM05MWlhraU9pSk9WVTgyVkZreVV6RlRXbEZPVVZNMlYxWk5WeUlzSW1WNGNDSTZNVGMwTnpFNE5EQTBOaXdpY0dGeVpXNTBJam9pUTNwaU1GcDFkVEpxT1dkRE1rVk9lQ0o5LmFNd1N2TjdKV2FubkZYUmtub29meF94ek1HVHM1TTBjaHV3aG52ME9vOWpjZ2ZFUl8xWGFhcU5ZMVc3NXE2c1ViMkJNb2RNTlA1Wm9aWF9OaTVfeWxnJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZ2ZXJzaW9uSWQ9bnVsbCZYLUFtei1TaWduYXR1cmU9YTMxMWEyYmJmYmM5N2IwOWQxYmZhZjU1NTIzMDM1M2EwMmY5ZDA1OTkyNGMzZmE1YzEyZDU2M2I5ZmQ2MmU3Ng\",\n    \"task\": \"transcribe\",\n    \"include_text\": true,\n    \"include_srt\": true,\n    \"response_type\": \"direct\",\n    \"language\": \"en\",\n    \"words_per_line\": 4\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          560,
          60
        ],
        "id": "83b2f2e5-73d1-4e3c-9da6-65143a664fe2",
        "name": "Transcribe",
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "Caption",
              "type": "main",
              "index": 0
            },
            {
              "node": "Execute Python",
              "type": "main",
              "index": 0
            },
            {
              "node": "Caption1",
              "type": "main",
              "index": 0
            },
            {
              "node": "Transcribe",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Caption1": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "355cc03e-e044-4cee-a7c6-6952842e3f7c",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-06-12T15:39:51.032Z",
    "updatedAt": "2025-07-04T20:02:49.408Z",
    "id": "V77dLRzpRlJ6nn0U",
    "name": "Telegram Image Generator",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "updates": [
            "message"
          ],
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegramTrigger",
        "typeVersion": 1.2,
        "position": [
          -140,
          255
        ],
        "id": "d4559d12-6867-415b-ac30-49829fda16ce",
        "name": "Telegram Trigger",
        "webhookId": "08b65e4a-d505-4e97-b19d-4c0688b91c17",
        "credentials": {
          "telegramApi": {
            "id": "0cWkMhRCuiLBiuOM",
            "name": "Telegram account"
          }
        }
      },
      {
        "parameters": {
          "operation": "sendPhoto",
          "chatId": "={{ $('If').item.json.message.from.id }}",
          "binaryData": true,
          "binaryPropertyName": "data0",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          1620,
          305
        ],
        "id": "c1333dd9-8535-4dab-a1fa-574678323f9f",
        "name": "Telegram",
        "webhookId": "13ec7c68-32f7-47f4-aed8-915d3e7ce3a7",
        "credentials": {
          "telegramApi": {
            "id": "0cWkMhRCuiLBiuOM",
            "name": "Telegram account"
          }
        }
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "4977a3e0-67b0-43e6-bb6c-163e7d97f4ae",
                "leftValue": "={{ $json.message.from.id }}",
                "rightValue": 1555725708,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              },
              {
                "id": "9d09da43-c546-4f45-9ed2-09d7bad62b69",
                "leftValue": "={{ $json.message.from.id }}",
                "rightValue": 6413167204,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "or"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          80,
          255
        ],
        "id": "57a9a384-3e51-4912-99f6-aba779952a1c",
        "name": "If"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "={{ $json.message.text }}"
              },
              {
                "name": "model",
                "value": "FLUX-PRO"
              },
              {
                "name": "width",
                "value": "1280"
              },
              {
                "name": "height",
                "value": "1280"
              },
              {
                "name": "seed",
                "value": "-1"
              },
              {
                "name": "negative_prompt",
                "value": "high quality"
              },
              {
                "name": "nologo",
                "value": "true"
              },
              {
                "name": "safe",
                "value": "true"
              }
            ]
          },
          "options": {}
        },
        "name": "Set Image Parameters",
        "type": "n8n-nodes-base.set",
        "typeVersion": 1,
        "position": [
          300,
          155
        ],
        "id": "6a654dc5-2bf7-429c-acee-5a8cac53a548"
      },
      {
        "parameters": {
          "jsCode": "// Model information\nconst modelDescriptions = {\n    'flux': 'Flux: General-purpose model suitable for most scenarios',\n    'FLUX-3D': 'FLUX-3D: Optimized for 3D rendering style',\n    'FLUX-PRO': 'FLUX-PRO: Advanced professional-grade quality',\n    'Flux-realism': 'Flux-realism: Focused on realistic style generation',\n    'Flux-anime': 'Flux-anime: Optimized for anime-style generation',\n    'Flux-cablyai': 'Flux-cablyai: Special artistic style model',\n    'turbo': 'Turbo: Fast generation model prioritizing speed'\n};\n\n// Get input data\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Extract parameters\n    const prompt = item.json.prompt;\n    const model = item.json.model;\n    const width = item.json.width;\n    const height = item.json.height;\n    let seed = item.json.seed;\n    const negative_prompt = item.json.negative_prompt;\n    \n    // Handle boolean values properly, accepting various input formats\n    const nologo = item.json.nologo === true || item.json.nologo === 'true' || item.json.nologo === 1 || item.json.nologo === '1';\n    const safe = item.json.safe === true || item.json.safe === 'true' || item.json.safe === 1 || item.json.safe === '1';\n    \n    // Generate random seed if set to -1\n    if (seed === '-1') {\n        seed = Math.floor(Math.random() * 2147483647).toString();\n    }\n    \n    // Build URL manually without URLSearchParams\n    let baseUrl = `https://image.pollinations.ai/prompt/${encodeURIComponent(prompt)}`;\n    let paramString = `?width=${width}&height=${height}&seed=${seed}&model=${model}`;\n    \n    // Add optional parameters\n    if (negative_prompt) {\n        paramString += `&negative_prompt=${encodeURIComponent(negative_prompt)}`;\n    }\n    \n    // Try multiple possible parameter formats for nologo\n    if (nologo) {\n        paramString += '&nologo=true';\n        paramString += '&no_logo=true';  // Alternative parameter name\n        paramString += '&removelogo=true'; // Another possible parameter\n        paramString += '&remove_logo=true'; // Another possible parameter\n    }\n    \n    if (!safe) {\n        paramString += '&safe=false';\n    }\n    \n    // Construct final URL\n    const url = baseUrl + paramString;\n    \n    // Create output item\n    const newItem = {\n        json: {\n            imageUrl: url,\n            parameters: {\n                prompt: prompt,\n                model: model,\n                modelDescription: modelDescriptions[model] || 'Custom model',\n                dimensions: `${width}x${height}`,\n                seed: seed,\n                negative_prompt: negative_prompt,\n                nologo: nologo,\n                safe: safe,\n                generated_at: new Date().toISOString(),\n                retryCount: 0,  // Initialize retry counter\n                maxRetries: 5   // Set maximum retries\n            }\n        }\n    };\n    \n    result.push(newItem);\n}\n\nreturn result;\n"
        },
        "name": "Process Image Parameters",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          520,
          80
        ],
        "id": "e02c8ef4-54aa-46d4-97c2-47d959e7a840"
      },
      {
        "parameters": {
          "url": "={{ $json.imageUrl }}",
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "neverError": true,
                "responseFormat": "file",
                "outputPropertyName": "data0"
              }
            }
          }
        },
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          740,
          80
        ],
        "id": "af18af0b-2c61-4a34-aec9-951eb2c2b0a2",
        "continueOnFail": true
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "imageUrl",
                "value": "={{ $node[\"Process Image Parameters\"].json.imageUrl }}"
              },
              {
                "name": "prompt",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.prompt }}"
              },
              {
                "name": "model",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.model }}"
              },
              {
                "name": "modelDescription",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.modelDescription }}"
              },
              {
                "name": "dimensions",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.dimensions }}"
              },
              {
                "name": "seed",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.seed }}"
              }
            ]
          },
          "options": {}
        },
        "name": "Output Success Details",
        "type": "n8n-nodes-base.set",
        "typeVersion": 1,
        "position": [
          1180,
          305
        ],
        "id": "cc44ae9e-a8e8-4081-b1b4-d023c3905cf7"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          1180,
          105
        ],
        "id": "479c6285-65e5-403d-89a1-87fdadb57f06",
        "name": "Wait",
        "webhookId": "d146a4f2-b0bc-4ce3-a368-99cd370b078a"
      },
      {
        "parameters": {
          "operation": "crop",
          "dataPropertyName": "data0",
          "width": 1200,
          "height": 1200,
          "options": {
            "fileName": "easy",
            "format": "jpeg"
          }
        },
        "type": "n8n-nodes-base.editImage",
        "typeVersion": 1,
        "position": [
          1400,
          305
        ],
        "id": "50cafa79-33cb-4d95-8d80-c60f414152d1",
        "name": "Edit Image1"
      },
      {
        "parameters": {
          "chatId": "={{ $('Telegram Trigger').item.json.message.from.id }}",
          "text": "I dont know you please",
          "additionalFields": {
            "appendAttribution": false
          }
        },
        "type": "n8n-nodes-base.telegram",
        "typeVersion": 1.2,
        "position": [
          300,
          400
        ],
        "id": "6674afd6-e02f-422b-b6c1-75f79e1860fd",
        "name": "Block Non Auth Access",
        "webhookId": "2689554d-e615-48e8-964f-af321f705954",
        "credentials": {
          "telegramApi": {
            "id": "0cWkMhRCuiLBiuOM",
            "name": "Telegram account"
          }
        }
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "5185790d-974c-4042-aa8a-2bab219c9426",
                "leftValue": "={{ $json.statusCode }}",
                "rightValue": 200,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          920,
          60
        ],
        "id": "46d49900-1fb3-4bdc-a5c1-f4cf8fd91b4f",
        "name": "If1"
      }
    ],
    "connections": {
      "Telegram Trigger": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "Set Image Parameters",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Block Non Auth Access",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set Image Parameters": {
        "main": [
          [
            {
              "node": "Process Image Parameters",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Process Image Parameters": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "If1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Output Success Details": {
        "main": [
          [
            {
              "node": "Edit Image1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "Set Image Parameters",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Image1": {
        "main": [
          [
            {
              "node": "Telegram",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Block Non Auth Access": {
        "main": [
          []
        ]
      },
      "If1": {
        "main": [
          [
            {
              "node": "Output Success Details",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "b95ce8ee-b658-4642-982b-fa22941fdf27",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-04-22T13:21:15.467Z",
    "updatedAt": "2025-05-07T13:44:21.511Z",
    "id": "6WlAhN4M9hkqTjt8",
    "name": "Free Image API",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "name": "Start",
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -1620,
          -20
        ],
        "id": "dac5f852-ca5c-461c-9037-e5c5e40fe5bb"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "={{ $json.prompt }}"
              },
              {
                "name": "model",
                "value": "FLUX-PRO"
              },
              {
                "name": "width",
                "value": "1024"
              },
              {
                "name": "height",
                "value": "1024"
              },
              {
                "name": "seed",
                "value": "-1"
              },
              {
                "name": "negative_prompt",
                "value": "worst quality, blurry"
              },
              {
                "name": "nologo",
                "value": "true"
              },
              {
                "name": "safe",
                "value": "true"
              }
            ]
          },
          "options": {}
        },
        "name": "Set Image Parameters",
        "type": "n8n-nodes-base.set",
        "typeVersion": 1,
        "position": [
          -1360,
          -60
        ],
        "id": "d709e8f3-a360-4153-b973-a66a6f5fe367"
      },
      {
        "parameters": {
          "jsCode": "// Model information\nconst modelDescriptions = {\n    'flux': 'Flux: General-purpose model suitable for most scenarios',\n    'FLUX-3D': 'FLUX-3D: Optimized for 3D rendering style',\n    'FLUX-PRO': 'FLUX-PRO: Advanced professional-grade quality',\n    'Flux-realism': 'Flux-realism: Focused on realistic style generation',\n    'Flux-anime': 'Flux-anime: Optimized for anime-style generation',\n    'Flux-cablyai': 'Flux-cablyai: Special artistic style model',\n    'turbo': 'Turbo: Fast generation model prioritizing speed'\n};\n\n// Get input data\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Extract parameters\n    const prompt = item.json.prompt;\n    const model = item.json.model;\n    const width = item.json.width;\n    const height = item.json.height;\n    let seed = item.json.seed;\n    const negative_prompt = item.json.negative_prompt;\n    const nologo = item.json.nologo === 'true';\n    const safe = item.json.safe === 'true';\n    \n    // Generate random seed if set to -1\n    if (seed === '-1') {\n        seed = Math.floor(Math.random() * 2147483647).toString();\n    }\n    \n    // Build URL\n    let url = `https://image.pollinations.ai/prompt/${encodeURIComponent(prompt)}`;\n    url += `?width=${width}&height=${height}&seed=${seed}&model=${model}`;\n    \n    if (negative_prompt) {\n        url += `&negative_prompt=${encodeURIComponent(negative_prompt)}`;\n    }\n    \n    if (nologo) {\n        url += '&nologo=true';\n    }\n    \n    if (!safe) {\n        url += '&safe=false';\n    }\n    \n    // Create output item\n    const newItem = {\n        json: {\n            imageUrl: url,\n            parameters: {\n                prompt: prompt,\n                model: model,\n                modelDescription: modelDescriptions[model] || 'Custom model',\n                dimensions: `${width}x${height}`,\n                seed: seed,\n                negative_prompt: negative_prompt,\n                nologo: nologo,\n                safe: safe,\n                generated_at: new Date().toISOString(),\n                retryCount: 0,  // Initialize retry counter\n                maxRetries: 5   // Set maximum retries\n            }\n        }\n    };\n    \n    result.push(newItem);\n}\n\nreturn result;"
        },
        "name": "Process Image Parameters",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -1140,
          -60
        ],
        "id": "f38b74ad-3f5e-4cbb-bc54-bf4b467713a7"
      },
      {
        "parameters": {
          "url": "={{ $json.imageUrl }}",
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "file"
              }
            }
          }
        },
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          -920,
          -60
        ],
        "id": "64e236b9-e6bd-4424-bf93-344be707f9b0",
        "continueOnFail": true
      },
      {
        "parameters": {
          "conditions": {
            "string": [
              {
                "value1": "={{ $node[\"HTTP Request\"].error !== null }}",
                "value2": "true"
              }
            ]
          }
        },
        "name": "Check If Error",
        "type": "n8n-nodes-base.if",
        "typeVersion": 1,
        "position": [
          -720,
          -60
        ],
        "id": "8e462a86-0d5f-4464-a61c-b28d213bb528"
      },
      {
        "parameters": {
          "conditions": {
            "number": [
              {
                "value1": "={{ $json.parameters.retryCount }}",
                "value2": "={{ $json.parameters.maxRetries }}"
              }
            ]
          }
        },
        "name": "Check Retry Count",
        "type": "n8n-nodes-base.if",
        "typeVersion": 1,
        "position": [
          -520,
          -160
        ],
        "id": "2d04450d-fda1-43f9-a554-8f12bb438cf2"
      },
      {
        "parameters": {
          "amount": 5,
          "unit": "seconds"
        },
        "name": "Wait 5 Seconds",
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1,
        "position": [
          -320,
          -260
        ],
        "webhookId": "wait-node-webhook-id",
        "id": "d96420fd-800a-4cdb-8d3d-3697e109fb77"
      },
      {
        "parameters": {
          "jsCode": "// Increment retry counter\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Create a copy of the item\n    const newItem = JSON.parse(JSON.stringify(item));\n    \n    // Increment retry counter\n    newItem.json.parameters.retryCount++;\n    \n    // Add error information for logging\n    newItem.json.lastError = $node[\"HTTP Request\"].error;\n    newItem.json.lastErrorTime = new Date().toISOString();\n    \n    result.push(newItem);\n}\n\nreturn result;"
        },
        "name": "Increment Retry Counter",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -120,
          -260
        ],
        "id": "9054c904-b904-47fd-930d-c969e4615965"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "imageUrl",
                "value": "={{ $node[\"Process Image Parameters\"].json.imageUrl }}"
              },
              {
                "name": "prompt",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.prompt }}"
              },
              {
                "name": "model",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.model }}"
              },
              {
                "name": "modelDescription",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.modelDescription }}"
              },
              {
                "name": "dimensions",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.dimensions }}"
              },
              {
                "name": "seed",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.seed }}"
              }
            ]
          },
          "options": {}
        },
        "name": "Output Success Details",
        "type": "n8n-nodes-base.set",
        "typeVersion": 1,
        "position": [
          -540,
          100
        ],
        "id": "a67a2880-5e63-4817-9b0c-e4fbbed90f84"
      },
      {
        "parameters": {
          "jsCode": "// Create error summary\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Create a new item with error details\n    const newItem = {\n        json: {\n            status: \"Failed\",\n            error: \"Maximum retries exceeded\",\n            retryCount: item.json.parameters.retryCount,\n            maxRetries: item.json.parameters.maxRetries,\n            prompt: item.json.parameters.prompt,\n            model: item.json.parameters.model,\n            lastError: item.json.lastError || $node[\"HTTP Request\"].error,\n            failedAt: new Date().toISOString()\n        }\n    };\n    \n    result.push(newItem);\n}\n\nreturn result;"
        },
        "name": "Create Error Summary",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -320,
          -60
        ],
        "id": "a4575d7e-9ee5-4aa5-a471-890beb05298c"
      },
      {
        "parameters": {
          "batchSize": 1,
          "options": {}
        },
        "type": "n8n-nodes-base.splitInBatches",
        "typeVersion": 2,
        "position": [
          -1440,
          -540
        ],
        "id": "c7b5ac35-6d8a-4948-ac66-e9145609e089",
        "name": "Split Into Batches"
      },
      {
        "parameters": {
          "amount": 4,
          "unit": "seconds"
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1,
        "position": [
          -920,
          -580
        ],
        "id": "029ee7da-8adc-4ace-a77f-8cf6183bc275",
        "name": "Wait",
        "webhookId": "c27772d0-80c5-4bcf-84a7-0c1a8f95cd1f"
      },
      {
        "parameters": {
          "driveId": {
            "__rl": true,
            "value": "My Drive",
            "mode": "list",
            "cachedResultName": "My Drive",
            "cachedResultUrl": "https://drive.google.com/drive/my-drive"
          },
          "folderId": {
            "__rl": true,
            "value": "1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q",
            "mode": "list",
            "cachedResultName": "n8nauthbackup",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          -640,
          -420
        ],
        "id": "8bc31a24-94f2-4a53-8592-96dccea33873",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "operation": "text",
          "text": "=",
          "fontSize": 45,
          "fontColor": "#F6F1F1",
          "positionX": 90,
          "positionY": 600,
          "lineLength": 35,
          "options": {
            "fileName": "={{ $('Generate Nature background1').item.json.index }}",
            "font": "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf"
          }
        },
        "type": "n8n-nodes-base.editImage",
        "typeVersion": 1,
        "position": [
          -1160,
          -280
        ],
        "id": "bab9435b-7dfd-467d-af4a-e56b01fbd19e",
        "name": "Edit Image"
      },
      {
        "parameters": {
          "jsCode": "// --- Expanded Lists for Uniqueness & Nature Focus ---\n\n// Nature-related devotional elements (tangible nature scenes/elements)\nconst natureElements = [\n  'ancient oak tree silhouette at dusk', 'serene mountain range under twilight sky', 'quiet forest glade with deep shadows', 'gentle flowing river reflecting moonlight', 'misty morning meadow with low fog',\n  'peaceful lake at dusk with dark water', 'soft mossy ground in a shaded forest', 'twilight sky with faint stars appearing', 'calm ocean waves under a stormy sky', 'rustling autumn leaves on a dark path',\n  'snow-covered pine forest in low light', 'sunlight filtering weakly through dense canopy', 'wildflower field in muted evening colors', 'rocky cliffside against a dark sea', 'hidden waterfall shrouded in mist',\n  'foggy valley at dawn', 'crystal clear stream over dark stones', 'golden wheat field under a moody sky', 'desert sunset with long shadows', 'rain-soaked forest path glistening dimly',\n  'calm pond with dark lily pads', 'majestic eagle soaring against dark clouds', 'quiet snowy hill under moonlight', 'lush green jungle canopy blocking light', 'blooming cherry blossoms at night',\n  'dark cave entrance partially hidden by vines', 'dawn breaking faintly over distant hills', 'approaching thunderstorm over mountains', 'starry night sky over a dark landscape', 'calm beach at twilight with wet sand',\n  'ancient ruins overgrown in a dark forest', 'stone archway covered in ivy in shadows', 'peaceful garden bench under a large dark tree', 'wild deer grazing in early morning mist', 'moonlit forest path through tall pines',\n  'gentle breeze rustling leaves in a dark wood', 'sunset casting long shadows over rolling hills', 'quiet river bend surrounded by dark trees', 'dense fog settling in a deep valley', 'sparkling dew on dark green leaves',\n  'dark pine forest floor covered in needles', 'soft glowing fireflies in a dark field', 'quiet desert night with distant mountains', 'frozen lake surface reflecting dark sky', 'tall grass swaying under a moonlit sky',\n  'hidden forest cabin with minimal light', 'peaceful orchard in the evening shadows', 'calm river delta at twilight', 'mountain peak piercing through low clouds', 'twilight mist hovering over a dark lake',\n  'quiet woodland stream flowing through shadows', 'weathered wooden cross on a misty hill', 'single candle flame flickering in darkness (nature setting)', 'path leading into a dark, dense forest', 'still lake reflecting a dark, starry sky'\n]; // 55 elements - Increased variety\n\n// Dark theme & mood descriptors\nconst darkDescriptors = [\n  'moody atmosphere', 'deep enveloping shadows', 'low key dramatic lighting', 'cinematic darkness', 'ethereal twilight glow',\n  'rich dark color palette', 'subtle vignette focusing darkness', 'atmospheric dense haze', 'contemplative profound stillness', 'classic noir aesthetic',\n  'dramatic contrast lighting', 'minimalist dark tones', 'shadowy mysterious silhouettes', 'soft muted color diffusion', 'dimly lit intimate scene',\n  'obscured and veiled light', 'heavy somber mood', 'gothic undertones', 'faded vintage darkness', 'deep chiaroscuro effect',\n  'serene nocturnal ambiance', 'peaceful nighttime quietude', 'understated dark elegance', 'muted and subdued tones', 'contemplative dimness'\n]; // 25 elements - Increased variety\n\n// Background styles & textures (more nature-focused)\nconst backgroundStyles = [\n  'abstract dark textured surface', 'blurred dark forest background', 'dark gradient wash effect', 'minimalist dark pattern',\n  'subtle aged paper texture overlay', 'dark natural stone texture', 'moody overcast skyscape', 'soft focus dark bokeh effect',\n  'weathered dark wood grain texture', 'dark water surface reflection', 'smoky atmospheric texture', 'foggy forest floor texture',\n  'shadowed rocky terrain backdrop', 'twilight sky with silhouetted clouds', 'damp mossy rock surface', 'dark sandy shore texture',\n  'dark leafy canopy overhead view', 'heavy rain on a dark surface effect', 'cracked earth texture in shadow', 'bark texture of an old tree',\n  'rippled water texture in low light', 'starry night sky texture', 'soft moonlit cloud texture', 'wind-swept grass texture (dark)', 'frozen ice texture with trapped bubbles'\n]; // 25 elements - Increased variety\n\n// Optional Color Palette Suggestions (dark and thematic)\nconst colorPalettes = [\n  'deep blues, purples, and charcoal gray', 'monochromatic grayscale with subtle silver accents', 'rich burgundy, deep forest green, and black',\n  'dark navy, slate gray, and muted gold highlights', 'earthy dark browns, deep moss green, and shadow tones', 'muted jewel tones like deep sapphire and emerald',\n  'charcoal gray and soft, dim amber light', 'dark emerald green and midnight blue blend', 'smoky gray, deep violet, and soft lavender',\n  'deep maroon, dark slate gray, and black', 'cool dark grays with hints of deep teal', 'black, deep indigo, and muted bronze',\n  'dark chocolate brown, beige, and deep gray', 'stormy blues and dark silver grays', 'burnt umber, dark olive, and charcoal',\n  'deep teal, dark grey, and off-black', 'rich plum, dark graphite, and muted gold', 'obsidian black, deep crimson, and dark grey', 'midnight blue, silver, and deep charcoal', 'forest green, dark brown, and black'\n]; // 20 elements - Increased variety\n\nconst niche = 'Christian devotional Instagram background';\nconst items = [];\nconst numberOfPrompts = 1; // Generate 1000 prompts - easily adjustable\n\n// Use a Set to track generated prompts and ensure uniqueness if needed,\n// although with ~687,500 combinations, duplicates are very unlikely for 1000 prompts.\nconst generatedPrompts = new Set();\n\nfor (let i = 0; i < numberOfPrompts; i++) {\n  let prompt;\n  let element, descriptor, style, palette;\n\n  // Loop to ensure uniqueness if generating extremely large numbers, though unlikely here.\n  do {\n      // Randomly pick one element from each category\n      element = natureElements[Math.floor(Math.random() * natureElements.length)];\n      descriptor = darkDescriptors[Math.floor(Math.random() * darkDescriptors.length)];\n      style = backgroundStyles[Math.floor(Math.random() * backgroundStyles.length)];\n      palette = colorPalettes[Math.floor(Math.random() * colorPalettes.length)];\n\n      // Combine elements into a descriptive prompt with slightly more guidance\n      prompt = `Create a background image for the '${niche}' niche. ` +\n               `Scene: '${element}'. ` +\n               `Atmosphere: Characterized by '${descriptor}'. ` +\n               `Incorporate a '${style}' texture or backdrop element. ` +\n               `Color Palette Hint: Emphasize '${palette}'. ` +\n               `Goal: Ensure the overall image is dark, atmospheric, deeply reflective, and avoids excessive brightness.`;\n\n  } while (generatedPrompts.has(prompt)); // Check if this exact prompt was already generated\n\n  generatedPrompts.add(prompt); // Add the unique prompt to the set\n\n  items.push({\n    json: {\n      prompt: prompt,\n      natureElement: element,      // Keep track of chosen elements\n      themeDescriptor: descriptor,\n      backgroundStyle: style,\n      colorPalette: palette,\n      index: i + 1\n    }\n  });\n\n  // Optimization: If the number of generated prompts equals the total possible combinations, break the loop.\n  if (generatedPrompts.size === natureElements.length * darkDescriptors.length * backgroundStyles.length * colorPalettes.length) {\n    console.warn(\"Generated all possible unique combinations.\");\n    break;\n  }\n}\n\n// The 'items' array now holds the generated prompts.\n// This return statement depends on the context where this code is used (e.g., a function, a script).\nreturn items;\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -1700,
          -600
        ],
        "id": "c21d864a-676b-439d-920c-6bfd15e6b867",
        "name": "Generate Nature background"
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "toolkit",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          -880,
          -340
        ],
        "id": "1effefaa-6f10-491c-bee0-4b6a85420f73",
        "name": "S3",
        "credentials": {
          "s3": {
            "id": "aX3qAhXY0ezzlycE",
            "name": "S3 account"
          }
        }
      },
      {
        "parameters": {
          "jsCode": "// Function to parse transcript and generate prompts\nfunction generatePromptsFromTranscript(transcript) {\n  // Split the transcript by timestamps\n  const timestampPattern = /(\\d{2}:\\d{2}:\\d{2} → \\d{2}:\\d{2}:\\d{2})\\n([\\s\\S]*?)(?=\\n\\d{2}:\\d{2}:\\d{2} → \\d{2}:\\d{2}:\\d{2}|\\n*$)/g;\n  const matches = [...transcript.matchAll(timestampPattern)];\n  \n  const items = [];\n  \n  // Process each timestamp segment\n  matches.forEach((match, index) => {\n    const timestamp = match[1];\n    const content = match[2].trim();\n    \n    items.push({\n      json: {\n        timestamp: timestamp,\n        prompt: content,\n        index: index\n      }\n    });\n  });\n  \n  return items;\n}\n\n// Get the transcript from the previous node\nconst transcript = $input.item.json.transcript || \"\";\n\n// Generate prompts from the transcript\nconst items = generatePromptsFromTranscript(transcript);\n\n// Make sure we return at least one item if the transcript is empty\nif (items.length === 0) {\n  return [{\n    json: {\n      error: \"No timestamps found in transcript\",\n      index: 0\n    }\n  }];\n}\n\n// Return the items array with all the generated prompts\nreturn items;\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -1700,
          -400
        ],
        "id": "4a39b795-edf4-4bd5-9cba-e55134c2ebd3",
        "name": "Generate Nature background1"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "c512bb9b-f44e-49f1-8103-b55fd69fb75e",
                "name": "transcript",
                "value": "00:00:00 → 00:00:02\nComic panel in a semi-realistic, gritty rural style.\nA crumbling cottage stands on a dry field under a pale sky. A tired family—parents and three sons—stand outside, with a cow grazing beside them.\n\n00:00:02 → 00:00:04\nComic panel in a semi-realistic, gritty rural style.\nInterior of the cottage reveals sparse furnishings and cracked walls. The family sits around a worn wooden table, sharing a meager meal. The atmosphere is somber.\n\n00:00:04 → 00:00:07\nComic panel in a semi-realistic, gritty rural style.\nThe cow stands alone in a barren field beside a dilapidated barn. The landscape is dry, with withered crops and a pale sky overhead.\n\n00:00:08 → 00:00:10\nComic panel in a semi-realistic, gritty rural style.\nThe family works the land with simple tools, their faces etched with fatigue. The cow watches from a distance, the only sign of vitality.\n\n00:00:10 → 00:00:13\nComic panel in a semi-realistic, gritty rural style.\nAt dawn, the father steps out of the cottage, carrying a feed bucket. The sky is tinged with gray, and the air feels heavy with foreboding.\n\n00:00:14 → 00:00:16\nComic panel in a semi-realistic, gritty rural style.\nInside the barn, the father approaches the cow's stall. Dust particles float in the dim light filtering through the cracks.\n\n00:00:17 → 00:00:19\nComic panel in a semi-realistic, gritty rural style.\nThe cow lies motionless on the straw-covered floor. The father's face contorts in shock and despair.\n\n00:00:19 → 00:00:22\nComic panel in a semi-realistic, gritty rural style.\nThe father stumbles out of the barn, clutching his head. He wanders aimlessly into the surrounding fields.\n\n00:00:22 → 00:00:25\nComic panel in a semi-realistic, gritty rural style.\nReaching a riverbank, the father stares into the turbulent waters. His reflection is distorted, mirroring his inner turmoil.\n\n00:00:25 → 00:00:27\nComic panel in a semi-realistic, gritty rural style.\nThe father slips on the muddy bank and falls into the river. The current swiftly carries him away.\n\n00:00:27 → 00:00:29\nComic panel in a semi-realistic, gritty rural style.\nBack at the cottage, the mother awakens alone. The empty space beside her in bed hints at the father's absence.\n\n00:00:29 → 00:00:32\nComic panel in a semi-realistic, gritty rural style.\nShe discovers the dead cow and the empty barn. Panic and sorrow grip her as she realizes something is terribly wrong.\n\n00:00:32 → 00:00:35\nComic panel in a semi-realistic, gritty rural style.\nOverwhelmed by grief, the mother runs to the river. Without hesitation, she plunges into the water.\n\n00:00:35 → 00:00:37\nComic panel in a semi-realistic, gritty rural style.\nThe eldest son wakes up, the morning light casting long shadows across the room. He senses the emptiness of the house.\n\n00:00:37 → 00:00:41\nComic panel in a semi-realistic, gritty rural style.\nHe finds the lifeless cow and notices his parents are missing. Confusion and fear cloud his expression.\n\n00:00:41 → 00:00:44\nComic panel in a semi-realistic, gritty rural style.\nSitting beside the cow, the eldest son weeps uncontrollably. The desolate landscape mirrors his despair.\n\n00:00:44 → 00:00:45\nComic panel in a semi-realistic, gritty rural style.\nA mysterious lady leprechaun appears beside him, her presence both enchanting and unsettling.\n\n00:00:46 → 00:00:48\nComic panel in a semi-realistic, gritty rural style.\nThe leprechaun speaks with a sly smile, offering to bring back his parents if he can fulfill her condition.\n\n00:00:48 → 00:00:50\nComic panel in a semi-realistic, gritty rural style.\nThe eldest son, desperate and determined, agrees to her terms. The leprechaun's eyes gleam with anticipation.\n\n00:00:50 → 00:00:52\nComic panel in a semi-realistic, gritty rural style.\nTime passes as they engage in the leprechaun's challenge. The son's strength wanes visibly.\n\n00:00:53 → 00:00:54\nComic panel in a semi-realistic, gritty rural style.\nAfter 45 minutes, the eldest son collapses, lifeless. The leprechaun looks down at him, unfazed.\n\n00:00:54 → 00:00:58\nComic panel in a semi-realistic, gritty rural style.\nThe second son awakens, sensing the eerie silence. He ventures outside to uncover the grim reality.\n\n00:00:58 → 00:01:00\nComic panel in a semi-realistic, gritty rural style.\nHe discovers the dead cow and his brother's body. The leprechaun appears once more, repeating her proposition.\n\n00:01:01 → 00:01:04\nComic panel in a semi-realistic, gritty rural style.\nDriven by hope, the second son accepts the leprechaun's challenge, determined to succeed where his brother failed.\n\n00:01:05 → 00:01:07\nComic panel in a semi-realistic, gritty rural style.\nThey begin the ordeal, the son's resolve evident. The leprechaun watches with a mix of amusement and curiosity.\n\n00:01:08 → 00:01:13\nComic panel in a semi-realistic, gritty rural style.\nTime drags on as the second son pushes his limits. Exhaustion overtakes him, and he succumbs to the same fate.\n\n00:01:13 → 00:01:14\nComic panel in a semi-realistic, gritty rural style.\nThe youngest son, a robust 18-year-old, wakes up as dawn breaks. He notices the unsettling quiet.\n\n00:01:15 → 00:01:17\nComic panel in a semi-realistic, gritty rural style.\nHe steps outside, discovering the lifeless cow and his brothers' bodies. The leprechaun appears once again.\n\n00:01:17 → 00:01:19\nComic panel in a semi-realistic, gritty rural style.\nShe offers him the same deal, with an increased challenge. The youngest son listens intently.\n\n00:01:19 → 00:01:23\nComic panel in a semi-realistic, gritty rural style.\nHe contemplates the offer, weighing the risks and rewards. Determination sets in.\n\n00:01:23 → 00:01:24\nComic panel in a semi-realistic, gritty rural style.\nHe proposes a counteroffer: if he succeeds, the leprechaun must not only revive his family but also transform their farm.\n\n00:01:24 → 00:01:30\nComic panel in a semi-realistic, gritty rural style.\nThe leprechaun, intrigued and slightly apprehensive, agrees to the terms. They prepare to commence the challenge.\n\n00:01:30 → 00:01:31\nComic panel in a semi-realistic, gritty rural style.\nAs the challenge begins, a magical aura envelops the scene. The leprechaun's confidence wavers.\n\n00:01:31 → 00:01:34\nComic panel in a semi-realistic, gritty rural style.\nTime passes, and the leprechaun shows signs of strain. The youngest son remains steadfast.\n\n00:01:35 → 00:01:37\nComic panel in a semi-realistic, gritty rural style.\nAfter eight hours, the leprechaun collapses, overwhelmed. The youngest son stands victorious.\n\n00:01:38 → 00:01:39\nComic panel in a semi-realistic, gritty rural style.\nA magical surge revitalizes the farm. The cow rises, alive and healthy.\n\n00:01:39 → 00:01:42\nComic panel in a semi-realistic, gritty rural style.\nThe cottage transforms into a grand mansion. Lush fields replace the barren land.\n\n00:01:42 → 00:01:44\nComic panel in a semi-realistic, gritty rural style.\nThe family reunites, embracing joyfully. The youngest son smiles, content.\n\n00:01:44 → 00:01:46\nComic panel in a semi-realistic, gritty rural style.\nThe leprechaun, now weakened, nods in acknowledgment. Her mischievous grin returns faintly.\n\n00:01:46 → 00:01:48\nComic panel in a semi-realistic, gritty rural style.\nThe final panel shows the transformed farm under a vibrant sky. A new chapter begins for the family.",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          -1760,
          -200
        ],
        "id": "de96c2e6-64a6-45b3-b846-66aee8632ac3",
        "name": "Edit Fields"
      }
    ],
    "connections": {
      "Start": {
        "main": [
          [
            {
              "node": "Edit Fields",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set Image Parameters": {
        "main": [
          [
            {
              "node": "Process Image Parameters",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Process Image Parameters": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Check If Error",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check If Error": {
        "main": [
          [
            {
              "node": "Check Retry Count",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Output Success Details",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check Retry Count": {
        "main": [
          [
            {
              "node": "Wait 5 Seconds",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Create Error Summary",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait 5 Seconds": {
        "main": [
          [
            {
              "node": "Increment Retry Counter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Increment Retry Counter": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Into Batches": {
        "main": [
          [
            {
              "node": "Set Image Parameters",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "S3",
              "type": "main",
              "index": 0
            },
            {
              "node": "Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "Edit Image",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Image": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate Nature background": {
        "main": [
          []
        ]
      },
      "Output Success Details": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate Nature background1": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Fields": {
        "main": [
          [
            {
              "node": "Generate Nature background1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "6789a2a7-574a-4c8e-a2a2-f69081ad48a4",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-17T23:21:05.105Z",
    "updatedAt": "2025-05-21T11:54:29.526Z",
    "id": "yGIIB28skQSQQ711",
    "name": "Batch Generate Images & Edit",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -500,
          780
        ],
        "id": "7bb39d4a-5224-4507-a41a-8cdc81f25f53",
        "name": "When clicking 'Test workflow'"
      },
      {
        "parameters": {
          "batchSize": 1,
          "options": {}
        },
        "type": "n8n-nodes-base.splitInBatches",
        "typeVersion": 2,
        "position": [
          -100,
          720
        ],
        "id": "fdb81936-1f22-4a6d-b7c0-42219cf62e2d",
        "name": "Split Into Batches"
      },
      {
        "parameters": {
          "url": "=https://image.pollinations.ai/prompt/{{$json[\"prompt\"]}}?nologo=true&width=1920&height=720\n",
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "neverError": true
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          60,
          640
        ],
        "id": "114ce0fc-8585-4dd3-902e-b4298b1ea1e6",
        "name": "HTTP Request"
      },
      {
        "parameters": {
          "operation": "text",
          "text": "={{ $('Split Into Batches').item.json.natureElement }}",
          "fontSize": 45,
          "fontColor": "#F6F1F1",
          "positionX": 90,
          "positionY": 400,
          "lineLength": 35,
          "options": {
            "fileName": "={{ $('Generate Nature background').item.json.natureElement }}",
            "font": "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf"
          }
        },
        "type": "n8n-nodes-base.editImage",
        "typeVersion": 1,
        "position": [
          -20,
          960
        ],
        "id": "f70b7166-241e-4a33-b602-6c8822070f2c",
        "name": "Edit Image"
      },
      {
        "parameters": {
          "jsCode": "// --- Expanded Lists for Uniqueness & Nature Focus ---\n\n// Nature-related devotional elements (tangible nature scenes/elements)\nconst natureElements = [\n  'ancient oak tree silhouette at dusk', 'serene mountain range under twilight sky', 'quiet forest glade with deep shadows', 'gentle flowing river reflecting moonlight', 'misty morning meadow with low fog',\n  'peaceful lake at dusk with dark water', 'soft mossy ground in a shaded forest', 'twilight sky with faint stars appearing', 'calm ocean waves under a stormy sky', 'rustling autumn leaves on a dark path',\n  'snow-covered pine forest in low light', 'sunlight filtering weakly through dense canopy', 'wildflower field in muted evening colors', 'rocky cliffside against a dark sea', 'hidden waterfall shrouded in mist',\n  'foggy valley at dawn', 'crystal clear stream over dark stones', 'golden wheat field under a moody sky', 'desert sunset with long shadows', 'rain-soaked forest path glistening dimly',\n  'calm pond with dark lily pads', 'majestic eagle soaring against dark clouds', 'quiet snowy hill under moonlight', 'lush green jungle canopy blocking light', 'blooming cherry blossoms at night',\n  'dark cave entrance partially hidden by vines', 'dawn breaking faintly over distant hills', 'approaching thunderstorm over mountains', 'starry night sky over a dark landscape', 'calm beach at twilight with wet sand',\n  'ancient ruins overgrown in a dark forest', 'stone archway covered in ivy in shadows', 'peaceful garden bench under a large dark tree', 'wild deer grazing in early morning mist', 'moonlit forest path through tall pines',\n  'gentle breeze rustling leaves in a dark wood', 'sunset casting long shadows over rolling hills', 'quiet river bend surrounded by dark trees', 'dense fog settling in a deep valley', 'sparkling dew on dark green leaves',\n  'dark pine forest floor covered in needles', 'soft glowing fireflies in a dark field', 'quiet desert night with distant mountains', 'frozen lake surface reflecting dark sky', 'tall grass swaying under a moonlit sky',\n  'hidden forest cabin with minimal light', 'peaceful orchard in the evening shadows', 'calm river delta at twilight', 'mountain peak piercing through low clouds', 'twilight mist hovering over a dark lake',\n  'quiet woodland stream flowing through shadows', 'weathered wooden cross on a misty hill', 'single candle flame flickering in darkness (nature setting)', 'path leading into a dark, dense forest', 'still lake reflecting a dark, starry sky'\n]; // 55 elements - Increased variety\n\n// Dark theme & mood descriptors\nconst darkDescriptors = [\n  'moody atmosphere', 'deep enveloping shadows', 'low key dramatic lighting', 'cinematic darkness', 'ethereal twilight glow',\n  'rich dark color palette', 'subtle vignette focusing darkness', 'atmospheric dense haze', 'contemplative profound stillness', 'classic noir aesthetic',\n  'dramatic contrast lighting', 'minimalist dark tones', 'shadowy mysterious silhouettes', 'soft muted color diffusion', 'dimly lit intimate scene',\n  'obscured and veiled light', 'heavy somber mood', 'gothic undertones', 'faded vintage darkness', 'deep chiaroscuro effect',\n  'serene nocturnal ambiance', 'peaceful nighttime quietude', 'understated dark elegance', 'muted and subdued tones', 'contemplative dimness'\n]; // 25 elements - Increased variety\n\n// Background styles & textures (more nature-focused)\nconst backgroundStyles = [\n  'abstract dark textured surface', 'blurred dark forest background', 'dark gradient wash effect', 'minimalist dark pattern',\n  'subtle aged paper texture overlay', 'dark natural stone texture', 'moody overcast skyscape', 'soft focus dark bokeh effect',\n  'weathered dark wood grain texture', 'dark water surface reflection', 'smoky atmospheric texture', 'foggy forest floor texture',\n  'shadowed rocky terrain backdrop', 'twilight sky with silhouetted clouds', 'damp mossy rock surface', 'dark sandy shore texture',\n  'dark leafy canopy overhead view', 'heavy rain on a dark surface effect', 'cracked earth texture in shadow', 'bark texture of an old tree',\n  'rippled water texture in low light', 'starry night sky texture', 'soft moonlit cloud texture', 'wind-swept grass texture (dark)', 'frozen ice texture with trapped bubbles'\n]; // 25 elements - Increased variety\n\n// Optional Color Palette Suggestions (dark and thematic)\nconst colorPalettes = [\n  'deep blues, purples, and charcoal gray', 'monochromatic grayscale with subtle silver accents', 'rich burgundy, deep forest green, and black',\n  'dark navy, slate gray, and muted gold highlights', 'earthy dark browns, deep moss green, and shadow tones', 'muted jewel tones like deep sapphire and emerald',\n  'charcoal gray and soft, dim amber light', 'dark emerald green and midnight blue blend', 'smoky gray, deep violet, and soft lavender',\n  'deep maroon, dark slate gray, and black', 'cool dark grays with hints of deep teal', 'black, deep indigo, and muted bronze',\n  'dark chocolate brown, beige, and deep gray', 'stormy blues and dark silver grays', 'burnt umber, dark olive, and charcoal',\n  'deep teal, dark grey, and off-black', 'rich plum, dark graphite, and muted gold', 'obsidian black, deep crimson, and dark grey', 'midnight blue, silver, and deep charcoal', 'forest green, dark brown, and black'\n]; // 20 elements - Increased variety\n\nconst niche = 'Christian devotional Instagram background';\nconst items = [];\nconst numberOfPrompts = 3; // Generate 1000 prompts - easily adjustable\n\n// Use a Set to track generated prompts and ensure uniqueness if needed,\n// although with ~687,500 combinations, duplicates are very unlikely for 1000 prompts.\nconst generatedPrompts = new Set();\n\nfor (let i = 0; i < numberOfPrompts; i++) {\n  let prompt;\n  let element, descriptor, style, palette;\n\n  // Loop to ensure uniqueness if generating extremely large numbers, though unlikely here.\n  do {\n      // Randomly pick one element from each category\n      element = natureElements[Math.floor(Math.random() * natureElements.length)];\n      descriptor = darkDescriptors[Math.floor(Math.random() * darkDescriptors.length)];\n      style = backgroundStyles[Math.floor(Math.random() * backgroundStyles.length)];\n      palette = colorPalettes[Math.floor(Math.random() * colorPalettes.length)];\n\n      // Combine elements into a descriptive prompt with slightly more guidance\n      prompt = `Create a background image for the '${niche}' niche. ` +\n               `Scene: '${element}'. ` +\n               `Atmosphere: Characterized by '${descriptor}'. ` +\n               `Incorporate a '${style}' texture or backdrop element. ` +\n               `Color Palette Hint: Emphasize '${palette}'. ` +\n               `Goal: Ensure the overall image is dark, atmospheric, deeply reflective, and avoids excessive brightness.`;\n\n  } while (generatedPrompts.has(prompt)); // Check if this exact prompt was already generated\n\n  generatedPrompts.add(prompt); // Add the unique prompt to the set\n\n  items.push({\n    json: {\n      prompt: prompt,\n      natureElement: element,      // Keep track of chosen elements\n      themeDescriptor: descriptor,\n      backgroundStyle: style,\n      colorPalette: palette,\n      index: i + 1\n    }\n  });\n\n  // Optimization: If the number of generated prompts equals the total possible combinations, break the loop.\n  if (generatedPrompts.size === natureElements.length * darkDescriptors.length * backgroundStyles.length * colorPalettes.length) {\n    console.warn(\"Generated all possible unique combinations.\");\n    break;\n  }\n}\n\n// The 'items' array now holds the generated prompts.\n// This return statement depends on the context where this code is used (e.g., a function, a script).\nreturn items;\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -300,
          780
        ],
        "id": "772c6ed3-851a-4d46-b54c-b822cbb6d249",
        "name": "Generate Nature background"
      },
      {
        "parameters": {
          "fromEmail": "hello@codegreeks.com.ng",
          "toEmail": "ufuomadoghor@gmail.com",
          "subject": "Attach Images",
          "html": "={{ Object.keys($binary).join(',') }}",
          "options": {
            "appendAttribution": false
          }
        },
        "type": "n8n-nodes-base.emailSend",
        "typeVersion": 2.1,
        "position": [
          1280,
          920
        ],
        "id": "7be4539d-c1e1-4d32-9802-48bfb3c53133",
        "name": "Send Email",
        "webhookId": "d34cedc8-92d7-4d95-9473-cd9b673f2492",
        "credentials": {
          "smtp": {
            "id": "WnKN3dYTm76dNwP0",
            "name": "SMTP Code Greeks Hello Auth"
          }
        },
        "disabled": true
      },
      {
        "parameters": {
          "aggregate": "aggregateAllItemData",
          "options": {
            "includeBinaries": true
          }
        },
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          600,
          360
        ],
        "id": "4fe44309-5f70-4d39-9c57-03ff7c15b0bc",
        "name": "Aggregate"
      },
      {
        "parameters": {
          "jsCode": "let counter = 0;\nconst allBinaryData = {}; // Initialize an empty object\n\n// Iterate over all input items\n$input.all().forEach(item => {\n  // Check if item.binary exists, is an object, and has keys\n  if (item.binary && typeof item.binary === 'object' && Object.keys(item.binary).length > 0) {\n    Object.keys(item.binary).forEach(key => {\n      // Check if the specific binary property exists and is not null\n      if (item.binary[key]) {\n        // Ensure a unique key for each binary file in the consolidated object\n        allBinaryData['imageFile' + counter] = item.binary[key];\n        counter++;\n      }\n    });\n  }\n});\n\n// Return a single item with all consolidated binary data\n// and a simple JSON property indicating the count for convenience\nreturn [\n  {\n    json: {\n      totalImagesFound: counter // This count is based on successfully processed binaries\n    },\n    binary: allBinaryData\n  }\n];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          720,
          940
        ],
        "id": "515906bb-9575-4331-9caf-fff6a5c56012",
        "name": "Code"
      },
      {
        "parameters": {
          "driveId": {
            "__rl": true,
            "mode": "list",
            "value": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "mode": "list",
            "value": "root",
            "cachedResultName": "/ (Root folder)"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          680,
          1080
        ],
        "id": "12e885c4-8bbe-47f7-8d38-4c315e4e506e",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        },
        "disabled": true
      },
      {
        "parameters": {
          "jsCode": "let counter = 0;\nconst allBinaryData = {}; // Initialize an empty object\n\n// Iterate over all input items\n$input.all().forEach(item => {\n  // Check if item.binary exists, is an object, and has keys\n  if (item.binary && typeof item.binary === 'object' && Object.keys(item.binary).length > 0) {\n    Object.keys(item.binary).forEach(key => {\n      // Check if the specific binary property exists and is not null\n      if (item.binary[key]) {\n        // Ensure a unique key for each binary file in the consolidated object\n        allBinaryData['imageFile' + counter] = item.binary[key];\n        counter++;\n      }\n    });\n  }\n});\n\n// Return a single item with all consolidated binary data\n// and a simple JSON property indicating the count for convenience\nreturn [\n  {\n    json: {\n      totalImagesFound: counter // This count is based on successfully processed binaries\n    },\n    binary: allBinaryData\n  }\n];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          600,
          520
        ],
        "id": "c95e4901-9d8d-4d31-9fe3-0634c4605e33",
        "name": "Code1"
      },
      {
        "parameters": {
          "html": "<!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>Your Image Gallery</title>\n    <style>\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";\n            margin: 0;\n            padding: 20px;\n            background-color: #f0f2f5;\n            color: #1c1e21;\n        }\n        .email-wrapper {\n            max-width: 700px;\n            margin: 0 auto;\n            background-color: #ffffff;\n            border: 1px solid #dddfe2;\n            border-radius: 8px;\n            overflow: hidden; /* Ensures padding and rounded corners are respected by children */\n        }\n        .header {\n            background-color: #4A90E2; /* A nice blue */\n            color: white;\n            padding: 25px;\n            text-align: center;\n        }\n        .header h1 {\n            margin: 0;\n            font-size: 24px;\n            font-weight: 600;\n        }\n        .content {\n            padding: 20px 30px; /* More horizontal padding */\n        }\n        .content p {\n            font-size: 16px;\n            line-height: 1.6;\n            color: #333;\n        }\n        .image-gallery {\n            display: flex;\n            flex-wrap: wrap;\n            gap: 15px; /* Space between images */\n            justify-content: center; /* Center images if they don't fill the row */\n            margin-top: 25px;\n            margin-bottom: 25px;\n        }\n        .image-container {\n            flex: 1 1 calc(50% - 15px); /* Two images per row, accounting for gap */\n            max-width: calc(50% - 15px); /* Prevents stretching if only one image in last row */\n            box-sizing: border-box;\n            background-color: #f9f9f9;\n            border: 1px solid #e1e1e1;\n            border-radius: 6px;\n            overflow: hidden; /* Ensure image respects border radius */\n            box-shadow: 0 2px 4px rgba(0,0,0,0.05);\n            transition: transform 0.2s ease-in-out;\n        }\n        .image-container:hover {\n            transform: translateY(-3px);\n            box-shadow: 0 4px 8px rgba(0,0,0,0.08);\n        }\n        .image-container img {\n            width: 100%;\n            height: auto;\n            display: block;\n        }\n        .no-images {\n            text-align: center;\n            font-style: italic;\n            color: #777;\n            padding: 30px 0;\n        }\n        .footer {\n            background-color: #f7f7f7;\n            color: #65676b;\n            padding: 20px;\n            text-align: center;\n            font-size: 12px;\n            border-top: 1px solid #dddfe2;\n        }\n        /* Responsive: Single column for images on smaller screens */\n        @media (max-width: 600px) {\n            .image-container {\n                flex-basis: calc(100% - 15px); /* Full width */\n                max-width: calc(100% - 15px);\n            }\n            .content {\n                padding: 15px 20px;\n            }\n        }\n    </style>\n</head>\n<body>\n    <div class=\"email-wrapper\">\n        <div class=\"header\">\n            <h1>Your Processed Image Collection</h1>\n        </div>\n        <div class=\"content\">\n            <p>\n                Hello, <br>\n                {{#if (eq imageCount 1)}}Here is the 1 image{{else}}Here are the {{imageCount}} images{{/if}} processed by the workflow:\n            </p>\n\n            {{#if (gt imageCount 0)}}\n                <div class=\"image-gallery\">\n                    {{#each imageList}}\n                        <div class=\"image-container\">\n                            <img src=\"data:{{this.mimeType}};base64,{{this.base64Data}}\" alt=\"Processed Image {{@index}}\">\n                        </div>\n                    {{/each}}\n                </div>\n            {{else}}\n                <p class=\"no-images\">No images were found or processed.</p>\n            {{/if}}\n\n            <p>Thank you for using our automated service!</p>\n        </div>\n        <div class=\"footer\">\n            <p>&copy; {{new Date().getFullYear()}} Your Company Name. All rights reserved.<br>\n            This email was generated automatically.</p>\n        </div>\n    </div>\n</body>\n</html>\n"
        },
        "type": "n8n-nodes-base.html",
        "typeVersion": 1.2,
        "position": [
          1020,
          540
        ],
        "id": "25f0f21b-460c-4562-97e9-63b24c938cc3",
        "name": "HTML"
      },
      {
        "parameters": {
          "amount": 3
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          540,
          700
        ],
        "id": "b19c078a-d1a8-4b99-b07a-6657b6ae9b52",
        "name": "If Fail",
        "webhookId": "64d7d605-9c05-4457-a67c-c2f2142e3755"
      },
      {
        "parameters": {
          "amount": 3,
          "unit": "seconds"
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1,
        "position": [
          260,
          740
        ],
        "id": "807da7c5-9561-4007-9d9a-c7f61e55fa4b",
        "name": "Wait Before Processing Another",
        "webhookId": "c27772d0-80c5-4bcf-84a7-0c1a8f95cd1f"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "32625388-1ca3-4dbe-9f13-bc141dafe681",
                "leftValue": "={{ $json.statusCode }}",
                "rightValue": 200,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          300,
          500
        ],
        "id": "bf3331ed-f3e0-4dfa-8f3a-379e594ce3ec",
        "name": "Check Status"
      },
      {
        "parameters": {
          "jsCode": "const inputItem = $input.item; // The single item from 'ConsolidateBinaries'\nconst consolidatedBinaries = inputItem.binary; // This is { imageFile0: {...}, imageFile1: {...} }\nconst imagesForTemplate = [];\nlet actualImageCount = 0;\n\nif (consolidatedBinaries && typeof consolidatedBinaries === 'object') {\n  // Sort keys to maintain a somewhat predictable order if needed\n  const sortedKeys = Object.keys(consolidatedBinaries).sort((a, b) => {\n    const numA = parseInt(a.replace('imageFile', ''), 10);\n    const numB = parseInt(b.replace('imageFile', ''), 10);\n    return numA - numB;\n  });\n\n  for (const key of sortedKeys) {\n    const binaryObject = consolidatedBinaries[key];\n    // Ensure the binary object has the 'data' (base64 string) and 'mimeType'\n    if (binaryObject && typeof binaryObject.data === 'string' && typeof binaryObject.mimeType === 'string') {\n      imagesForTemplate.push({\n        base64Data: binaryObject.data,    // Base64 encoded image string\n        mimeType: binaryObject.mimeType,  // e.g., 'image/png', 'image/jpeg'\n        originalKey: key                  // Optional: if you need to reference the original key\n      });\n      actualImageCount++;\n    } else {\n      console.warn(`Binary object for key ${key} is missing data or mimeType.`);\n    }\n  }\n}\n\n// Output the data in the json property for the HTML node to use\nreturn {\n  json: {\n    imageCount: actualImageCount,\n    imageList: imagesForTemplate // This is the array the HTML template will loop through\n  }\n  // No need to pass along inputItem.binary if it's fully processed into imageList\n};\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          820,
          560
        ],
        "id": "3968a5e5-f4a3-4aa7-b7af-4d60d3c6a8d7",
        "name": "Code2"
      },
      {
        "parameters": {
          "mode": "combine",
          "combineBy": "combineAll",
          "options": {}
        },
        "type": "n8n-nodes-base.merge",
        "typeVersion": 3.1,
        "position": [
          940,
          720
        ],
        "id": "5c8027ea-ae93-44aa-ba76-c7fd7ad32b18",
        "name": "Merge",
        "alwaysOutputData": true
      },
      {
        "parameters": {
          "jsCode": "// Get all binary property names\nconst binaryProperties = Object.keys($input.item.binary || {});\n// Join them with commas\n$json.attachments = binaryProperties.join(',');\nreturn $json;\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1240,
          620
        ],
        "id": "70b212a5-eb25-443e-bd27-4350730423f0",
        "name": "Code3"
      }
    ],
    "connections": {
      "When clicking 'Test workflow'": {
        "main": [
          [
            {
              "node": "Generate Nature background",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Into Batches": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Merge",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Check Status",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Image": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate Nature background": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate": {
        "main": [
          []
        ]
      },
      "Code": {
        "main": [
          []
        ]
      },
      "Code1": {
        "main": [
          [
            {
              "node": "Code2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Google Drive": {
        "main": [
          []
        ]
      },
      "HTML": {
        "main": [
          []
        ]
      },
      "If Fail": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait Before Processing Another": {
        "main": [
          [
            {
              "node": "Edit Image",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check Status": {
        "main": [
          [
            {
              "node": "Wait Before Processing Another",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "If Fail",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Code2": {
        "main": [
          [
            {
              "node": "HTML",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Merge": {
        "main": [
          [
            {
              "node": "Send Email",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "208ae71f-b77d-4e12-ad4d-0d19dcba2896",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-29T11:51:35.547Z",
    "updatedAt": "2025-04-29T14:19:29.129Z",
    "id": "P2xxZLzzgDlzdfYK",
    "name": "My workflow 7",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          200,
          560
        ],
        "id": "c4dd6423-75c3-45ec-b29a-a4a8b66a4f9f",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "url": "http://host.docker.internal:8080/v1/toolkit/test",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          600,
          560
        ],
        "id": "7f3ba4f9-d3c8-4103-b20e-88a588c34468",
        "name": "Test NCA Toolkit",
        "notesInFlow": true,
        "notes": "/v1/toolkit/test"
      },
      {
        "parameters": {
          "url": "https://okw0g4ookgckwc4so40w88kk.cloud.codegreeks.com.ng/v1/toolkit/authenticate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          560
        ],
        "id": "db9405c4-87b6-417b-a809-01b72625bb9b",
        "name": "Authenticate  NCA Toolkit",
        "notesInFlow": true,
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        },
        "notes": "/v1/toolkit/authenticate"
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "nca-toolkit",
          "fileName": "={{ $binary.data.fileName}}",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          1420,
          4220
        ],
        "id": "da1ab8fc-912b-4566-b3cd-7831ee2501dd",
        "name": "S3"
      },
      {
        "parameters": {
          "url": "={{ $json.response.media.media_url }}",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          520,
          4220
        ],
        "id": "ec87c715-719e-4a8b-b507-92f741eec1d5",
        "name": "HTTP Request"
      },
      {
        "parameters": {
          "url": "={{ $json.response }}",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          980,
          4220
        ],
        "id": "93b7f289-399d-4c5d-a182-3266226e6a48",
        "name": "HTTP Request1"
      },
      {
        "parameters": {
          "jsCode": "const newMimeType = 'video/mp4'; // set your desired MIME type\n\nitems.forEach(item => {\n  if (item.binary && item.binary.data) {\n    // Only change the MIME type, keeping everything else untouched.\n    item.binary.data.mimeType = newMimeType;\n  }\n});\n\nreturn items;"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1200,
          4220
        ],
        "id": "07534d86-1bb1-4d45-8b20-5bda57baa856",
        "name": "Set MimeType"
      },
      {
        "parameters": {
          "url": "={{ $('HTTP Request1').item.json.response }}",
          "options": {
            "response": {
              "response": {
                "responseFormat": "file"
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1640,
          4220
        ],
        "id": "df3e899c-c0fc-4ad7-bbd8-b249a9c048be",
        "name": "HTTP Request4"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/media/transcribe",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"media_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"task\": \"transcribe\",\n    \"include_text\": true,\n    \"include_srt\": true,\n    \"include_segments\": true,\n    \"response_type\": \"cloud\",\n    \"id\": \"custom-job-123\"\n  }",
          "options": {
            "timeout": 10000000000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          620,
          1040
        ],
        "id": "f2f01b7b-7425-4c54-9b00-848e22705e28",
        "name": "Transcribe Media",
        "notesInFlow": true,
        "notes": "/v1/media/transcribe"
      },
      {
        "parameters": {
          "content": "### A basic endpoint to verify the availability and functionality of the API. Useful for initial setup and connection tests.\n\n**Documentation Link: [Test Endpoint Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/test.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          420,
          420
        ],
        "id": "ebb2f614-dd55-4276-8c8b-43ea78e7d50e",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "content": "## No-Code Architects Toolkit API\n\n**The API can convert audio files. It creates transcriptions of content. It translates content between languages. It adds captions to videos. It can do very complicated media processing for content creation. The API can also manage files across multiple cloud services like Google Drive, Amazon S3, Google Cloud Storage, and Dropbox.\n\nYou can deploy this toolkit in several ways. It works with Docker. It runs on Google Cloud Platform. It functions on Digital Ocean. You can use it with any system that hosts Docker.\n\nEasily replace services like ChatGPT Whisper, Cloud Convert, Createomate, JSON2Video, PDF(dot)co, Placid and OCodeKit.**\n\n### [Github Link](https://github.com/stephengpope/no-code-architects-toolkit)",
          "height": 2740,
          "width": 2180,
          "color": 7
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          380,
          100
        ],
        "id": "2f4bd18c-21be-4359-9d4f-59336dcbc20a",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "content": "### Verifies the provided API key and authenticates the user. Returns a success message if the API key is valid.\n\n**Documentation Link: [Authenticate Endpoint Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/toolkit/authenticate.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          940,
          420
        ],
        "id": "c247c300-829c-44f1-8199-ff2bc05894a8",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "content": "### Transcribes audio files to text using advanced speech-to-text processing. Supports various languages and audio formats.\n\n**Documentation Link: [Audio Transcribe Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/media_transcribe.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          420,
          900
        ],
        "id": "b4256313-603d-4ff8-a30c-8135e1bb48d5",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "content": "###  Converts an image into a video file with configurable options like duration, frame rate, and zoom effects. Ideal for creating video slideshows or transitions.\n**Documentation Link: [Image to Video Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/image/convert/image_to_video.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          940,
          900
        ],
        "id": "cd8cbb2b-16f3-4e9c-bbef-fea410abeaa0",
        "name": "Sticky Note4"
      },
      {
        "parameters": {
          "content": "### Converts various media files (audio or video) to MP3 format with configurable bitrate and quality settings.\n\n**Documentation Link: [Media to MP3 Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/media/convert/media_to_mp3.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1460,
          900
        ],
        "id": "ac5390e3-017a-4a27-82a6-5987c703f9ed",
        "name": "Sticky Note5"
      },
      {
        "parameters": {
          "content": "### Core Features",
          "height": 460,
          "width": 1580,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          400,
          360
        ],
        "id": "f5f2c2a5-f1bc-441a-8a4f-c59d3c632788",
        "name": "Sticky Note6"
      },
      {
        "parameters": {
          "content": "### Media Transformation",
          "height": 460,
          "width": 1580,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          400,
          840
        ],
        "id": "9a8bc3d5-95a4-4260-adc7-16603c6c8574",
        "name": "Sticky Note7"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/media/transform/mp3",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"media_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"bitrate\": \"256k\",\n    \"id\": \"five\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1640,
          1040
        ],
        "id": "65119606-8def-46a2-96df-844b930a1a2e",
        "name": "Convert To MP3",
        "notesInFlow": true,
        "notes": "/v1/media/convert/mp3"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/image/transform/video",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"image_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Image.png\",\n    \"length\": 15,\n    \"frame_rate\": 25,\n    \"zoom_speed\": 3,\n    \"id\": \"local-extract\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          1040
        ],
        "id": "d8630032-86b1-4959-bbe3-95f86c407c8c",
        "name": "Image To Video",
        "notesInFlow": true,
        "notes": "/v1/image/transform/video"
      },
      {
        "parameters": {
          "content": "### Video Processing",
          "height": 460,
          "width": 1580,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          400,
          1320
        ],
        "id": "ed66cd9a-6d8a-4821-afdf-6ed82475498d",
        "name": "Sticky Note8"
      },
      {
        "parameters": {
          "content": "### Adds captions to a video file, including options for font, position, and styling. It also supports automated language detection and custom replacements in captions.\n\n**Documentation Link: [Video Caption Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/caption_video.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          420,
          1380
        ],
        "id": "16d4f6c1-f814-4ac2-86a1-85f8ce6e6edb",
        "name": "Sticky Note9"
      },
      {
        "parameters": {
          "content": "### Combines multiple video files into a single video file. The input files are concatenated in the specified order, and the final video is uploaded to cloud storage.\n\n**Documentation Link: [Video Concatenate Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/video/concatenate.md)**",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          940,
          1380
        ],
        "id": "f6d6ea5f-8ac2-4869-8043-a0092f13492c",
        "name": "Sticky Note10"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/video/caption",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"video_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\",\n    \"settings\": {\n        \"line_color\": \"#FFFFFF\",\n        \"word_color\": \"#FFFF00\",\n        \"all_caps\": false,\n        \"max_words_per_line\": 3,\n        \"font_size\": 60,\n        \"bold\": false,\n        \"italic\": false,\n        \"underline\": false,\n        \"strikeout\": false,\n        \"outline_width\": 3,\n        \"shadow_offset\": 4,\n        \"style\": \"highlight\",\n        \"font_family\": \"The Bold Font\",\n        \"position\": \"bottom_center\"\n    },\n    \"id\": \"gdrive-five\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          620,
          1520
        ],
        "id": "9d85213b-67c6-4db5-ad77-3a9a7dfac1ab",
        "name": "Add Captions",
        "notesInFlow": true,
        "notes": "/v1/video/caption"
      },
      {
        "parameters": {
          "content": "### Advanced Media Manipulation - Provides a flexible way to compose and manipulate media files using FFmpeg. Supports complex media operations like transcoding, concatenation, and filtering.\n**Documentation Link: [FFmpeg Compose Documentation](https://github.com/stephengpope/no-code-architects-toolkit/blob/main/docs/ffmpeg/ffmpeg_compose.md)**",
          "height": 460,
          "width": 1580,
          "color": 3
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          400,
          1800
        ],
        "id": "9b0ea457-4fe2-4dfb-8fac-496ce6aa9c48",
        "name": "Sticky Note11"
      },
      {
        "parameters": {
          "content": "### This node trims a 5-second clip (from 10s to 15s) from the input video and audio, then outputs it with basic encoding and some metadata like thumbnail and duration.\n",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          420,
          1880
        ],
        "id": "8bb25187-25a2-49f5-9837-ef0b26d33345",
        "name": "Sticky Note12"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Horizontal Video.mp4\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[0:v]trim=start=10:end=15,setpts=PTS-STARTPTS[vout];[0:a]atrim=start=10:end=15,asetpts=PTS-STARTPTS[aout]\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        { \"option\": \"-map\", \"argument\": \"[vout]\" },\n        { \"option\": \"-map\", \"argument\": \"[aout]\" },\n        { \"option\": \"-c:v\", \"argument\": \"libx264\" },\n        { \"option\": \"-c:a\", \"argument\": \"aac\" }\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"thumbnail\": true,\n    \"filesize\": true,\n    \"duration\": true,\n    \"bitrate\": true,\n    \"encoder\": true\n  },\n  \"id\": \"extract_clip_001\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          600,
          2020
        ],
        "id": "70a9a01f-3da8-4065-b11c-5e6c08c5e1e5",
        "name": "Compose Clip",
        "notesInFlow": true,
        "notes": "/v1/ffmpeg/compose"
      },
      {
        "parameters": {
          "content": "### This node crops a vertical slice from the original video, scales it to 1080x1920 for vertical format, and keeps the original audio. Great for turning horizontal videos into vertical ones for shorts or reels.\n",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          940,
          1880
        ],
        "id": "650d9aae-8bc7-4370-bbe1-1e006f550050",
        "name": "Sticky Note13"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"inputs\": [\n    {\n      \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Horizontal Video.mp4\"\n    }\n  ],\n  \"filters\": [\n    {\n      \"filter\": \"[0:v]crop=658:1080:656:0,scale=1080:1920[v]\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        {\n          \"option\": \"-map\",\n          \"argument\": \"[v]\"\n        },\n        {\n          \"option\": \"-map\",\n          \"argument\": \"0:a\"\n        },\n        {\n          \"option\": \"-c:a\",\n          \"argument\": \"copy\"\n        }\n      ]\n    }\n  ]\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          2020
        ],
        "id": "ebac6f98-11c2-4b3f-9fa1-9b9cd52a65b0",
        "name": "Compose Crop",
        "notesInFlow": true,
        "notes": "/v1/ffmpeg/compose"
      },
      {
        "parameters": {
          "content": "### This node layers two audio tracks — one from the video and one from an external MP3 — adjusting their volumes and mixing them together, while keeping the original video unchanged. Perfect for adding background music under existing dialogue or sound.\n",
          "height": 340,
          "width": 500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1460,
          1880
        ],
        "id": "eda4986a-c906-46ba-9d4a-8221fff389af",
        "name": "Sticky Note14"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"inputs\": [\n        {\n            \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/Horizontal%20Video.mp4\"\n        },\n        {\n            \"file_url\": \"https://storage.googleapis.com/sgplabs-general-storage/I'm%20Back.mp3\"\n        }\n    ],\n    \"filters\": [\n        {\n            \"filter\": \"[0:a]volume=1[audio1];[1:a]volume=0.60[audio2];[audio1][audio2]amix=inputs=2:duration=longest[outa]\"\n        }\n    ],\n    \"outputs\": [\n        {\n            \"options\": [\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"0:v\"\n                },\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"[outa]\"\n                },\n                {\n                    \"option\": \"-c:v\",\n                    \"argument\": \"copy\"\n                },\n                {\n                    \"option\": \"-c:a\",\n                    \"argument\": \"aac\"\n                }\n            ]\n        }\n    ],\n    \"id\": \"audio-layering\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1660,
          2020
        ],
        "id": "cd75ece4-5190-4ca2-a970-68da8d55f1d6",
        "name": "Compose Mixer",
        "notesInFlow": true,
        "notes": "/v1/ffmpeg/compose"
      },
      {
        "parameters": {
          "content": "## Bonus - Downloading youtube videos",
          "height": 520,
          "width": 1580,
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          400,
          2280
        ],
        "id": "9a23249e-0de2-4f4b-87a8-313c7e5a901e",
        "name": "Sticky Note15"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/media/transcribe",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"media_url\": \"{{ $json.response.media.media_url }}\",\n    \"task\": \"transcribe\",\n    \"include_text\": true,\n    \"include_srt\": false,\n    \"include_segments\": false,\n    \"response_type\": \"direct\",\n    \"id\": \"custom-job-123\"\n  }",
          "options": {
            "timeout": 500000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          760,
          2480
        ],
        "id": "c9ae111a-33bd-426d-b4bd-fd2d562c83f8",
        "name": "Transcribe Media1",
        "notesInFlow": true,
        "notes": "/v1/media/transcribe"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Please analyze the given text and create a structured summary following these guidelines:\n\n1. *General Summary*:\n   - Provide a concise overview of the main topic or purpose of the text in one paragraph.\n   - Focus on the essence of the content without excessive detail.\n\n2. *Key Moments*:\n   - List the most important points, events, or concepts from the text.\n   - Use bullet points for clarity.\n   - Keep each point short and focused.\n\n3. *Instructions (if applicable)*:\n   - If the text is a tutorial or instructional, list the steps in a clear order.\n   - Use numbered points for steps.\n   - If not applicable, state: \"This text does not contain instructions.\"\n\n4. *Format requirements*:\n   - Use markdown for headers (e.g., ## General Summary) and bullet points.\n   - Do not use tables; use simple text for lists or comparisons (e.g., \"Element: opis\").\n   - Ensure the message is simple and displays correctly in the Telegram app, avoiding unsupported features like nested lists or tables.\n\nHere is the text: {{ $json.response.text }}\n\n\n"
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.6,
        "position": [
          980,
          2480
        ],
        "id": "dab7a3eb-4a8a-4cd3-8227-9b46297f630a",
        "name": "Basic LLM Chain"
      },
      {
        "parameters": {
          "model": "openrouter/quasar-alpha",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          960,
          2680
        ],
        "id": "e41ab240-07c1-4b07-83d5-b83ba1bd6267",
        "name": "OpenRouter Chat Model"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/image/transform/video",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"image_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Image.png\",\n    \"length\": 15,\n    \"frame_rate\": 25,\n    \"zoom_speed\": 3,\n    \"id\": \"local-extract\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          760,
          4220
        ],
        "id": "4651312c-ccbe-4f6a-b9bf-13f382b1588f",
        "name": "Image To Video2",
        "notesInFlow": true,
        "notes": "/v1/image/transform/video"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/BETA/media/download",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"media_url\": \"https://www.youtube.com/watch?v=x0QoYIHGn68\",\n  \"id\": \"123\",\n  \"format\": {\n    \"quality\": \"bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] / bv*+ba/b\"\n  },\n  \"audio\": {\n    \"extract\": true,\n    \"format\": \"mp3\",\n    \"quality\": \"192\"\n  },\n  \"thumbnails\": {\n    \"download\": false,\n    \"download_all\": false,\n    \"formats\": [\"jpg\", \"webp\"],\n    \"convert\": true,\n    \"embed_in_audio\": false\n  },\n  \"download\": {\n    \"max_filesize\": 100000000,\n    \"rate_limit\": \"5000000K\",\n    \"retries\": 3\n  }\n}",
          "options": {
            "timeout": 500000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          480,
          2480
        ],
        "id": "490689e4-51df-4371-bafd-2828ff15ed29",
        "name": "Download YT Videos1",
        "notesInFlow": true,
        "notes": "v1/BETA/media/download"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/video/concatenate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"video_urls\":[\n        {\"video_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"},\n        {\"video_url\":\"https://storage.googleapis.com/sgplabs-general-storage/Vertical%20Video.mp4\"}\n    ],\n    \"id\": \"2323\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1140,
          1520
        ],
        "id": "29ac8b62-ccba-4c8c-9093-26a92e5620ee",
        "name": "Combine Videos",
        "notesInFlow": true,
        "notes": "v1/image/transform/video"
      }
    ],
    "connections": {
      "S3": {
        "main": [
          [
            {
              "node": "HTTP Request4",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set MimeType": {
        "main": [
          [
            {
              "node": "S3",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Transcribe Media1": {
        "main": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Download YT Videos1": {
        "main": [
          [
            {
              "node": "Transcribe Media1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "7f2c152e-8a6a-41c1-a422-098947a79dd7",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-30T00:15:59.675Z",
    "updatedAt": "2025-04-30T00:35:24.032Z",
    "id": "Br8pnmUr5J4yjDto",
    "name": "My workflow 8",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -80,
          -60
        ],
        "id": "2df1fc72-cae0-40d5-806c-12d2ca5b9ae4",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "create",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "mj00h1eru2xiami",
          "fieldsUi": {
            "fieldValues": [
              {
                "fieldName": "topic",
                "fieldValue": "test 2"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          240,
          -20
        ],
        "id": "abadecb6-6b89-4982-ac8c-4a21cd282041",
        "name": "NocoDB",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "getAll",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "mj00h1eru2xiami",
          "options": {}
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          140,
          120
        ],
        "id": "a9cee30e-8d84-4964-89ae-aab6fbfbc83c",
        "name": "NocoDB1",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "9edf1ad4-5a3e-4081-8c67-050117bd406d",
                "leftValue": "={{ $json.topic }}",
                "rightValue": "",
                "operator": {
                  "type": "string",
                  "operation": "equals",
                  "name": "filter.operator.equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          360,
          120
        ],
        "id": "3436e77c-d959-43f3-9183-b1a49415fdc0",
        "name": "If"
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "delete",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "mj00h1eru2xiami",
          "id": "={{ $json.Id }}"
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          580,
          40
        ],
        "id": "abe448d4-1594-445f-bd13-432119e1d258",
        "name": "NocoDB2",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      },
      {
        "parameters": {
          "schema": {
            "__rl": true,
            "mode": "list",
            "value": "public"
          },
          "table": {
            "__rl": true,
            "value": "odds_comparison",
            "mode": "list",
            "cachedResultName": "odds_comparison"
          },
          "columns": {
            "mappingMode": "defineBelow",
            "value": {
              "from_event": "={{ $json.data[0].fromEvent }}",
              "from_odds": "={{ $json.data[0].fromOdds }}",
              "from_country": "={{ $json.data[0].fromCountry }}",
              "to_event": "={{ $json.data[0].toEvent }}",
              "to_odds": "={{ $json.data[0].toOdds }}",
              "to_country": "={{ $json.data[0].toCountry }}",
              "from_bookmarker_code": "={{ $json.data[0].fromBookmarkerCode }}",
              "from_bookmarker_name": "={{ $json.data[0].fromBookmarkerName }}",
              "to_bookmarker_code": "={{ $json.data[0].toBookmarkerCode }}",
              "to_bookmarker_name": "={{ $json.data[0].toBookmarkerCode }}"
            },
            "matchingColumns": [
              "id"
            ],
            "schema": [
              {
                "id": "id",
                "displayName": "id",
                "required": false,
                "defaultMatch": true,
                "display": true,
                "type": "number",
                "canBeUsedToMatch": true,
                "removed": true
              },
              {
                "id": "from_event",
                "displayName": "from_event",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_odds",
                "displayName": "from_odds",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "number",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_country",
                "displayName": "from_country",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_event",
                "displayName": "to_event",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_odds",
                "displayName": "to_odds",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "number",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_country",
                "displayName": "to_country",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_bookmarker_code",
                "displayName": "from_bookmarker_code",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "from_bookmarker_name",
                "displayName": "from_bookmarker_name",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_bookmarker_code",
                "displayName": "to_bookmarker_code",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "to_bookmarker_name",
                "displayName": "to_bookmarker_name",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "string",
                "canBeUsedToMatch": true
              },
              {
                "id": "created_at",
                "displayName": "created_at",
                "required": false,
                "defaultMatch": false,
                "display": true,
                "type": "dateTime",
                "canBeUsedToMatch": true,
                "removed": true
              }
            ],
            "attemptToConvertTypes": false,
            "convertFieldsToString": false
          },
          "options": {}
        },
        "type": "n8n-nodes-base.postgres",
        "typeVersion": 2.6,
        "position": [
          480,
          -160
        ],
        "id": "aebc3cdb-c699-4354-859a-d2c3bcc15870",
        "name": "Postgres",
        "credentials": {
          "postgres": {
            "id": "RUKVCw6ooKdLAsfw",
            "name": "Postgres account"
          }
        }
      },
      {
        "parameters": {
          "url": "https://d67dyr5utlysq5rkfnbuqmwdo40gexiw.lambda-url.eu-north-1.on.aws/scrape?page=1",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          120,
          -200
        ],
        "id": "13790cc2-ba42-4060-9393-e0130f2436c7",
        "name": "HTTP Request"
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "NocoDB1",
              "type": "main",
              "index": 0
            },
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "NocoDB": {
        "main": [
          []
        ]
      },
      "NocoDB1": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "NocoDB2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Postgres": {
        "main": [
          []
        ]
      },
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Postgres",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "d348179c-14c1-40a1-8037-93c08db9a997",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-15T08:45:55.525Z",
    "updatedAt": "2025-04-15T09:03:49.504Z",
    "id": "HUrAb4jleOzFCie0",
    "name": "Story Test",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "url": "https://patroisconsulting.com/transtalk.srt",
          "options": {}
        },
        "id": "7ef9d7a6-4139-42e9-adb6-7665f1290b93",
        "name": "HTTP Request",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.1,
        "position": [
          -1360,
          0
        ]
      },
      {
        "parameters": {
          "functionCode": "// Get the content of the SRT file\nconst content = $input.item.json.data;\n\n// Use regex to extract only the text content, removing timestamps and indices\nconst regex = /\\d+\\r?\\n\\d{2}:\\d{2}:\\d{2},\\d{3} --> \\d{2}:\\d{2}:\\d{2},\\d{3}\\r?\\n(.*?)\\r?\\n\\r?\\n/gs;\nconst matches = [...content.matchAll(regex)];\nconst cleanedText = matches\n    .map(match => match[1].replace(/\\[Music\\]/g, '').trim())\n    .filter(text => text)\n    .join('\\n\\n');\n\nreturn {\n  cleanedText\n};"
        },
        "id": "415f5a00-bd72-43e4-99e9-b61b2e9dfba2",
        "name": "Clean Transcript",
        "type": "n8n-nodes-base.function",
        "typeVersion": 1,
        "position": [
          -1140,
          0
        ]
      },
      {
        "parameters": {
          "keepOnlySet": true,
          "values": {
            "string": [
              {
                "name": "transcript",
                "value": "={{ $json.cleanedText }}"
              }
            ]
          },
          "options": {}
        },
        "id": "4619a777-a6f8-40b0-abef-61c65ed82be3",
        "name": "Store Transcript",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          -920,
          0
        ]
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -1380,
          -200
        ],
        "id": "ad8cf092-fbfd-4f1d-9580-71d1ae56e0bf",
        "name": "When clicking ‘Test workflow’"
      }
    ],
    "connections": {
      "HTTP Request": {
        "main": [
          [
            {
              "node": "Clean Transcript",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Clean Transcript": {
        "main": [
          [
            {
              "node": "Store Transcript",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "HTTP Request",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "e65e525c-8093-42e2-8a41-53eb5579bfae",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-30T07:40:56.446Z",
    "updatedAt": "2025-05-30T07:40:56.985Z",
    "id": "oYyunZHJn7zv4A24",
    "name": "My workflow 17",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "path": "a06ea760-49bf-45b8-bea5-4f10383b2248",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          0
        ],
        "id": "d3b47f14-5295-4102-adf8-706013101d7e",
        "name": "Webhook",
        "webhookId": "a06ea760-49bf-45b8-bea5-4f10383b2248"
      }
    ],
    "connections": {},
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "11d78b39-d68a-46e8-a116-00690e701f54",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-19T23:33:43.555Z",
    "updatedAt": "2025-05-02T09:34:23.468Z",
    "id": "rUk4g1ILTv6E4W7f",
    "name": "FM Energy AI Agent",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "mode": "insert",
          "pineconeIndex": {
            "__rl": true,
            "value": "fmenergy",
            "mode": "list",
            "cachedResultName": "fmenergy"
          },
          "options": {}
        },
        "id": "6526aa1e-ec99-40ff-b146-6e3cfab66258",
        "name": "Pinecone Vector Store",
        "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
        "position": [
          240,
          240
        ],
        "typeVersion": 1,
        "credentials": {
          "pineconeApi": {
            "id": "iQNAw3qDblps7M3M",
            "name": "PineconeApi account"
          }
        }
      },
      {
        "parameters": {
          "dataType": "binary",
          "binaryMode": "specificField",
          "options": {}
        },
        "id": "707cbdca-a652-4e25-9d4a-39f2083d6a30",
        "name": "Default Data Loader",
        "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
        "position": [
          400,
          460
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "chunkOverlap": 100,
          "options": {}
        },
        "id": "9e7626b1-0dfc-4fd9-84dc-ea33490272f3",
        "name": "Recursive Character Text Splitter",
        "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
        "position": [
          380,
          660
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "options": {
            "systemMessage": "=Role: Professional Customer Support Agent for FM Energy Limited\nObjective: Assist customers with inquiries related to building, construction, IT infrastructure, road projects, and industrial supplies, while providing a friendly, human-like experience.\n\nGreeting Protocol (New Chats Only):\n\nBegin with a warm, dynamic greeting using relevant emojis to set a friendly tone.\n\nExample:\n\n“Hello! 👋 Welcome to FM Energy Limited. I’m Chika, your virtual assistant. How can I help you with construction, IT infrastructure, or industrial supply needs today? 🏗️💻🚧”\n\nConversational Flow & Human Touch:\n\nRespond naturally, using short, clear sentences and everyday language.\n\nDon’t provide exhaustive details up front. Offer concise answers, and invite the customer to ask for more information if needed.\n\nExample:\n\n“We offer a range of services in building, IT, roads, and industrial supplies. Would you like to know more about a specific area?”\n\nRelevance Check:\n\nGently steer conversations back to FM Energy’s services if off-topic.\n\nExample:\n\n“I’m here to help with FM Energy’s construction, IT, roads, or industrial supply services. Let me know how I can assist you in these areas! 🛠️”\n\nContextual Awareness:\n\nUse Pinecone’s namespace: “fmcompanydoc” to access company-specific information.\n\nReference previous conversations (if available) to provide continuity and a personalized touch.\n\nIf unsure, ask clarifying questions rather than guessing.\n\nResponse Guidelines:\n\nHighlight key services using bullet points for clarity:\n\nBuilding & Construction\n\nIT Infrastructure Setup\n\nRoad Construction\n\nIndustrial Supply Chain\n\nProvide project references only when relevant or upon request.\n\nExample:\n\n“You can explore our past projects here: https://fmenergyltd.com/project”\n\nIf a customer’s question is vague, ask a follow-up question to clarify before giving detailed information.\n\nExample:\n\n“Could you tell me more about the project you’re interested in?”\n\nProfessional, Friendly Tone:\n\nAvoid slang, but use a warm, approachable style.\n\nUse the customer’s name if available, and thank them for reaching out.\n\nExample:\n\n“Thank you for your question, [Customer Name]! I’m here to help.”\n\nEscalation & Contact Details:\n\nIf unable to resolve or if the customer requests, provide contact information for urgent support:\n\n“For urgent inquiries, you can reach us at 📞 +234 703 680 7855 or 📧 info@fmenergyltd.com.”\n\nKey Humanization Tips:\n\nUse emojis to add warmth, but don’t overdo it.\n\nOccasionally check if your answer was helpful, and offer to provide more details.\n\nExample:\n\n“Did that answer your question, or would you like more details?”\n\nAdapt responses based on customer cues, mirroring their communication style where appropriate.\n\nThis approach ensures Chika feels approachable and human, avoids overwhelming users with information, and encourages natural, two-way conversations-delivering a customer experience that’s both efficient and personable."
          }
        },
        "id": "ca991830-4a84-4ad4-bc42-5a0c50418a78",
        "name": "AI Agent",
        "type": "@n8n/n8n-nodes-langchain.agent",
        "position": [
          -20,
          1080
        ],
        "typeVersion": 1.7
      },
      {
        "parameters": {
          "name": "company_documents_tool",
          "description": "FM Energy knowledge base",
          "topK": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Limit', ``, 'number') }}"
        },
        "id": "853cb60b-6f86-43d7-b530-b565ee2c6e45",
        "name": "Vector Store Tool",
        "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
        "position": [
          660,
          1820
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "pineconeIndex": {
            "__rl": true,
            "value": "fmenergy",
            "mode": "list",
            "cachedResultName": "fmenergy"
          },
          "options": {}
        },
        "id": "d685fe20-9d8e-4475-ac5a-03421e051650",
        "name": "Pinecone Vector Store (Retrieval)",
        "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
        "position": [
          1080,
          1780
        ],
        "typeVersion": 1,
        "credentials": {
          "pineconeApi": {
            "id": "iQNAw3qDblps7M3M",
            "name": "PineconeApi account"
          }
        }
      },
      {
        "parameters": {
          "operation": "download",
          "fileId": {
            "__rl": true,
            "mode": "id",
            "value": "={{ $json.id }}"
          },
          "options": {
            "fileName": "={{ $json.name }}"
          }
        },
        "id": "7d6a1501-d91a-41c4-b988-332d7fdd83d1",
        "name": "Download File From Google Drive",
        "type": "n8n-nodes-base.googleDrive",
        "position": [
          20,
          240
        ],
        "typeVersion": 3,
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "content": "## Chat with company documents"
        },
        "id": "c8baf6d6-f85f-449c-8a7d-2bdefce91f44",
        "name": "Sticky Note2",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -20,
          900
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "pollTimes": {
            "item": [
              {
                "mode": "everyMinute"
              }
            ]
          },
          "triggerOn": "specificFolder",
          "folderToWatch": {
            "__rl": true,
            "value": "https://drive.google.com/drive/folders/19jnNaMuC544WygGhLcsY_urHS5Z0WSgg",
            "mode": "url"
          },
          "event": "fileUpdated",
          "options": {}
        },
        "id": "78cad2ef-04a3-407d-8435-b158681a7c36",
        "name": "Google Drive File Updated",
        "type": "n8n-nodes-base.googleDriveTrigger",
        "position": [
          -300,
          380
        ],
        "typeVersion": 1,
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "pollTimes": {
            "item": [
              {
                "mode": "everyMinute"
              }
            ]
          },
          "triggerOn": "specificFolder",
          "folderToWatch": {
            "__rl": true,
            "value": "https://drive.google.com/drive/folders/19jnNaMuC544WygGhLcsY_urHS5Z0WSgg",
            "mode": "url"
          },
          "event": "fileCreated",
          "options": {
            "fileType": "all"
          }
        },
        "id": "79865195-cc4c-44a5-a8dd-abc65e094747",
        "name": "Google Drive File Created",
        "type": "n8n-nodes-base.googleDriveTrigger",
        "position": [
          -300,
          120
        ],
        "typeVersion": 1,
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "contextWindowLength": 1000
        },
        "id": "e9a9c8d4-3410-4917-903f-2fff4a807072",
        "name": "Window Buffer Memory",
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "position": [
          60,
          1380
        ],
        "typeVersion": 1.3
      },
      {
        "parameters": {
          "public": true,
          "mode": "webhook",
          "options": {}
        },
        "id": "71769072-7194-495f-86b0-2393f69c58f6",
        "name": "When chat message received",
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "position": [
          -360,
          1080
        ],
        "webhookId": "5f1c0c82-0ff9-40c7-9e2e-b1a96ffe24cd",
        "typeVersion": 1.1
      },
      {
        "parameters": {
          "content": "## Add docuemnts to vector store when updating or creating new documents in Google Drive",
          "width": 320
        },
        "id": "93a4c08b-067c-4777-b940-97f04c3c1782",
        "name": "Sticky Note",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "## Set up steps\n\n1. Google Cloud Project and Vertex AI API:\n* Create a Google Cloud project.\n* Enable the Vertex AI API for your project.\n2. Google AI API Key:\n* Obtain a Google AI API key from Google AI Studio.\n3. Pinecone Account:\n* Create a free account on the Pinecone website.\nObtain your API key from your Pinecone dashboard.\n* Create an index named company-files in your Pinecone project.\n4. Google Drive:\n* Create a dedicated folder in your Google Drive where company documents will be stored.\n5. Credentials in n8n: Configure credentials in your n8n environment for:\n* Google Drive OAuth2\n* Google Gemini(PaLM) Api (using your Google AI API key)\n* Pinecone API (using your Pinecone API key)\n5. Import the Workflow:\n* Import this workflow into your n8n instance.\n6. Configure the Workflow:\n* Update both Google Drive Trigger nodes to watch the specific folder you created in your Google Drive.\n* Configure the Pinecone Vector Store nodes to use your company-files index.",
          "height": 720,
          "width": 420
        },
        "id": "31cc0e07-11e5-4dd1-aa88-0de759052465",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -980,
          460
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
        "typeVersion": 1.2,
        "position": [
          180,
          460
        ],
        "id": "df7cccae-2040-4e86-8e9a-c199421c83e8",
        "name": "Embeddings OpenAI",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          -140,
          1300
        ],
        "id": "9eff060a-fdb4-47c2-8896-4bc710ba6f57",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
        "typeVersion": 1.2,
        "position": [
          340,
          1680
        ],
        "id": "f3c0b2b7-68eb-494e-9dc4-682aff15c730",
        "name": "Embeddings OpenAI1 Retrieval",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          1060,
          1680
        ],
        "id": "ffeb7fcf-344f-4508-b5f4-06933db5c379",
        "name": "OpenRouter Chat Model1",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "cf925257-5d3f-4423-a75d-ae147c41705f",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          -360,
          620
        ],
        "id": "48800a99-3f05-44ed-bc0f-57e301b0dc60",
        "name": "Webhook",
        "webhookId": "cf925257-5d3f-4423-a75d-ae147c41705f"
      },
      {
        "parameters": {
          "driveId": {
            "__rl": true,
            "value": "https://drive.google.com/drive/folders/19jnNaMuC544WygGhLcsY_urHS5Z0WSgg",
            "mode": "url"
          },
          "folderId": {
            "__rl": true,
            "value": "https://drive.google.com/drive/folders/19jnNaMuC544WygGhLcsY_urHS5Z0WSgg",
            "mode": "url"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          -140,
          620
        ],
        "id": "0fea4979-e01a-4cde-8502-5c4b8aa1462a",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "content": "## Upload File To Google Drive From Form",
          "height": 220,
          "width": 480,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          -420,
          560
        ],
        "id": "7ad27941-978e-4c76-b199-00eaaaea1903",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "description": "Use this tool to get more information about company"
        },
        "type": "@n8n/n8n-nodes-langchain.toolVectorStore",
        "typeVersion": 1.1,
        "position": [
          220,
          1340
        ],
        "id": "7d113fb8-7cca-4963-8dc3-1f1dd1d2cdff",
        "name": "Answer questions with a vector store"
      },
      {
        "parameters": {
          "pineconeIndex": {
            "__rl": true,
            "value": "fmenergy",
            "mode": "list",
            "cachedResultName": "fmenergy"
          },
          "options": {
            "pineconeNamespace": "fmcompanydoc"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
        "typeVersion": 1.1,
        "position": [
          860,
          1180
        ],
        "id": "db27f6e4-5117-4cd4-bc0f-8ebb378784ad",
        "name": "Pinecone Vector Store1",
        "credentials": {
          "pineconeApi": {
            "id": "iQNAw3qDblps7M3M",
            "name": "PineconeApi account"
          }
        }
      },
      {
        "parameters": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "gpt-4o-mini"
          },
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1.2,
        "position": [
          400,
          1480
        ],
        "id": "83b114ba-7a9d-40ab-8b0a-066dbed079e2",
        "name": "OpenAI Chat Model",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
        "typeVersion": 1.2,
        "position": [
          900,
          1400
        ],
        "id": "c42c49ed-5164-4454-a153-d5a45c52dbbc",
        "name": "Embeddings OpenAI1",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "mode": "retrieve-as-tool",
          "toolName": "company_knowledge",
          "toolDescription": "retrieve information about company",
          "pineconeIndex": {
            "__rl": true,
            "value": "fmenergy",
            "mode": "list",
            "cachedResultName": "fmenergy"
          },
          "options": {
            "pineconeNamespace": "fmcompanydoc"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
        "typeVersion": 1.1,
        "position": [
          1220,
          1220
        ],
        "id": "89a1cbb6-2213-4d5c-a22c-f1c2afcbddb3",
        "name": "Pinecone Vector Store2",
        "credentials": {
          "pineconeApi": {
            "id": "KWCKGnNZiwhFIvCh",
            "name": "PineconeApi account 2"
          }
        }
      }
    ],
    "connections": {
      "Vector Store Tool": {
        "ai_tool": [
          []
        ]
      },
      "Default Data Loader": {
        "ai_document": [
          [
            {
              "node": "Pinecone Vector Store",
              "type": "ai_document",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "Google Drive File Created": {
        "main": [
          [
            {
              "node": "Download File From Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Google Drive File Updated": {
        "main": [
          [
            {
              "node": "Download File From Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "When chat message received": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Download File From Google Drive": {
        "main": [
          [
            {
              "node": "Pinecone Vector Store",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Pinecone Vector Store (Retrieval)": {
        "ai_vectorStore": [
          [
            {
              "node": "Vector Store Tool",
              "type": "ai_vectorStore",
              "index": 0
            }
          ]
        ]
      },
      "Recursive Character Text Splitter": {
        "ai_textSplitter": [
          [
            {
              "node": "Default Data Loader",
              "type": "ai_textSplitter",
              "index": 0
            }
          ]
        ]
      },
      "Embeddings OpenAI": {
        "ai_embedding": [
          [
            {
              "node": "Pinecone Vector Store",
              "type": "ai_embedding",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Embeddings OpenAI1 Retrieval": {
        "ai_embedding": [
          [
            {
              "node": "Pinecone Vector Store (Retrieval)",
              "type": "ai_embedding",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model1": {
        "ai_languageModel": [
          [
            {
              "node": "Vector Store Tool",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Webhook": {
        "main": [
          [
            {
              "node": "Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Pinecone Vector Store1": {
        "ai_vectorStore": [
          [
            {
              "node": "Answer questions with a vector store",
              "type": "ai_vectorStore",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Answer questions with a vector store",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Embeddings OpenAI1": {
        "ai_embedding": [
          [
            {
              "node": "Pinecone Vector Store1",
              "type": "ai_embedding",
              "index": 0
            }
          ]
        ]
      },
      "Answer questions with a vector store": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": {
      "node:Google Drive File Updated": {
        "lastTimeChecked": "2025-07-30T21:33:57Z"
      },
      "node:Google Drive File Created": {
        "lastTimeChecked": "2025-07-30T21:33:58Z"
      }
    },
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "eacf56a9-ccc1-41ca-845d-20f4cbfdcc6a",
    "triggerCount": 4,
    "tags": []
  },
  {
    "createdAt": "2025-05-12T14:44:20.182Z",
    "updatedAt": "2025-05-12T16:31:41.365Z",
    "id": "UadsDB8qwPzdpKyf",
    "name": "gemini image pro",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "method": "POST",
          "url": "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent",
          "authentication": "predefinedCredentialType",
          "nodeCredentialType": "googlePalmApi",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"contents\": [\n    {\n      \"role\": \"user\",\n      \"parts\": [\n        {\n          \"text\": \"Generate a 6-image bedtime story for children. The style should be a dreamy cartoon, with each image in 16:9 1080p resolution. The story features three consistent characters: Jack (a boy), Stella (a girl), and Agent Cat (a clever cat). It's crucial that these characters look the same in every image.\\n\\nFor each of the 6 scenes in this peaceful time-travel adventure:\\n1.  Create an image. \\n2.  Directly **embed fancy, decorative text within each image** that briefly explains the scene. This text should be part of the image itself.\\n3.  Provide the corresponding story text for that scene as a separate text output. Please skip all keywords like 'Scene x'; just return the story content.\\n\\nThe story should evoke feelings of calm, safety, and peaceful dreams.\"\n        }\n      ]\n    }\n  ],\n  \"generationConfig\": {\n    \"responseModalities\": [\"Text\", \"Image\"]\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          3680,
          -80
        ],
        "id": "5edf6b2a-6516-4fe9-b4aa-04661345635c",
        "name": "HTTP Request6",
        "credentials": {
          "googlePalmApi": {
            "id": "1oKHqi69KVgH6mJC",
            "name": "Google Gemini(PaLM) Api account"
          }
        }
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          3460,
          -80
        ],
        "id": "5025bda6-3a7f-47a1-a108-afe74439cb5c",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "fieldToSplitOut": "candidates[0].content.parts",
          "options": {}
        },
        "type": "n8n-nodes-base.splitOut",
        "typeVersion": 1,
        "position": [
          3940,
          -80
        ],
        "id": "dbaa5ca4-2785-4a8d-bf29-6150e5f920c0",
        "name": "Split Out"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "9bcbbccd-9689-47d9-a171-0e085e77c78f",
                "leftValue": "={{ $json.inlineData }}",
                "rightValue": "",
                "operator": {
                  "type": "object",
                  "operation": "exists",
                  "singleValue": true
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.filter",
        "typeVersion": 2.2,
        "position": [
          4200,
          -80
        ],
        "id": "e4b688c0-f125-4efb-a9fa-928f7eb313ef",
        "name": "Filter"
      },
      {
        "parameters": {
          "operation": "toBinary",
          "sourceProperty": "inlineData.data",
          "options": {}
        },
        "type": "n8n-nodes-base.convertToFile",
        "typeVersion": 1.1,
        "position": [
          4500,
          -80
        ],
        "id": "5d55bf40-f9a3-4963-91e0-7a4a81533e6b",
        "name": "Convert to File"
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "HTTP Request6",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request6": {
        "main": [
          [
            {
              "node": "Split Out",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Out": {
        "main": [
          [
            {
              "node": "Filter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Filter": {
        "main": [
          [
            {
              "node": "Convert to File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "9e358cef-a2ae-435f-a4f0-18434f8d0502",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-27T15:27:05.727Z",
    "updatedAt": "2025-04-27T15:27:05.727Z",
    "id": "HtamQiLPNxazqsy8",
    "name": "My workflow 6",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "promptType": "define",
          "text": "=short quote each image comes in background this is how the background is describe generate unique motivation quote for each to suit the background as in json\n\nexample \n{\"background\": \"misty mountains at sunrise\", \"quote\": \"The highest peaks are reached by those who never stop climbing.\"}",
          "hasOutputParser": true
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.6,
        "position": [
          180,
          0
        ],
        "id": "064315fa-e6c0-4dff-8711-4c5b51cbe23f",
        "name": "Basic LLM Chain"
      },
      {
        "parameters": {
          "jsonSchemaExample": "{\"background\": \"misty mountains at sunrise\", \"quote\": \"The highest peaks are reached by those who never stop climbing.\"}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          360,
          200
        ],
        "id": "a6165a4f-1098-40b5-9f12-7170cac546cc",
        "name": "Structured Output Parser"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "f73ef518-f3f8-4773-9b1a-042c747c41ef",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "model": "google/gemini-2.0-flash-exp:free",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          180,
          220
        ],
        "id": "7ae78bac-bb39-4d6a-9f0b-efea9bbfc223",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      }
    ],
    "connections": {
      "Structured Output Parser": {
        "ai_outputParser": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "183bdb7d-f117-4e40-bbff-022d0e7acd0a",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-06T07:35:26.469Z",
    "updatedAt": "2025-04-06T08:00:09.268Z",
    "id": "TQ6udN2ZnjEJUqDi",
    "name": "My workflow 4",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "options": {}
        },
        "type": "n8n-nodes-base.respondToWebhook",
        "typeVersion": 1.1,
        "position": [
          880,
          -100
        ],
        "id": "9b9ceebc-4e65-42a7-b649-d79c3625614a",
        "name": "Respond to Webhook"
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.toolCalculator",
        "typeVersion": 1,
        "position": [
          860,
          140
        ],
        "id": "8243c836-3dfe-420b-b90f-b8ef2767ea8f",
        "name": "Calculator"
      },
      {
        "parameters": {
          "contextWindowLength": 200
        },
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          600,
          120
        ],
        "id": "89bf173e-5c0a-474e-bcc4-99667667adf0",
        "name": "Simple Memory"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          380,
          120
        ],
        "id": "e1bd6824-5e6a-4f82-b517-d532f36e6402",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {
          "options": {
            "systemMessage": "You are Ema - a friendly AI assistant for Gode Greeks, a full-stack web development company. \nGuide users through project requests with this flow:\n\n1. INITIAL GREETING:\n\"Hi there! 👋 I'm Ema, your virtual project assistant. How can I call you?\"\n\n2. COLLECT PURPOSE:\n\"Nice to meet you, {name}! Are you here to:\n1. Report an issue with an existing project\n2. Discuss a new development project\nPlease type 1 or 2\"\n\n3A. FOR ISSUES:\n\"Let's get this resolved! Please describe the issue in detail:\n- What functionality is affected?\n- When did you first notice it?\n- Any error messages?\n(You can attach screenshots later)\"\n\n3B. FOR NEW PROJECTS:\n\"Exciting! Let's scope your project:\n- What type of web application do you need? (e.g., e-commerce, SaaS, etc.)\n- Key features required\n- Design preferences (custom or template?)\n- Need third-party integrations?\n- Any specific tech stack preferences?\"\n\n4. BUDGET & TIMELINE:\n(After collecting details)\n\"Based on your requirements, here's our estimate:\n🛠️ Scope: {project_summary}\n💰 Estimated Cost: {price_range} \n📅 Timeline: {duration} \n\nThis includes:\n- {list_key_features}\n- {inclusions}\n\n5. CLOSING:\n\"Does this align with your expectations? Would you like to:\n1. Schedule a consultation\n2. Adjust requirements\n3. Get formal proposal\n4. Save for later\n\n[If yes] Please share your email/phone for follow-up:\n{contact_info}\n\n[If no] No worries! We're here when you're ready. Feel free to reach out later!\"\n\nMaintain friendly, professional tone. Ask one question at a time. \nFormat responses clearly with emojis and bullet points when helpful."
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.8,
        "position": [
          520,
          -100
        ],
        "id": "6572b324-f073-49bc-995d-7694d2719b8e",
        "name": "AI Agent"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          -140,
          100
        ],
        "id": "5415ef6d-aae5-4f7b-91b5-8366a5105581",
        "name": "When chat message received",
        "webhookId": "9184847f-dbd9-4b2f-be46-197daa498fef"
      },
      {
        "parameters": {
          "path": "800a9682-aaa5-494c-94bb-517ca837b45b",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          -60
        ],
        "id": "ca7c453b-d0c2-44db-b53c-670b37639687",
        "name": "Webhook",
        "webhookId": "800a9682-aaa5-494c-94bb-517ca837b45b"
      }
    ],
    "connections": {
      "AI Agent": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Calculator": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "When chat message received": {
        "main": [
          []
        ]
      },
      "Webhook": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "58ff0277-31ad-4e50-b328-b818d68bbcf4",
    "triggerCount": 2,
    "tags": []
  },
  {
    "createdAt": "2025-05-12T11:24:55.124Z",
    "updatedAt": "2025-05-12T20:16:42.924Z",
    "id": "MlFmvoHXeaGnhD1T",
    "name": "Bed",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "fieldToSplitOut": "output",
          "options": {}
        },
        "type": "n8n-nodes-base.splitOut",
        "typeVersion": 1,
        "position": [
          880,
          200
        ],
        "id": "4cb16063-9bea-4286-aa29-958799deb95e",
        "name": "Split Out"
      },
      {
        "parameters": {
          "rule": {
            "interval": [
              {}
            ]
          }
        },
        "type": "n8n-nodes-base.scheduleTrigger",
        "typeVersion": 1.2,
        "position": [
          560,
          -160
        ],
        "id": "cfe95054-a57e-4838-bd2e-b210cbb1c5cb",
        "name": "Schedule Trigger"
      },
      {
        "parameters": {
          "databaseId": 169,
          "tableId": 684,
          "returnAll": true,
          "additionalOptions": {
            "filters": {
              "fields": [
                {
                  "field": 6662,
                  "operator": "contains",
                  "value": "pending"
                }
              ]
            }
          }
        },
        "type": "n8n-nodes-base.baserow",
        "typeVersion": 1,
        "position": [
          740,
          -160
        ],
        "id": "6c8b73f0-8d5f-43c0-8b40-453a300b71b4",
        "name": "Baserow"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.limit",
        "typeVersion": 1,
        "position": [
          920,
          -160
        ],
        "id": "42c1b097-4505-4212-bedf-a15f7e3c5b34",
        "name": "Limit"
      },
      {
        "parameters": {
          "schemaType": "manual",
          "inputSchema": "{\n  \"type\": \"array\",\n  \"items\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"Prompt\": {\n        \"type\": \"string\",\n        \"description\": \"A detailed prompt describing a scene in dreamy, child-style cartoon art.\"\n      }\n    },\n    \"required\": [\"Prompt\"]\n  }\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          720,
          340
        ],
        "id": "5e94e846-4dc1-4d20-a826-7d5863fd6179",
        "name": "Structured Output Parser"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=",
          "messages": {
            "messageValues": [
              {
                "message": "=You are a gentle bedtime storyteller. Your task is to write a calming, imaginative story for children, designed to ease them into peaceful sleep.\n\nThe story is based on the following structure provided by the user:\n- **Topic**: {{ $('Limit').item.json.topic }}\n- **Audience**: {{ $('Limit').item.json.audience }}\n- **Length**: {{ $json.length }} minutes\n\nThe story should:\n- Feature the character: **{{ $('Limit').item.json.character }}**\n- Be paced for bedtime, with soft language and a peaceful, whimsical tone\n- Be structured into {{ $('Limit').item.json['Images to generate'] }} flowing, dreamlike segments (approximately one every 30 seconds)\n- Avoid labels like \"Scene 1\" or visual stage directions—just tell the story\n- Gently transition between moments to create a seamless, soothing journey\n- Be suitable for text-to-speech output (TTS), so avoid abrupt endings, complex wordplay, or anything overly energetic\n\nEnd the story with a gentle wind-down that encourages sleep and gives a sense of comfort, warmth, and wonder.\n\nOnly return the clean, final story text—no explanations or formatting instructions. The script is for TTS never \\n\\n it must be plain text.\n\n\n\n\n"
              }
            ]
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.5,
        "position": [
          1280,
          -160
        ],
        "id": "c08c1d7f-8d6d-4b73-82b5-d5f676cb3759",
        "name": "Scripter"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=Full Script: {{ $('Parser').item.json.output.Story }}",
          "hasOutputParser": true,
          "messages": {
            "messageValues": [
              {
                "message": "=You are an AI assistant that generates **high-quality image generation prompts** for **bedtime story video production**.  \n\nYour goal is to convert a **complete story script** into a set of **visual scene prompts**, with each one representing a unique, cinematic moment from the story. These prompts will be used to create **painting-style visual assets** for animation or motion graphics.\n\n---\n\n### 📌 Requirements:\n\n- Create exactly **{{ $('Limit').item.json['Images to generate'] }}** prompts — one per unique visual moment.\n- **Each prompt must represent a distinct part of the story** — divide the story naturally into key scenes or beats.\n- Use the provided **art style** consistently across all prompts.\n- **Do not include character names, dialogue, or text** in the prompt.\n- **Keep each prompt under 240 characters.**\n- Add at the end of each prompt: Art style in a painting<lora:Milde_style_art:1>\n\n---\n\n### 🎬 Visual Prompt Guidelines:\n\nEach prompt should be:\n\n- **Scene-Based:** Capture a full visual moment from the story, not just a mood or object.\n- **Descriptive, not Narrative:** Focus on what’s visually present, not names or storytelling.\n- **Cinematic:** Include visual techniques (e.g., soft lighting, depth of field, wide shot, close-up).\n- **Emotionally Evocative:** Convey feelings like wonder, calm, or curiosity.\n- **Technically Rich:** Mention visual textures, light effects, depth, camera angle, and other compositional details.\n- **Consistently Styled:** Reflect the given artistic direction (e.g., watercolor, pastel, digital painting, Pixar-style).\n\n---\n\n### ❌ Avoid:\n\n- Using **character names** (e.g., \"Tilly the Turtle\")\n- Including **spoken lines** or any **written text**\n- Overly poetic or vague language\n- Repeating visual setups between prompts\n"
              }
            ]
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.5,
        "position": [
          540,
          200
        ],
        "id": "0eeb9d9c-2165-4084-a5d0-38f08fecd121",
        "name": "Image Prompt Generator"
      },
      {
        "parameters": {
          "mode": "jsonToBinary",
          "convertAllData": false,
          "sourceKey": "base64Image",
          "options": {
            "dataIsBase64": true,
            "mimeType": "image/png"
          }
        },
        "id": "71bc5fb1-f492-40a5-a73d-2b5358abe9cb",
        "name": "Convert to/from binary data2",
        "type": "n8n-nodes-base.moveBinaryData",
        "typeVersion": 1,
        "position": [
          2080,
          200
        ]
      },
      {
        "parameters": {
          "fields": {
            "values": [
              {
                "name": "base64Image",
                "stringValue": "={{ $json.images }}"
              }
            ]
          },
          "options": {}
        },
        "id": "378c0518-cf59-44b8-9b14-3a3e7e74a237",
        "name": "Base46 To String",
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.1,
        "position": [
          1900,
          200
        ]
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "n8n-nodes-base.splitInBatches",
        "typeVersion": 3,
        "position": [
          1520,
          200
        ],
        "id": "1f91a53e-fcac-4507-9b23-61998b57fa4f",
        "name": "Loop Over Items1"
      },
      {
        "parameters": {
          "content": "## Create Image Prompts\n",
          "height": 360,
          "width": 920,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          520,
          100
        ],
        "id": "2c29a343-c56e-43c8-afc1-638cf5497fc3",
        "name": "Sticky Note9"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "40dc6e90-ddd9-447e-8db0-6a7bb1906f9d",
                "name": "prompt",
                "value": "={{ $json.Prompt }}",
                "type": "string"
              },
              {
                "id": "cbceb8b0-b983-41cd-b318-38f190a8f6fe",
                "name": "FileName",
                "value": "=http://host.docker.internal:9000/bed-time-stories/{{ $('Generate UUID').item.json.UUID }}.png",
                "type": "string"
              },
              {
                "id": "f411eb6e-d07f-4bd1-b186-f1e91897213d",
                "name": "Clip Duration",
                "value": "={{ $('Get Audio Duration').item.json.response[0].duration / $('Limit').item.json['Images to generate']}}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1240,
          200
        ],
        "id": "008aec0b-dd36-4b92-bde7-5a1c25574eab",
        "name": "Set Prompt & url"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8880/v1/audio/speech",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"model\": \"kokoro\",\n  \"input\": {{ JSON.stringify($json.output.Story) }},\n  \"voice\": \"{{ $('Limit').item.json.voice.value }}\",\n  \"response_format\": \"mp3\",\n  \"speed\": {{ $('Set length & Speed').item.json.speed }}\n}",
          "options": {
            "response": {
              "response": {
                "fullResponse": true
              }
            }
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          2100,
          -100
        ],
        "id": "e3aabe3f-ccba-4149-9a28-c2bd15f5bf7d",
        "name": "Generate TTS2",
        "notesInFlow": true
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "bed-time-stories",
          "fileName": "={{ $('Limit').item.json.UUID }}.{{ $binary.data.fileExtension }}",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          2260,
          -100
        ],
        "id": "19f1b57c-4e9b-4bfd-aa28-7890f78c4b25",
        "name": "Upload Audio S3"
      },
      {
        "parameters": {
          "schemaType": "manual",
          "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"Story\": {\n      \"type\": \"string\"\n    }\n  },\n  \"required\": [\"Story\"]\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          1800,
          -60
        ],
        "id": "ca21c6e2-089c-4ab5-9b95-4cec52c6cdb1",
        "name": "Structured Output Parser1"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "b72be074-4a67-4f45-be3e-e47d464131c3",
                "name": "length",
                "value": "={{ $json.length }}",
                "type": "number"
              },
              {
                "id": "3c6b0102-35c6-4a47-9923-46e044faa10e",
                "name": "speed",
                "value": "={{ $json.speed }}",
                "type": "number"
              },
              {
                "id": "09eebe6d-21a4-4737-b825-1e44df45493b",
                "name": "Number of images to generate",
                "value": "={{ $json['Images to generate'] }}",
                "type": "number"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1100,
          -160
        ],
        "id": "dce1de1e-6ce2-4629-926c-126fa6a8dba4",
        "name": "Set length & Speed"
      },
      {
        "parameters": {
          "fieldsToAggregate": {
            "fieldToAggregate": [
              {
                "fieldToAggregate": "response"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.aggregate",
        "typeVersion": 1,
        "position": [
          1720,
          580
        ],
        "id": "b3e21715-dce4-4aae-8cb3-b59a1a44673d",
        "name": "Aggregate2"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/image/transform/video",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"id\": \"image-zoom-out\",\n  \"image_url\": \"{{ $json.FileName }}\",\n  \"length\": {{ $json['Clip Duration'] }},\n  \"frame_rate\": 25,\n  \"zoom_speed\": 1.5\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1520,
          580
        ],
        "id": "0c84f590-11d7-4a68-a7af-09ae7a7b049d",
        "name": "Create Video Clips"
      },
      {
        "parameters": {
          "jsCode": "// Extract the array of URLs\nconst urls =  $input.first().json.response || [];\n\n// Map URLs into the required structure\nconst formattedURLs = urls.map(url => ({ \"video_url\": url }));\n\n// Return the transformed data\nreturn [{\n    json: {\n        \"video_urls\": formattedURLs\n    }\n}];"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1900,
          580
        ],
        "id": "c6a4fb12-1509-4e21-9b8b-0a5591cc046b",
        "name": "Video url to array"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/video/concatenate",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"video_urls\": {{ JSON.stringify($json.video_urls) }},\n    \"id\": \"Job\"\n}",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          2100,
          580
        ],
        "id": "57feab84-f111-4c1c-a764-9777a4b54b4b",
        "name": "Create Video"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n    \"id\": \"audio-layering\",\n    \"inputs\": [\n        {\n            \"file_url\": \"{{ $json.response }}\"\n        },\n        {\n            \"file_url\": \"{{ $('Get Audio Duration').item.json.response[0].file_url }}\"\n        }\n    ],\n    \"filters\": [\n        {\n            \"filter\": \"[1:a]volume=1[outa]\"\n        }\n    ],\n    \"outputs\": [\n        {\n            \"options\": [\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"0:v\"\n                },\n                {\n                    \"option\": \"-map\",\n                    \"argument\": \"[outa]\"\n                },\n                {\n                    \"option\": \"-c:v\",\n                    \"argument\": \"copy\"\n                },\n                {\n                    \"option\": \"-c:a\",\n                    \"argument\": \"aac\"\n                }\n            ]\n        }\n    ]\n}\n",
          "options": {
            "timeout": 50000
          }
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1520,
          860
        ],
        "id": "22991774-972d-4178-a09b-459bb473599a",
        "name": "Add TTS To Video",
        "notesInFlow": true,
        "credentials": {
          "httpHeaderAuth": {
            "id": "3WoRb4b1SlRVZShI",
            "name": "Header Auth account NCA"
          }
        }
      },
      {
        "parameters": {
          "content": "## Create Script\n",
          "height": 280,
          "width": 1500,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          520,
          -220
        ],
        "id": "3f3118bd-4841-49be-89ab-832c09c89fce",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "content": "## Create TTS\n",
          "height": 280,
          "width": 560
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          2040,
          -220
        ],
        "id": "f34083d7-b00a-488e-829b-7f2110300752",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "content": "## Generate Images using local Juggernaut XI",
          "height": 360,
          "width": 960,
          "color": 6
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1460,
          100
        ],
        "id": "a39d8eae-8731-4833-9b30-8bf531fce418",
        "name": "Sticky Note10"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:7860/sdapi/v1/txt2img",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"prompt\": \"{{ $json.prompt }}\",\n  \"negative_prompt\": \"Naked, Nude, fake eyes, deformed eyes, bad eyes, cgi, 3D, digital, airbrushed\",\n  \"steps\": 25,\n  \"send_images\": true,\n  \"cfg_scale\": 3,\n  \"width\": 1024,\n  \"height\": 576,\n  \"sampler_name\": \"DPM++ 2M\",\n  \"scheduler\": \"Karras\"\n}",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          1720,
          200
        ],
        "id": "43659ff6-eebb-4ea7-ad34-35c7e74051ae",
        "name": "Local SD API",
        "notesInFlow": true
      },
      {
        "parameters": {
          "operation": "upload",
          "bucketName": "bed-time-stories",
          "fileName": "={{ $('Generate UUID').item.json.UUID }}.png",
          "additionalFields": {}
        },
        "type": "n8n-nodes-base.s3",
        "typeVersion": 1,
        "position": [
          2260,
          200
        ],
        "id": "1cba3332-f7d4-43b8-913c-9920db0a23e3",
        "name": "Upload Image"
      },
      {
        "parameters": {
          "content": "## Create the video",
          "height": 240,
          "width": 960,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1460,
          500
        ],
        "id": "ee10288f-47a2-4336-8378-575804d742d4",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "content": "## Add TTS to video",
          "height": 240,
          "width": 340,
          "color": 5
        },
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          1500,
          780
        ],
        "id": "79e61cb6-08cf-45c9-b7f3-68c36b4acb98",
        "name": "Sticky Note3"
      },
      {
        "parameters": {
          "operation": "update",
          "databaseId": 169,
          "tableId": 684,
          "rowId": "={{ $('Baserow').item.json.id }}",
          "fieldsUi": {
            "fieldValues": [
              {
                "fieldId": 6668,
                "fieldValue": "={{ $json.response[0].file_url }}"
              },
              {
                "fieldId": 6662,
                "fieldValue": "done"
              }
            ]
          }
        },
        "type": "n8n-nodes-base.baserow",
        "typeVersion": 1,
        "position": [
          1720,
          860
        ],
        "id": "fec83670-635d-4783-a5d4-274f837627fe",
        "name": "Update record"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "http://host.docker.internal:8080/v1/ffmpeg/compose",
          "authentication": "genericCredentialType",
          "genericAuthType": "httpHeaderAuth",
          "sendBody": true,
          "specifyBody": "json",
          "jsonBody": "={\n  \"id\": \"get-audio-duration\",\n  \"inputs\": [\n    {\n      \"file_url\": \"http://host.docker.internal:9000/bed-time-stories/{{ $('Limit').item.json.UUID }}.mp3\"\n    }\n  ],\n  \"outputs\": [\n    {\n      \"options\": [\n        {\n          \"option\": \"-f\",\n          \"argument\": \"mp3\"\n        }\n      ]\n    }\n  ],\n  \"metadata\": {\n    \"duration\": true\n  }\n}\n",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          2440,
          -100
        ],
        "id": "aafd5080-53a0-4776-b747-26799fd07dc9",
        "name": "Get Audio Duration",
        "notesInFlow": true
      },
      {
        "parameters": {
          "model": "=google/gemini-2.0-flash-exp:free",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          560,
          340
        ],
        "id": "bdf72f81-1333-467a-a0a9-16013e939108",
        "name": "OpenRouter",
        "notesInFlow": true,
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        },
        "notes": "google/gemini-2.0-flash-exp:free"
      },
      {
        "parameters": {
          "model": "=google/gemini-2.0-flash-exp:free",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          1360,
          -40
        ],
        "id": "58c3473e-5f6f-44d4-b9ec-0bb18c76dca2",
        "name": "OpenRouter1",
        "notesInFlow": true,
        "notes": "google/gemini-2.0-flash-exp:free"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "={{ $json.text }}",
          "hasOutputParser": true,
          "messages": {
            "messageValues": [
              {
                "message": "=take the user imput and output as JSON\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"Story\": {\n      \"type\": \"string\"\n    }\n  },\n  \"required\": [\"Story\"]\n}"
              }
            ]
          }
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.5,
        "position": [
          1740,
          -160
        ],
        "id": "836aa2c4-3244-41f5-b508-f6255266c352",
        "name": "Parser"
      },
      {
        "parameters": {
          "action": "generate",
          "dataPropertyName": "UUID"
        },
        "type": "n8n-nodes-base.crypto",
        "typeVersion": 1,
        "position": [
          1060,
          200
        ],
        "id": "fb5f4f34-866f-4d74-918a-e4553496bcff",
        "name": "Generate UUID"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "05c8d19f-67c2-4e9e-b1fc-102c807dada8",
                "name": "text",
                "value": "={{ $json[\"text\"].replace(/\\n/g, \" \") }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          1600,
          -160
        ],
        "id": "0e22d904-1311-4149-8d98-39b3415f0537",
        "name": "Formatter"
      }
    ],
    "connections": {
      "Split Out": {
        "main": [
          [
            {
              "node": "Generate UUID",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Schedule Trigger": {
        "main": [
          [
            {
              "node": "Baserow",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Baserow": {
        "main": [
          [
            {
              "node": "Limit",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Limit": {
        "main": [
          [
            {
              "node": "Set length & Speed",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser": {
        "ai_outputParser": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Scripter": {
        "main": [
          [
            {
              "node": "Formatter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Image Prompt Generator": {
        "main": [
          [
            {
              "node": "Split Out",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Convert to/from binary data2": {
        "main": [
          [
            {
              "node": "Upload Image",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Base46 To String": {
        "main": [
          [
            {
              "node": "Convert to/from binary data2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Loop Over Items1": {
        "main": [
          [],
          [
            {
              "node": "Local SD API",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set Prompt & url": {
        "main": [
          [
            {
              "node": "Create Video Clips",
              "type": "main",
              "index": 0
            },
            {
              "node": "Loop Over Items1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate TTS2": {
        "main": [
          [
            {
              "node": "Upload Audio S3",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload Audio S3": {
        "main": [
          [
            {
              "node": "Get Audio Duration",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Structured Output Parser1": {
        "ai_outputParser": [
          [
            {
              "node": "Parser",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Set length & Speed": {
        "main": [
          [
            {
              "node": "Scripter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Aggregate2": {
        "main": [
          [
            {
              "node": "Video url to array",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Create Video Clips": {
        "main": [
          [
            {
              "node": "Aggregate2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Video url to array": {
        "main": [
          [
            {
              "node": "Create Video",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Create Video": {
        "main": [
          [
            {
              "node": "Add TTS To Video",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Add TTS To Video": {
        "main": [
          [
            {
              "node": "Update record",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Local SD API": {
        "main": [
          [
            {
              "node": "Base46 To String",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Upload Image": {
        "main": [
          [
            {
              "node": "Loop Over Items1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Get Audio Duration": {
        "main": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter": {
        "ai_languageModel": [
          [
            {
              "node": "Image Prompt Generator",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter1": {
        "ai_languageModel": [
          [
            {
              "node": "Scripter",
              "type": "ai_languageModel",
              "index": 0
            },
            {
              "node": "Parser",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Parser": {
        "main": [
          [
            {
              "node": "Generate TTS2",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate UUID": {
        "main": [
          [
            {
              "node": "Set Prompt & url",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Formatter": {
        "main": [
          [
            {
              "node": "Parser",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "678308f1-e035-47da-973c-cfe3b2aac132",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-12T19:21:38.540Z",
    "updatedAt": "2025-05-12T19:31:33.836Z",
    "id": "exYOLpXVAVQBuonE",
    "name": "Auto Share Images Via Gdrive",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "name": "={{ $('When chat message received').item.json.chatInput }}",
          "driveId": {
            "__rl": true,
            "mode": "list",
            "value": "My Drive"
          },
          "folderId": {
            "__rl": true,
            "value": "1xVEiuIiRH1ElcDYSnubgHyzIcpPZz13e",
            "mode": "list",
            "cachedResultName": "photos",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1xVEiuIiRH1ElcDYSnubgHyzIcpPZz13e"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          560,
          440
        ],
        "id": "cd095580-79dd-42cb-975d-deca8361eb6a",
        "name": "Upload Google Drive1",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "b392bd57-025e-40cc-a71c-4e4844864c98",
                "name": "webViewLink",
                "value": "={{ $('Upload Google Drive1').item.json.webViewLink }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          940,
          440
        ],
        "id": "92c76b77-3d60-425b-abb6-3d8e11b346e1",
        "name": "Response"
      },
      {
        "parameters": {
          "operation": "share",
          "fileId": {
            "__rl": true,
            "value": "={{ $json.id }}",
            "mode": "id"
          },
          "permissionsUi": {
            "permissionsValues": {
              "role": "reader",
              "type": "anyone",
              "allowFileDiscovery": true
            }
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          720,
          440
        ],
        "id": "7c81e3e9-50b7-4d3e-be30-4470b0e0e633",
        "name": "Share File",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "content": "## Enter Your Google Details \n",
          "height": 220,
          "width": 340
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          520,
          380
        ],
        "typeVersion": 1,
        "id": "56327ed6-ab94-4566-ba9d-d0e73fb6ace1",
        "name": "Sticky Note"
      },
      {
        "parameters": {
          "content": "## Change Model\n### You can use any model you want for this.  ",
          "color": 4
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -300,
          640
        ],
        "typeVersion": 1,
        "id": "ddd7554e-abe4-4d7f-b8ac-c94dff539a74",
        "name": "Sticky Note1"
      },
      {
        "parameters": {
          "options": {
            "systemMessage": "=##OVERVIEW##\nYou are an image prompt creator. Use the provided input to craft a detailed, descriptive prompt suitable for pollinations. The goal is to create an image prompt that is specific, vivid, and clear.\n\n##CONTENT##\n- Provide only a 40-50 word prompt in markdown format.\n- Include detailed adjectives, colors, textures, and scene descriptions to add depth.\n- Focus on clarity, with emphasis on specific elements and their attributes.\n- Do not wrap the output in quotation marks or brackets.\n- Do not include line breaks \"\"\\n\" in output or # symbols.\n\n##SOP##\n\n- Utilize adjectives to detail colors, lighting, and textures.\n- Keep the prompt concise, accurate, and no more than 50 words.\n",
            "passthroughBinaryImages": true
          }
        },
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          40,
          440
        ],
        "id": "de55864f-49cb-4df2-abcb-b6f9964b12ba",
        "name": "Image Prompter"
      },
      {
        "parameters": {
          "method": "POST",
          "url": "=https://image.pollinations.ai/prompt/{{ $json.output }}?width=1280&height=853&nologo=true",
          "options": {}
        },
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 4.2,
        "position": [
          360,
          440
        ],
        "id": "7ba6abfa-c784-4f52-a566-071b4c55f98d",
        "name": "POLLINATIONS HTTP",
        "retryOnFail": true,
        "waitBetweenTries": 2000,
        "maxTries": 5
      },
      {
        "parameters": {
          "content": "## CHANGE IMAGE SIZE! In POLLINATIONS HTTP\nYou can change the image size that will be returned, by editing the request.\nThis will also return images without watermarks.  \nhttps://image.pollinations.ai/prompt/{{ $json.output }}?width=CHANGE ME&height=CHANGE ME&nologo=true\n\n## Give Pollinations credit when using images creating using their api on the web or your applications.  ##\n## https://pollinations.ai ",
          "height": 360,
          "width": 680,
          "color": 3
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1,
        "id": "cfe09540-7e66-410b-973d-f3a4522dbfc3",
        "name": "Sticky Note2"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          80,
          660
        ],
        "id": "439b4373-8253-4b8a-b2e3-d37a6d9ec66a",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {},
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          240,
          660
        ],
        "id": "0102e87e-b779-42c9-bd76-9ed2190bf4af",
        "name": "Simple Memory"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          -260,
          460
        ],
        "id": "9d9f4392-1363-471e-8562-0b56fbd280a3",
        "name": "When chat message received",
        "webhookId": "fdd1dfe6-17dd-41fa-bbd5-400f68199a51"
      }
    ],
    "connections": {
      "Upload Google Drive1": {
        "main": [
          [
            {
              "node": "Share File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Share File": {
        "main": [
          [
            {
              "node": "Response",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Image Prompter": {
        "main": [
          [
            {
              "node": "POLLINATIONS HTTP",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "POLLINATIONS HTTP": {
        "main": [
          [
            {
              "node": "Upload Google Drive1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Image Prompter",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Simple Memory": {
        "ai_memory": [
          [
            {
              "node": "Image Prompter",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      },
      "When chat message received": {
        "main": [
          [
            {
              "node": "Image Prompter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "bb4c6285-36be-4b6a-8ba3-0d919b978287",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-05T07:35:06.510Z",
    "updatedAt": "2025-05-05T07:35:06.510Z",
    "id": "rymQvd9gsuGU5VNP",
    "name": "My workflow 11",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          400,
          -140
        ],
        "id": "f72242f9-c7ac-4e09-b3d2-8a9d01773a0b",
        "name": "When clicking 'Test workflow'"
      },
      {
        "parameters": {
          "command": "=yt-dlp -x --audio-format mp3 -o \"output1.mp3\" \"https://www.youtube.com/watch?v=_OLUSELxFok\"\n"
        },
        "type": "n8n-nodes-base.executeCommand",
        "typeVersion": 1,
        "position": [
          620,
          -140
        ],
        "id": "63afa350-6b1e-47f7-8f88-b58192754f8c",
        "name": "Execute Command"
      },
      {
        "parameters": {
          "filePath": "=output1.mp3"
        },
        "type": "n8n-nodes-base.readBinaryFile",
        "typeVersion": 1,
        "position": [
          840,
          -140
        ],
        "id": "ab4e70b0-1526-46a3-8cb8-9f59e1ed2e61",
        "name": "Read Binary File"
      }
    ],
    "connections": {
      "When clicking 'Test workflow'": {
        "main": [
          [
            {
              "node": "Execute Command",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Execute Command": {
        "main": [
          [
            {
              "node": "Read Binary File",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {},
    "versionId": "14a666cd-449b-4736-9a01-d0ba9bbceeb2",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-03-19T22:18:29.956Z",
    "updatedAt": "2025-04-01T05:46:02.092Z",
    "id": "BGq4SrJkbwRdGCMa",
    "name": "fmenergy",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "pollTimes": {
            "item": [
              {
                "mode": "everyMinute"
              }
            ]
          },
          "triggerOn": "specificFolder",
          "folderToWatch": {
            "__rl": true,
            "value": "https://drive.google.com/drive/folders/19jnNaMuC544WygGhLcsY_urHS5Z0WSgg",
            "mode": "url"
          },
          "event": "fileCreated",
          "options": {}
        },
        "type": "n8n-nodes-base.googleDriveTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "cce30010-8be1-4e98-adae-e7db321c2f8f",
        "name": "Google Drive Trigger",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "operation": "download",
          "fileId": {
            "__rl": true,
            "value": "={{ $json.id }}",
            "mode": "id"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          220,
          0
        ],
        "id": "567c52b4-a327-42c9-8aa3-75e0405c1c31",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      },
      {
        "parameters": {
          "mode": "insert",
          "pineconeIndex": {
            "__rl": true,
            "value": "fmenergy",
            "mode": "list",
            "cachedResultName": "fmenergy"
          },
          "options": {
            "pineconeNamespace": "ufumzy"
          }
        },
        "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
        "typeVersion": 1,
        "position": [
          440,
          0
        ],
        "id": "227da7c4-11bf-4753-ac99-f44ff7cf7694",
        "name": "Pinecone Vector Store",
        "credentials": {
          "pineconeApi": {
            "id": "iQNAw3qDblps7M3M",
            "name": "PineconeApi account"
          }
        }
      },
      {
        "parameters": {
          "dataType": "binary",
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
        "typeVersion": 1,
        "position": [
          560,
          180
        ],
        "id": "a3157fba-506f-4357-8378-086e5b032cdc",
        "name": "Default Data Loader"
      },
      {
        "parameters": {
          "chunkOverlap": 200,
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.textSplitterRecursiveCharacterTextSplitter",
        "typeVersion": 1,
        "position": [
          660,
          340
        ],
        "id": "49b19557-dda3-445d-83fc-2c906d8e1cf2",
        "name": "Recursive Character Text Splitter"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
        "typeVersion": 1.2,
        "position": [
          300,
          220
        ],
        "id": "04ad1a1c-747c-47d8-88ce-bcc093d31c85",
        "name": "Embeddings OpenAI",
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      }
    ],
    "connections": {
      "Google Drive Trigger": {
        "main": [
          [
            {
              "node": "Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Google Drive": {
        "main": [
          [
            {
              "node": "Pinecone Vector Store",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Default Data Loader": {
        "ai_document": [
          [
            {
              "node": "Pinecone Vector Store",
              "type": "ai_document",
              "index": 0
            }
          ]
        ]
      },
      "Recursive Character Text Splitter": {
        "ai_textSplitter": [
          [
            {
              "node": "Default Data Loader",
              "type": "ai_textSplitter",
              "index": 0
            }
          ]
        ]
      },
      "Embeddings OpenAI": {
        "ai_embedding": [
          [
            {
              "node": "Pinecone Vector Store",
              "type": "ai_embedding",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "74890fe6-d8ff-4a20-94d2-60c1bdb13f08",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-27T13:04:22.881Z",
    "updatedAt": "2025-04-27T13:40:04.853Z",
    "id": "U8qaw25o2V6hfUgL",
    "name": "Airtel Line",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "httpMethod": "POST",
          "path": "31248d8f-0cab-47c9-8208-7718d76c86ce",
          "options": {}
        },
        "type": "n8n-nodes-base.webhook",
        "typeVersion": 2,
        "position": [
          0,
          0
        ],
        "id": "78582fb1-98a3-4163-9b10-d2b8aab882be",
        "name": "Webhook",
        "webhookId": "31248d8f-0cab-47c9-8208-7718d76c86ce"
      }
    ],
    "connections": {},
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": null,
    "pinData": {
      "Webhook": [
        {
          "json": {
            "headers": {
              "host": "n8n.cloud.codegreeks.com.ng",
              "user-agent": "axios/1.7.9",
              "content-length": "1004",
              "accept-encoding": "gzip, compress, deflate, br",
              "content-type": "application/json",
              "x-forwarded-for": "10.0.1.1",
              "x-forwarded-host": "n8n.cloud.codegreeks.com.ng",
              "x-forwarded-port": "443",
              "x-forwarded-proto": "https",
              "x-forwarded-server": "35ba6a9e5e8d",
              "x-real-ip": "10.0.1.1"
            },
            "params": {},
            "query": {},
            "body": {
              "event": "messages.upsert",
              "instance": "airtel",
              "data": {
                "key": {
                  "remoteJid": "2347037954391@s.whatsapp.net",
                  "fromMe": false,
                  "id": "3F62089988901F3527AD"
                },
                "pushName": "Ufuoma",
                "status": "DELIVERY_ACK",
                "message": {
                  "messageContextInfo": {
                    "deviceListMetadata": {
                      "senderKeyHash": "mT8qtBCnIRfdFQ==",
                      "senderTimestamp": "1745246635",
                      "recipientKeyHash": "IN5EnvHH2STpGQ==",
                      "recipientTimestamp": "1745691088"
                    },
                    "deviceListMetadataVersion": 2
                  },
                  "conversation": "https://codelist.cc/v3/"
                },
                "contextInfo": {
                  "expiration": 0,
                  "ephemeralSettingTimestamp": "0",
                  "disappearingMode": {
                    "initiator": "CHANGED_IN_CHAT"
                  }
                },
                "messageType": "conversation",
                "messageTimestamp": 1745759694,
                "instanceId": "889eb745-e759-4f90-bfd9-686bfa90da8a",
                "source": "unknown"
              },
              "destination": "https://n8n.cloud.codegreeks.com.ng/webhook/31248d8f-0cab-47c9-8208-7718d76c86ce",
              "date_time": "2025-04-27T10:14:54.862Z",
              "sender": "2348127426465@s.whatsapp.net",
              "server_url": "https://evo-ko8884go8sscckcg0kw84ccs.cloud.codegreeks.com.ng",
              "apikey": "CA848C186A0C-4AA0-B628-F4FFD1995B50"
            },
            "webhookUrl": "https://n8n.cloud.codegreeks.com.ng/webhook/31248d8f-0cab-47c9-8208-7718d76c86ce",
            "executionMode": "production"
          }
        }
      ]
    },
    "versionId": "f3f74a76-d154-4dff-b8ac-e7277731e69e",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-03-02T14:04:38.273Z",
    "updatedAt": "2025-03-02T14:04:38.273Z",
    "id": "3pFG0hQyQqvGEfrc",
    "name": "Demo: My first AI Agent in n8n",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "operation": "getAll",
          "calendar": {
            "__rl": true,
            "mode": "list"
          },
          "returnAll": true,
          "options": {
            "timeMin": "={{ $fromAI('after', 'The earliest datetime we want to look for events for') }}",
            "timeMax": "={{ $fromAI('before', 'The latest datetime we want to look for events for') }}",
            "singleEvents": true,
            "query": "={{ $fromAI('query', 'The search query to look for in the calendar. Leave empty if no search query is needed') }}"
          }
        },
        "id": "0d7e4666-bc0e-489a-9e8f-a5ef191f4954",
        "name": "Google Calendar",
        "type": "n8n-nodes-base.googleCalendarTool",
        "typeVersion": 1.2,
        "position": [
          880,
          220
        ]
      },
      {
        "parameters": {
          "options": {}
        },
        "id": "5b410409-5b0b-47bd-b413-5b9b1000a063",
        "name": "When chat message received",
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "typeVersion": 1.1,
        "position": [
          360,
          20
        ],
        "webhookId": "a889d2ae-2159-402f-b326-5f61e90f602e"
      },
      {
        "parameters": {
          "options": {
            "systemMessage": "=You're a helpful assistant that helps the user answer questions about their calendar.\n\nToday is {{ $now.format('cccc') }} the {{ $now.format('yyyy-MM-dd HH:mm') }}."
          }
        },
        "id": "29963449-1dc1-487d-96f2-7ff0a5c3cd97",
        "name": "AI Agent",
        "type": "@n8n/n8n-nodes-langchain.agent",
        "typeVersion": 1.7,
        "position": [
          560,
          20
        ]
      },
      {
        "parameters": {
          "content": "## 👋 Welcome to n8n!\nThis example shows how to build an AI Agent that interacts with your \ncalendar.\n\n### 1. Connect your accounts\n- Set up your [OpenAI credentials](https://docs.n8n.io/integrations/builtin/credentials/openai/?utm_source=n8n_app&utm_medium=credential_settings&utm_campaign=create_new_credentials_modal) in the `OpenAI Model` node \n- Connect your Google account in the `Google Calendar` node credentials section\n\n### 2. Ready to test it?\nClick Chat below and start asking questions! For example you can try `What meetings do I have today?`",
          "height": 389,
          "width": 319,
          "color": 6
        },
        "id": "eae35513-07c2-4de2-a795-a153b6934c1b",
        "name": "Sticky Note",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          0
        ]
      },
      {
        "parameters": {
          "content": "\n\n\n\n\n\n\n\n\n\n\n\nDon't have **Google Calendar**? Simply exchange this with the **Microsoft Outlook** or other tools",
          "height": 253,
          "width": 226,
          "color": 7
        },
        "id": "68b59889-7aca-49fd-a49b-d86fa6239b96",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          900,
          280
        ]
      },
      {
        "parameters": {
          "options": {}
        },
        "id": "cbaedf86-9153-4778-b893-a7e50d3e04ba",
        "name": "OpenAI Model",
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "typeVersion": 1,
        "position": [
          520,
          220
        ]
      },
      {
        "parameters": {},
        "id": "75481370-bade-4d90-a878-3a3b0201edcc",
        "name": "Memory",
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "typeVersion": 1.3,
        "position": [
          680,
          220
        ]
      },
      {
        "parameters": {
          "content": "### Want to learn more?\nWant to learn more about AI and how to apply it best in n8n? Have a look at our [new tutorial series on YouTube](https://www.youtube.com/watch?v=yzvLfHb0nqE&lc).",
          "height": 100,
          "width": 317,
          "color": 6
        },
        "id": "907552eb-6e0f-472e-9d90-4513a67a31db",
        "name": "Sticky Note3",
        "type": "n8n-nodes-base.stickyNote",
        "typeVersion": 1,
        "position": [
          0,
          400
        ]
      }
    ],
    "connections": {
      "Google Calendar": {
        "ai_tool": [
          [
            {
              "node": "AI Agent",
              "type": "ai_tool",
              "index": 0
            }
          ]
        ]
      },
      "When chat message received": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateId": "PT1i+zU92Ii5O2XCObkhfHJR5h9rNJTpiCIkYJk9jHU="
    },
    "pinData": {},
    "versionId": "7fb544ea-3e5a-4fa6-9ceb-61fe8f468aa0",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-27T18:13:39.496Z",
    "updatedAt": "2025-04-28T09:01:30.224Z",
    "id": "lo61DLwtLWsbLbqe",
    "name": "Quote Generator",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "jsonSchemaExample": "{\n\t\"quote\": \"start today\"\n}"
        },
        "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
        "typeVersion": 1.2,
        "position": [
          -220,
          180
        ],
        "id": "4d7817a2-b1dd-44aa-b966-aabfb4742946",
        "name": "Structured Output Parser"
      },
      {
        "parameters": {
          "assignments": {
            "assignments": [
              {
                "id": "3fc7571a-fbd2-4e9f-bd73-7ed03fd217af",
                "name": "quote",
                "value": "={{ $json.quote || $json.output && $json.output.quote }}\n",
                "type": "string"
              },
              {
                "id": "ee48e762-9c2f-4db8-997b-77d27c7a928e",
                "name": "prompt",
                "value": "={{ $('Generate Nature background').item.json.prompt }}",
                "type": "string"
              },
              {
                "id": "743a9831-2bcd-43f2-9e9b-6c0ef83a3b2a",
                "name": "natureElement",
                "value": "={{ $('Generate Nature background').item.json.natureElement }}",
                "type": "string"
              }
            ]
          },
          "options": {}
        },
        "type": "n8n-nodes-base.set",
        "typeVersion": 3.4,
        "position": [
          0,
          20
        ],
        "id": "87a2d2e9-6f26-490c-8c70-fc263acd9330",
        "name": "Edit Fields1"
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "=generate unique  motivational quote to match the describe background image {{ $json.natureElement }} not author reference just output in plain text not move than 100 characters",
          "hasOutputParser": true
        },
        "type": "@n8n/n8n-nodes-langchain.chainLlm",
        "typeVersion": 1.6,
        "position": [
          -380,
          -80
        ],
        "id": "3a0db27c-aadd-48d3-bad1-32b9d5f271b5",
        "name": "Basic LLM Chain"
      },
      {
        "parameters": {
          "options": {}
        },
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
        "typeVersion": 1,
        "position": [
          -360,
          180
        ],
        "id": "f6f37305-c5c7-4e15-ae47-bad9d90ce488",
        "name": "OpenRouter Chat Model",
        "credentials": {
          "openRouterApi": {
            "id": "jQYivg3izkwunqfZ",
            "name": "OpenRouter account"
          }
        }
      },
      {
        "parameters": {},
        "name": "Start",
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -660,
          -40
        ],
        "id": "7b0f6105-4d0e-46dd-ac30-3d63eddcf92f"
      },
      {
        "parameters": {
          "jsCode": "// --- Expanded Lists for Uniqueness & Nature Focus ---\n\n// Nature-related devotional elements (tangible nature scenes/elements)\nconst natureElements = [\n  'ancient oak tree silhouette at dusk', 'serene mountain range under twilight sky', 'quiet forest glade with deep shadows', 'gentle flowing river reflecting moonlight', 'misty morning meadow with low fog',\n  'peaceful lake at dusk with dark water', 'soft mossy ground in a shaded forest', 'twilight sky with faint stars appearing', 'calm ocean waves under a stormy sky', 'rustling autumn leaves on a dark path',\n  'snow-covered pine forest in low light', 'sunlight filtering weakly through dense canopy', 'wildflower field in muted evening colors', 'rocky cliffside against a dark sea', 'hidden waterfall shrouded in mist',\n  'foggy valley at dawn', 'crystal clear stream over dark stones', 'golden wheat field under a moody sky', 'desert sunset with long shadows', 'rain-soaked forest path glistening dimly',\n  'calm pond with dark lily pads', 'majestic eagle soaring against dark clouds', 'quiet snowy hill under moonlight', 'lush green jungle canopy blocking light', 'blooming cherry blossoms at night',\n  'dark cave entrance partially hidden by vines', 'dawn breaking faintly over distant hills', 'approaching thunderstorm over mountains', 'starry night sky over a dark landscape', 'calm beach at twilight with wet sand',\n  'ancient ruins overgrown in a dark forest', 'stone archway covered in ivy in shadows', 'peaceful garden bench under a large dark tree', 'wild deer grazing in early morning mist', 'moonlit forest path through tall pines',\n  'gentle breeze rustling leaves in a dark wood', 'sunset casting long shadows over rolling hills', 'quiet river bend surrounded by dark trees', 'dense fog settling in a deep valley', 'sparkling dew on dark green leaves',\n  'dark pine forest floor covered in needles', 'soft glowing fireflies in a dark field', 'quiet desert night with distant mountains', 'frozen lake surface reflecting dark sky', 'tall grass swaying under a moonlit sky',\n  'hidden forest cabin with minimal light', 'peaceful orchard in the evening shadows', 'calm river delta at twilight', 'mountain peak piercing through low clouds', 'twilight mist hovering over a dark lake',\n  'quiet woodland stream flowing through shadows', 'weathered wooden cross on a misty hill', 'single candle flame flickering in darkness (nature setting)', 'path leading into a dark, dense forest', 'still lake reflecting a dark, starry sky'\n]; // 55 elements - Increased variety\n\n// Dark theme & mood descriptors\nconst darkDescriptors = [\n  'moody atmosphere', 'deep enveloping shadows', 'low key dramatic lighting', 'cinematic darkness', 'ethereal twilight glow',\n  'rich dark color palette', 'subtle vignette focusing darkness', 'atmospheric dense haze', 'contemplative profound stillness', 'classic noir aesthetic',\n  'dramatic contrast lighting', 'minimalist dark tones', 'shadowy mysterious silhouettes', 'soft muted color diffusion', 'dimly lit intimate scene',\n  'obscured and veiled light', 'heavy somber mood', 'gothic undertones', 'faded vintage darkness', 'deep chiaroscuro effect',\n  'serene nocturnal ambiance', 'peaceful nighttime quietude', 'understated dark elegance', 'muted and subdued tones', 'contemplative dimness'\n]; // 25 elements - Increased variety\n\n// Background styles & textures (more nature-focused)\nconst backgroundStyles = [\n  'abstract dark textured surface', 'blurred dark forest background', 'dark gradient wash effect', 'minimalist dark pattern',\n  'subtle aged paper texture overlay', 'dark natural stone texture', 'moody overcast skyscape', 'soft focus dark bokeh effect',\n  'weathered dark wood grain texture', 'dark water surface reflection', 'smoky atmospheric texture', 'foggy forest floor texture',\n  'shadowed rocky terrain backdrop', 'twilight sky with silhouetted clouds', 'damp mossy rock surface', 'dark sandy shore texture',\n  'dark leafy canopy overhead view', 'heavy rain on a dark surface effect', 'cracked earth texture in shadow', 'bark texture of an old tree',\n  'rippled water texture in low light', 'starry night sky texture', 'soft moonlit cloud texture', 'wind-swept grass texture (dark)', 'frozen ice texture with trapped bubbles'\n]; // 25 elements - Increased variety\n\n// Optional Color Palette Suggestions (dark and thematic)\nconst colorPalettes = [\n  'deep blues, purples, and charcoal gray', 'monochromatic grayscale with subtle silver accents', 'rich burgundy, deep forest green, and black',\n  'dark navy, slate gray, and muted gold highlights', 'earthy dark browns, deep moss green, and shadow tones', 'muted jewel tones like deep sapphire and emerald',\n  'charcoal gray and soft, dim amber light', 'dark emerald green and midnight blue blend', 'smoky gray, deep violet, and soft lavender',\n  'deep maroon, dark slate gray, and black', 'cool dark grays with hints of deep teal', 'black, deep indigo, and muted bronze',\n  'dark chocolate brown, beige, and deep gray', 'stormy blues and dark silver grays', 'burnt umber, dark olive, and charcoal',\n  'deep teal, dark grey, and off-black', 'rich plum, dark graphite, and muted gold', 'obsidian black, deep crimson, and dark grey', 'midnight blue, silver, and deep charcoal', 'forest green, dark brown, and black'\n]; // 20 elements - Increased variety\n\nconst niche = 'Christian devotional Instagram background';\nconst items = [];\nconst numberOfPrompts = 10; // Generate 1000 prompts - easily adjustable\n\n// Use a Set to track generated prompts and ensure uniqueness if needed,\n// although with ~687,500 combinations, duplicates are very unlikely for 1000 prompts.\nconst generatedPrompts = new Set();\n\nfor (let i = 0; i < numberOfPrompts; i++) {\n  let prompt;\n  let element, descriptor, style, palette;\n\n  // Loop to ensure uniqueness if generating extremely large numbers, though unlikely here.\n  do {\n      // Randomly pick one element from each category\n      element = natureElements[Math.floor(Math.random() * natureElements.length)];\n      descriptor = darkDescriptors[Math.floor(Math.random() * darkDescriptors.length)];\n      style = backgroundStyles[Math.floor(Math.random() * backgroundStyles.length)];\n      palette = colorPalettes[Math.floor(Math.random() * colorPalettes.length)];\n\n      // Combine elements into a descriptive prompt with slightly more guidance\n      prompt = `Create a background image for the '${niche}' niche. ` +\n               `Scene: '${element}'. ` +\n               `Atmosphere: Characterized by '${descriptor}'. ` +\n               `Incorporate a '${style}' texture or backdrop element. ` +\n               `Color Palette Hint: Emphasize '${palette}'. ` +\n               `Goal: Ensure the overall image is dark, atmospheric, deeply reflective, and avoids excessive brightness.`;\n\n  } while (generatedPrompts.has(prompt)); // Check if this exact prompt was already generated\n\n  generatedPrompts.add(prompt); // Add the unique prompt to the set\n\n  items.push({\n    json: {\n      prompt: prompt,\n      natureElement: element,      // Keep track of chosen elements\n      themeDescriptor: descriptor,\n      backgroundStyle: style,\n      colorPalette: palette,\n      index: i + 1\n    }\n  });\n\n  // Optimization: If the number of generated prompts equals the total possible combinations, break the loop.\n  if (generatedPrompts.size === natureElements.length * darkDescriptors.length * backgroundStyles.length * colorPalettes.length) {\n    console.warn(\"Generated all possible unique combinations.\");\n    break;\n  }\n}\n\n// The 'items' array now holds the generated prompts.\n// This return statement depends on the context where this code is used (e.g., a function, a script).\nreturn items;\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          -540,
          340
        ],
        "id": "7b6aec8e-daa5-49f7-9b5b-840682ccaae4",
        "name": "Generate Nature background"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "={{ $json.prompt }}"
              },
              {
                "name": "model",
                "value": "Flux-realism"
              },
              {
                "name": "width",
                "value": "1024"
              },
              {
                "name": "height",
                "value": "1024"
              },
              {
                "name": "seed",
                "value": "-1"
              },
              {
                "name": "negative_prompt",
                "value": "worst quality, blurry"
              },
              {
                "name": "nologo",
                "value": "true"
              },
              {
                "name": "safe",
                "value": "true"
              }
            ]
          },
          "options": {}
        },
        "name": "Set Image Parameters",
        "type": "n8n-nodes-base.set",
        "typeVersion": 1,
        "position": [
          140,
          720
        ],
        "id": "fecbcb56-e7dd-42dc-844f-0c90f895b0c6"
      },
      {
        "parameters": {
          "jsCode": "// Model information\nconst modelDescriptions = {\n    'flux': 'Flux: General-purpose model suitable for most scenarios',\n    'FLUX-3D': 'FLUX-3D: Optimized for 3D rendering style',\n    'FLUX-PRO': 'FLUX-PRO: Advanced professional-grade quality',\n    'Flux-realism': 'Flux-realism: Focused on realistic style generation',\n    'Flux-anime': 'Flux-anime: Optimized for anime-style generation',\n    'Flux-cablyai': 'Flux-cablyai: Special artistic style model',\n    'turbo': 'Turbo: Fast generation model prioritizing speed'\n};\n\n// Get input data\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Extract parameters\n    const prompt = item.json.prompt;\n    const model = item.json.model;\n    const width = item.json.width;\n    const height = item.json.height;\n    let seed = item.json.seed;\n    const negative_prompt = item.json.negative_prompt;\n    const nologo = item.json.nologo === 'true';\n    const safe = item.json.safe === 'true';\n    \n    // Generate random seed if set to -1\n    if (seed === '-1') {\n        seed = Math.floor(Math.random() * 2147483647).toString();\n    }\n    \n    // Build URL\n    let url = `https://image.pollinations.ai/prompt/${encodeURIComponent(prompt)}`;\n    url += `?width=${width}&height=${height}&seed=${seed}&model=${model}`;\n    \n    if (negative_prompt) {\n        url += `&negative_prompt=${encodeURIComponent(negative_prompt)}`;\n    }\n    \n    if (nologo) {\n        url += '&nologo=true';\n    }\n    \n    if (!safe) {\n        url += '&safe=false';\n    }\n    \n    // Create output item\n    const newItem = {\n        json: {\n            imageUrl: url,\n            parameters: {\n                prompt: prompt,\n                model: model,\n                modelDescription: modelDescriptions[model] || 'Custom model',\n                dimensions: `${width}x${height}`,\n                seed: seed,\n                negative_prompt: negative_prompt,\n                nologo: nologo,\n                safe: safe,\n                generated_at: new Date().toISOString(),\n                retryCount: 0,  // Initialize retry counter\n                maxRetries: 5   // Set maximum retries\n            }\n        }\n    };\n    \n    result.push(newItem);\n}\n\nreturn result;"
        },
        "name": "Process Image Parameters",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          360,
          720
        ],
        "id": "7dd7ac70-94da-4f72-abf3-5210dc0ce2b2"
      },
      {
        "parameters": {
          "batchSize": 1,
          "options": {}
        },
        "type": "n8n-nodes-base.splitInBatches",
        "typeVersion": 2,
        "position": [
          60,
          240
        ],
        "id": "850b4f8b-6e25-4ce5-9bdb-194d0362c6ea",
        "name": "Split Into Batches"
      },
      {
        "parameters": {
          "url": "={{ $json.imageUrl }}",
          "options": {
            "response": {
              "response": {
                "fullResponse": true,
                "responseFormat": "file"
              }
            }
          }
        },
        "name": "HTTP Request1",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          580,
          720
        ],
        "id": "c72390bd-6c41-47fd-99e1-86cf613c70e4",
        "continueOnFail": true
      },
      {
        "parameters": {
          "conditions": {
            "string": [
              {
                "value1": "={{ $json.statusMessage }}",
                "value2": "ok"
              }
            ]
          }
        },
        "name": "Check If Error",
        "type": "n8n-nodes-base.if",
        "typeVersion": 1,
        "position": [
          1120,
          520
        ],
        "id": "344496d7-a046-41bc-a10f-bd30ec417bdd"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "imageUrl",
                "value": "={{ $node[\"Process Image Parameters\"].json.imageUrl }}"
              },
              {
                "name": "prompt",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.prompt }}"
              },
              {
                "name": "model",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.model }}"
              },
              {
                "name": "modelDescription",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.modelDescription }}"
              },
              {
                "name": "dimensions",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.dimensions }}"
              },
              {
                "name": "seed",
                "value": "={{ $node[\"Process Image Parameters\"].json.parameters.seed }}"
              },
              {
                "name": "",
                "value": "="
              }
            ]
          },
          "options": {
            "dotNotation": true
          }
        },
        "name": "Output Success Details",
        "type": "n8n-nodes-base.set",
        "typeVersion": 1,
        "position": [
          1300,
          680
        ],
        "id": "247cce5a-2019-498d-aa69-518082479b0d"
      },
      {
        "parameters": {
          "amount": 3,
          "unit": "seconds"
        },
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1,
        "position": [
          920,
          0
        ],
        "id": "b75acc8d-f759-43b0-8d8a-d984dc6dade9",
        "name": "Wait",
        "webhookId": "c27772d0-80c5-4bcf-84a7-0c1a8f95cd1f"
      },
      {
        "parameters": {
          "operation": "text",
          "text": "={{ $('Set Image Parameters').item.json.quote }}",
          "fontSize": 35,
          "fontColor": "#F6F1F1",
          "positionX": 180,
          "positionY": 600,
          "lineLength": 40,
          "options": {
            "fileName": "={{ $('Set Image Parameters').item.json.natureElement }}",
            "font": "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf"
          }
        },
        "type": "n8n-nodes-base.editImage",
        "typeVersion": 1,
        "position": [
          680,
          300
        ],
        "id": "810f827a-d785-4860-959d-fdd5f44c4226",
        "name": "Edit Image1"
      },
      {
        "parameters": {
          "amount": 5,
          "unit": "seconds"
        },
        "name": "Wait 5 Seconds",
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1,
        "position": [
          1260,
          180
        ],
        "webhookId": "wait-node-webhook-id",
        "id": "05d90dad-a34e-4905-bf49-e3c07dafd621"
      },
      {
        "parameters": {
          "jsCode": "// Increment retry counter\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Create a copy of the item\n    const newItem = JSON.parse(JSON.stringify(item));\n    \n    // Increment retry counter\n    newItem.json.parameters.retryCount++;\n    \n    // Add error information for logging\n    newItem.json.lastError = $node[\"HTTP Request\"].error;\n    newItem.json.lastErrorTime = new Date().toISOString();\n    \n    result.push(newItem);\n}\n\nreturn result;"
        },
        "name": "Increment Retry Counter",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          1440,
          260
        ],
        "id": "e5ceee81-a3ce-40a2-849a-f0de4276e0e0"
      },
      {
        "parameters": {
          "conditions": {
            "number": [
              {
                "value1": "={{ $json.parameters.retryCount }}",
                "value2": "={{ $json.parameters.maxRetries }}"
              }
            ]
          }
        },
        "name": "Check Retry Count",
        "type": "n8n-nodes-base.if",
        "typeVersion": 1,
        "position": [
          1040,
          300
        ],
        "id": "a10a8da5-35bd-4843-bf7d-5338e340a92e"
      },
      {
        "parameters": {
          "jsCode": "// Create error summary\nconst items = $input.all();\nconst result = [];\n\nfor (const item of items) {\n    // Create a new item with error details\n    const newItem = {\n        json: {\n            status: \"Failed\",\n            error: \"Maximum retries exceeded\",\n            retryCount: item.json.parameters.retryCount,\n            maxRetries: item.json.parameters.maxRetries,\n            prompt: item.json.parameters.prompt,\n            model: item.json.parameters.model,\n            lastError: item.json.lastError || $node[\"HTTP Request\"].error,\n            failedAt: new Date().toISOString()\n        }\n    };\n    \n    result.push(newItem);\n}\n\nreturn result;"
        },
        "name": "Create Error Summary",
        "type": "n8n-nodes-base.code",
        "typeVersion": 1,
        "position": [
          1400,
          480
        ],
        "id": "f26caefe-bb66-4225-bdad-346f980f6ac9"
      },
      {
        "parameters": {
          "driveId": {
            "__rl": true,
            "value": "My Drive",
            "mode": "list",
            "cachedResultName": "My Drive",
            "cachedResultUrl": "https://drive.google.com/drive/my-drive"
          },
          "folderId": {
            "__rl": true,
            "value": "1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q",
            "mode": "list",
            "cachedResultName": "n8nauthbackup",
            "cachedResultUrl": "https://drive.google.com/drive/folders/1Z1LU5Yd3TMLwHKgDmDKbwtmZ5aTvtF9Q"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.googleDrive",
        "typeVersion": 3,
        "position": [
          400,
          160
        ],
        "id": "05f0b037-079a-4403-9470-386b99c0e0e8",
        "name": "Google Drive",
        "credentials": {
          "googleDriveOAuth2Api": {
            "id": "GOdmyhwvMKnbvHg4",
            "name": "Google Drive account"
          }
        }
      }
    ],
    "connections": {
      "Structured Output Parser": {
        "ai_outputParser": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "ai_outputParser",
              "index": 0
            }
          ]
        ]
      },
      "Edit Fields1": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Basic LLM Chain": {
        "main": [
          [
            {
              "node": "Edit Fields1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenRouter Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Start": {
        "main": [
          [
            {
              "node": "Generate Nature background",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Generate Nature background": {
        "main": [
          [
            {
              "node": "Basic LLM Chain",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Set Image Parameters": {
        "main": [
          [
            {
              "node": "Process Image Parameters",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Process Image Parameters": {
        "main": [
          [
            {
              "node": "HTTP Request1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Split Into Batches": {
        "main": [
          [
            {
              "node": "Set Image Parameters",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Google Drive",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "HTTP Request1": {
        "main": [
          [
            {
              "node": "Check If Error",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check If Error": {
        "main": [
          [
            {
              "node": "Check Retry Count",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Output Success Details",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Output Success Details": {
        "main": [
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "Edit Image1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Image1": {
        "main": [
          [
            {
              "node": "Split Into Batches",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait 5 Seconds": {
        "main": [
          [
            {
              "node": "Increment Retry Counter",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Increment Retry Counter": {
        "main": [
          [
            {
              "node": "HTTP Request1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Check Retry Count": {
        "main": [
          [
            {
              "node": "Wait 5 Seconds",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Create Error Summary",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "0abab1b0-a4d9-4320-b389-9c24973a106c",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-05-03T21:57:35.018Z",
    "updatedAt": "2025-05-03T23:23:32.477Z",
    "id": "ilElGsLGoN14dN81",
    "name": "chat widget",
    "active": true,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {
          "sessionIdType": "customKey",
          "sessionKey": "={{ $json.sessionId }}",
          "contextWindowLength": 20
        },
        "id": "a5b58229-e5ff-49f8-9c62-f8e81eac3208",
        "name": "Window Buffer Memory",
        "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
        "position": [
          120,
          1120
        ],
        "typeVersion": 1.2
      },
      {
        "parameters": {
          "options": {}
        },
        "id": "3268e648-b443-461a-b45f-b42ead498fac",
        "name": "Respond to Webhook",
        "type": "n8n-nodes-base.respondToWebhook",
        "position": [
          540,
          820
        ],
        "typeVersion": 1.1
      },
      {
        "parameters": {
          "model": "gpt-4o-2024-08-06",
          "options": {
            "temperature": 0.4
          }
        },
        "id": "a05b15b7-80ce-49e7-84e1-5c22a56b057b",
        "name": "OpenAI Chat Model",
        "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
        "position": [
          20,
          1000
        ],
        "typeVersion": 1,
        "credentials": {
          "openAiApi": {
            "id": "VARp4wx1gnsCGpqo",
            "name": "OpenAi account"
          }
        }
      },
      {
        "parameters": {
          "public": true,
          "mode": "webhook",
          "options": {
            "allowedOrigins": "*",
            "responseMode": "responseNode"
          }
        },
        "id": "8110d6ca-c255-41b9-9661-a791a903eab0",
        "name": "Chat Trigger",
        "type": "@n8n/n8n-nodes-langchain.chatTrigger",
        "position": [
          -720,
          840
        ],
        "webhookId": "f406671e-c954-4691-b39a-66c90aa2f103",
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "Ensure these referance this workflow, replace placeholders",
          "height": 205.34013605442183,
          "width": 311.6936390497898
        },
        "id": "53b64661-f470-4e3a-88d9-7a16f66d0e75",
        "name": "Sticky Note",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          240,
          1240
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "modify business hours\nmodify timezones",
          "height": 238,
          "width": 468
        },
        "id": "6361398f-35ab-463c-ad42-384b1115168f",
        "name": "Sticky Note1",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1260,
          620
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "promptType": "define",
          "text": "={{ $json.chatInput }}",
          "options": {
            "systemMessage": "=you are a help assistant Mira for code greeks keep response brief and flowing"
          }
        },
        "id": "113070cc-c121-4054-91b4-9450906e9139",
        "name": "AI Agent",
        "type": "@n8n/n8n-nodes-langchain.agent",
        "position": [
          120,
          820
        ],
        "typeVersion": 1.6
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "version": 2,
              "leftValue": "",
              "caseSensitive": true,
              "typeValidation": "strict"
            },
            "combinator": "and",
            "conditions": [
              {
                "id": "158a0b91-534d-4745-b10e-8a7c97050861",
                "operator": {
                  "type": "string",
                  "operation": "exists",
                  "singleValue": true
                },
                "leftValue": "={{ $json.chatInput }}",
                "rightValue": ""
              }
            ]
          },
          "options": {}
        },
        "id": "58f71fe7-db02-4fd3-b94e-6eb48f0b05ec",
        "name": "If",
        "type": "n8n-nodes-base.if",
        "position": [
          -500,
          840
        ],
        "typeVersion": 2.2
      },
      {
        "parameters": {
          "respondWith": "json",
          "responseBody": "{\n  \"output\": \"Hi, how can I help you today?\"\n}",
          "options": {}
        },
        "id": "0fb461fa-9218-4042-b66f-81c9fe0ad7e6",
        "name": "Respond With Initial Message",
        "type": "n8n-nodes-base.respondToWebhook",
        "position": [
          -200,
          960
        ],
        "typeVersion": 1.1
      },
      {
        "parameters": {
          "content": "# Custom Branded n8n Chatbot\nBuilt by [Wayne Simpson](https://www.linkedin.com/in/simpsonwayne/) at [nocodecreative.io](https://nocodecreative.io)\n☕ If you find this useful, feel free to [buy me a coffee](https://ko-fi.com/waynesimpson)",
          "height": 111,
          "width": 668,
          "color": 6
        },
        "id": "94b89554-9cb6-417a-919b-0ecece8f42ba",
        "name": "Sticky Note8",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          0,
          0
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "# Watch the Setup Video 📺\n### Watch Set Up Video 👇\n[![Auto Categorise Outlook Emails with AI](https://cdn.jsdelivr.net/gh/WayneSimpson/n8n-chatbot-template/custom-branded-chatbot.png)](https://youtu.be/xQ1tCQZhLaI)\n\n",
          "height": 497,
          "width": 667,
          "color": 7
        },
        "id": "42560027-f087-40de-9c07-37f2bae2f98c",
        "name": "Sticky Note9",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          -340,
          160
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "## Read to blog post to get started 📝\n**Follow along to add a custom branded chat widget to your webiste**\n\n[![Custom Branded n8n Chatbot](https://cdn.jsdelivr.net/gh/WayneSimpson/n8n-chatbot-template/chat%20widget.png)](https://blog.nocodecreative.io/create-a-branded-ai-powered-website-chatbot-with-n8n/)",
          "height": 500,
          "width": 600,
          "color": 7
        },
        "id": "0c5a79fb-9d68-45ae-a48e-b80c5e308798",
        "name": "Sticky Note2",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          360,
          160
        ],
        "typeVersion": 1
      },
      {
        "parameters": {
          "content": "modify timezones",
          "height": 238,
          "width": 208,
          "color": 6
        },
        "id": "3a465a69-7b0d-44cf-943c-35ef22414611",
        "name": "Sticky Note4",
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          420,
          980
        ],
        "typeVersion": 1
      }
    ],
    "connections": {
      "If": {
        "main": [
          [
            {
              "node": "AI Agent",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Respond With Initial Message",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "AI Agent": {
        "main": [
          [
            {
              "node": "Respond to Webhook",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Chat Trigger": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "OpenAI Chat Model": {
        "ai_languageModel": [
          [
            {
              "node": "AI Agent",
              "type": "ai_languageModel",
              "index": 0
            }
          ]
        ]
      },
      "Window Buffer Memory": {
        "ai_memory": [
          [
            {
              "node": "AI Agent",
              "type": "ai_memory",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "83052e16-6661-4dce-a6a8-9a553a2000be",
    "triggerCount": 1,
    "tags": []
  },
  {
    "createdAt": "2025-06-01T01:11:08.852Z",
    "updatedAt": "2025-06-03T17:27:54.622Z",
    "id": "eElDvPqFytlB1zUr",
    "name": "My workflow 18",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          -280,
          -155
        ],
        "id": "84613114-394e-4bf8-a0f4-638c27d2f557",
        "name": "When clicking 'Execute workflow'"
      },
      {
        "parameters": {
          "operation": "create",
          "backgroundColor": "#050404ff",
          "width": 1080,
          "height": 1667,
          "options": {
            "format": "jpeg"
          }
        },
        "type": "n8n-nodes-base.editImage",
        "typeVersion": 1,
        "position": [
          1260,
          -280
        ],
        "id": "e9573409-3873-4a27-ab68-e90dc16478f8",
        "name": "Edit Image"
      },
      {
        "parameters": {
          "operation": "text",
          "text": "=\"{{ $json.quote }}\"",
          "fontSize": 68,
          "fontColor": "#F7F4F4",
          "positionX": 165,
          "positionY": 650,
          "lineLength": 21,
          "options": {
            "font": "/usr/share/fonts/truetype/msttcorefonts/Verdana_Bold.ttf"
          }
        },
        "type": "n8n-nodes-base.editImage",
        "typeVersion": 1,
        "position": [
          1480,
          -280
        ],
        "id": "34bb466f-d526-48bb-82e6-9e4077d5182c",
        "name": "Edit Image1"
      },
      {
        "parameters": {
          "html": "<!DOCTYPE html>\n<html>\n<head>\n    <style>\n        body {\n            background: linear-gradient(135deg, #2c3e50, #34495e);\n            font-family: Arial, sans-serif;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n            min-height: 100vh;\n            margin: 0;\n            padding: 20px;\n        }\n        .quote-container {\n            text-align: center;\n            max-width: 600px;\n        }\n        .quote-text {\n            font-size: 48px;\n            font-weight: bold;\n            line-height: 1.2;\n            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);\n        }\n        .white { color: #ffffff; }\n        .cyan { color: #00ffff; }\n        .light-blue { color: #87ceeb; }\n    </style>\n</head>\n<body>\n    <div class=\"quote-container\">\n        <div class=\"quote-text\">\n            \"<span class=\"white\">In a world full of</span>\n            <span class=\"white\">judgment, let</span> <span class=\"cyan\">grace</span>\n            <span class=\"white\">be your</span> <span class=\"cyan\">guiding light,</span>\n            <span class=\"cyan\">leading you</span> <span class=\"white\">to</span> <span class=\"light-blue\">kindness</span>\n            <span class=\"white\">and</span> <span class=\"light-blue\">compassion.</span>\"\n        </div>\n    </div>\n</body>\n</html>\n"
        },
        "type": "n8n-nodes-base.html",
        "typeVersion": 1.2,
        "position": [
          1700,
          -280
        ],
        "id": "23b91eed-9c5a-4c81-bfb9-929f3692aee8",
        "name": "HTML"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "=Generate a **single, unique, and complete social media update package**. This package will include:\n1.  Post Text (for the visual/image)\n2.  Image Background Prompt (to generate a suitable **dark-themed, text-free** visual background for white text overlay)\n3.  Caption (to accompany the post)\n4.  Hashtags\n\nThe entire package should be designed for high engagement, relatability, and a distinctive voice.\n\n**Instructions:**\n\n**I. Post Text (This is the white text that you will overlay on the generated dark background):**\n1.  **Theme Focus (Select ONE primary theme for this single post):**\n    *   A relatable observation about modern dating, relationship dynamics, or romantic frustrations.\n    *   A statement on self-respect, setting personal boundaries, or individual empowerment.\n    *   A witty, humorous, or sarcastic commentary on an everyday life scenario, work situation, or common social interaction.\n    *   A bold, unapologetic personal opinion or 'hot take' on a specific, common topic.\n    *   A motivational insight delivered with a blunt, realistic, or slightly edgy perspective.\n2.  **Tone (Select ONE dominant tone for this single post):**\n    *   Bold, direct, confident, and assertive.\n    *   Humorous and witty.\n    *   Sarcastic and dry.\n    *   Empowering and uplifting.\n    *   Slightly provocative or challenging.\n    *   Matter-of-fact and no-nonsense.\n3.  **Language Style:**\n    *   Use informal, colloquial language and contemporary slang appropriate to the chosen tone and theme.\n    *   Ensure the message is **concise and impactful** (ideally 1-3 short sentences or a memorable phrase).\n    *   Integrate **1-3 relevant emojis** that directly amplify the message's tone.\n4.  **Originality:**\n    *   The statement must be original and not a direct replica of common viral posts.\n\n**II. Image Background Prompt (For an AI image generator, to create a purely visual, dark-themed background for white text overlay. This background should NOT contain any text itself):**\n1.  **Core Style & Objective:**\n    *   Generate a **dark-themed** visually appealing background that is **specifically designed for white text overlay**.\n    *   Prioritize **simplicity, ample clean/negative space, and excellent contrast** to ensure overlaid white text is highly readable.\n    *   The background must be **text-free**. If your AI tool supports negative prompts, use terms like: \"no text,\" \"text-free,\" \"no words,\" \"no typography,\" \"exclude writing.\"\n2.  **Suggested Visual Styles (Focus on dark aesthetics):**\n    *   **Dark Minimalist Abstract:** Subtle dark gradients (e.g., charcoal to deep navy), soft dark textures (e.g., dark brushed metal, fine black paper texture, dark concrete), minimal deep-toned geometric shapes.\n    *   **Clean & Modern Dark:** Solid deep color fields (e.g., rich black, deep indigo, forest green, burgundy) with slight variations or subtle lighting effects.\n    *   **Atmospheric & Moody Dark:** Soft focus dark scenes, deep space with subtle stars, dark bokeh effects, gentle dark light leaks, ethereal dark color blends.\n3.  **Mood & Color Palette (Focus on dark colors suitable for white text):**\n    *   **Key Colors:** Charcoal grey, deep navy blue, rich black, dark forest green, deep plum, dark burgundy, slate grey.\n    *   Consider subtle highlights or secondary colors within the dark palette to add depth, but ensure they don't reduce overall contrast for white text.\n4.  **Elements to AVOID in the Background Image:**\n    *   **Any form of text, letters, numbers, or typography.**\n    *   Bright or light-colored dominant areas that would clash with white text.\n    *   Cluttered scenes, busy patterns, overly detailed illustrations, or distracting objects that would compete with the overlaid Post Text.\n    *   Prominent human figures or faces unless specifically requested and designed with very dark, shadowed aesthetics to leave clear space for white text.\n5.  **Example Phrases for Dark Background Prompt (These are guides, adapt them):**\n    *   \"Dark minimalist abstract background, charcoal to deep indigo gradient, subtle dark brushed metal texture, abundant clear space for white text overlay, text-free.\"\n    *   \"Clean, modern dark background, solid rich black with a slight textural grain, no text elements, designed for prominent white quote placement.\"\n    *   \"Atmospheric dark background, deep space with faint distant nebulae, text-free, ample dark copy space for white text.\"\n    *   \"Dark moody background, subtle deep forest green texture, soft vignette, completely text-free, perfect for white lettering.\"\n\n**III. Caption (This text accompanies the visual post):**\n1.  **Conciseness:** Keep the caption to 1-2 lines.\n2.  **Content Elements (Incorporate a suitable mix for this single caption):**\n    *   **Emojis:** Use 2-4 emojis that complement or enhance the post's overall vibe (e.g., 😂, 💯, 🤷‍♀️, 🔥, 👇, 🗣️, ✨, 🖤, 🌙).\n    *   **Relatability Cue (Optional):** A brief phrase acknowledging a shared experience (e.g., \"Who else feels this?\", \"Just me or...\", \"The accuracy!\").\n    *   **Call to Engagement (Recommended):**\n        *   Pose a simple question (e.g., \"Can you relate?\", \"Agree or disagree?\", \"What's your take?\").\n        *   Encourage tagging (e.g., \"Tag someone who needs to hear this!\").\n        *   Invite shares (e.g., \"Share if this is your mood!\").\n    *   **Account Tag:** Include the placeholder \"[@YourAccountName]\" for branding.\n3.  **Tone:**\n    *   The caption's tone should align with the energy of the main post text.\n    *   Maintain a light, conversational style.\n4.  **Originality:**\n    *   Ensure the caption feels fresh and prompts interaction.\n\n**IV. Hashtags:**\n1.  **Quantity:** Provide 2-4 hashtags for this single post.\n2.  **Style:**\n    *   Select **relevant, short, and a mix of popular and niche** hashtags.\n    *   Examples for inspiration: #RealTalk, #TruthBeTold, #MoodOfTheDay, #FunnyQuotes, #SelfLoveJourney, #Vibes, #Unfiltered, #DarkTheme, #[YourBrandSpecificHashtag].\n\n**Output Format:**\nPresent the **single generated update package** clearly separated as:\n*   **Post Text:** [Generated Text for the Post]\n*   **Image Background Prompt:** [Generated Prompt for Image Generator - ensure this requests a DARK, TEXT-FREE background]\n*   **Caption:** [Generated Caption]\n*   **Hashtags:** [Generated Hashtags]\n\nEnsure all four components are coherent and work together as one complete social media post.json output like \n[\n  {\n    \"PostText\": \"\",\n    \"ImageBackgroundPrompt\": \"\",\n    \"Caption\": \"\",\n    \"Hashtags\": \"\"\n  }\n]\n"
              },
              {
                "name": "model",
                "value": "={{ $json.name }}"
              }
            ]
          },
          "options": {}
        },
        "id": "98d99990-cb65-411b-9666-3f352e9034c5",
        "name": "Edit Prompt and Model",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          160,
          -230
        ]
      },
      {
        "parameters": {
          "url": "=https://text.pollinations.ai/{{$node[\"Edit Prompt and Model\"].json[\"prompt\"]}}?model={{$node[\"Edit Prompt and Model\"].json[\"model\"]}}&json=true&seed={{Math.floor(Math.random() * 999999)}}\n",
          "options": {
            "response": {
              "response": {
                "fullResponse": true
              }
            },
            "timeout": 120000
          }
        },
        "id": "7c0f450f-e87d-4064-a424-9c2a32e86ad5",
        "name": "Send to Pollinations",
        "type": "n8n-nodes-base.httpRequest",
        "typeVersion": 3,
        "position": [
          380,
          -230
        ],
        "retryOnFail": true,
        "maxTries": 5
      },
      {
        "parameters": {
          "jsCode": "// List all Pollinations.AI text models (April 2025)\nconst models = [\n  { name: 'openai', label: 'OpenAI GPT-4.1-mini' },\n  { name: 'openai-large', label: 'OpenAI GPT-4.1' },\n  { name: 'openai-reasoning', label: 'OpenAI o4-mini (reasoning)' },\n  { name: 'qwen-coder', label: 'Qwen 2.5 Coder 32B' },\n  { name: 'llama', label: 'Llama 3.3 70B' },\n  { name: 'llamascout', label: 'Llama 4 Scout 17B' },\n  { name: 'mistral', label: 'Mistral Small 3' },\n  { name: 'unity', label: 'Unity Mistral Large (uncensored)' }\n \n];\n\n// Initialize or retrieve model usage state\nlet modelState = $vars.modelState || {\n  usedModels: [],\n  executionCount: 0\n};\n\nmodelState.executionCount++;\n\n// Reset used models every 22 executions (full cycle through all models)\nif (modelState.executionCount % 22 === 0) {\n  modelState.usedModels = [];\n}\n\n// Function to get a unique random model\nfunction getRandomModel() {\n  // Filter out models that have been used recently\n  let availableModels = models.filter(model => !modelState.usedModels.includes(model.name));\n  \n  // If all models have been used, reset the list\n  if (availableModels.length === 0) {\n    modelState.usedModels = [];\n    availableModels = models;\n  }\n  \n  // Select a random model from available models\n  const randomIndex = Math.floor(Math.random() * availableModels.length);\n  const selectedModel = availableModels[randomIndex];\n  \n  // Add the selected model to used models\n  modelState.usedModels.push(selectedModel.name);\n  \n  return selectedModel;\n}\n\n// Get the random model\nconst selectedModel = getRandomModel();\n\n// Save the updated state\n$vars.modelState = modelState;\n\n// Return the selected model with additional metadata\nreturn [{\n  json: {\n    name: selectedModel.name,\n    label: selectedModel.label,\n    executionCount: modelState.executionCount,\n    usedModels: modelState.usedModels,\n    timestamp: new Date().toISOString(),\n    randomSeed: Math.floor(Math.random() * 999999)\n  }\n}];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          -60,
          -155
        ],
        "id": "a27be2d9-93d4-4b6c-a3ab-4a0cfba73c15",
        "name": "Model Selection"
      },
      {
        "parameters": {
          "jsCode": "// List all Pollinations.AI text models (April 2025)\nconst models = [\n  { name: 'openai', label: 'OpenAI GPT-4.1-mini' },\n  { name: 'openai-large', label: 'OpenAI GPT-4.1' },\n  { name: 'openai-reasoning', label: 'OpenAI o4-mini (reasoning)' },\n  { name: 'qwen-coder', label: 'Qwen 2.5 Coder 32B' },\n  { name: 'llama', label: 'Llama 3.3 70B' },\n  { name: 'llamascout', label: 'Llama 4 Scout 17B' },\n  { name: 'mistral', label: 'Mistral Small 3' },\n  { name: 'unity', label: 'Unity Mistral Large (uncensored)' },\n  { name: 'midijourney', label: 'Midijourney' },\n  { name: 'rtist', label: 'Rtist' },\n  { name: 'searchgpt', label: 'SearchGPT' },\n  { name: 'evil', label: 'Evil (uncensored)' },\n  { name: 'deepseek-reasoning', label: 'DeepSeek-R1 Distill Qwen 32B (reasoning)' },\n  { name: 'deepseek-reasoning-large', label: 'DeepSeek R1 - Llama 70B (reasoning)' },\n  { name: 'phi', label: 'Phi-4 Instruct' },\n  { name: 'llama-vision', label: 'Llama 3.2 11B Vision' },\n  { name: 'gemini', label: 'Gemini 1.5 (1M context)' },\n  { name: 'hormoz', label: 'Hormoz 8b' },\n  { name: 'hypnosis-tracy', label: 'Hypnosis Tracy 7B' },\n  { name: 'deepseek', label: 'DeepSeek-V3' },\n  { name: 'sur', label: 'Sur AI Assistant (Mistral)' },\n  { name: 'openai-audio', label: 'OpenAI GPT-4o-audio-preview' }\n];\n\n// Set your default model here\nconst defaultModel = 'llama';\n\n// Find the model object that matches the default\nconst selectedModel = models.find(m => m.name === defaultModel);\n\nreturn [{ json: selectedModel }];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          -280,
          -540
        ],
        "id": "07543830-e207-4a0a-a4ff-db18283f1a97",
        "name": "Model Selection1"
      },
      {
        "parameters": {
          "jsCode": "// Access the data from the previous node correctly\nconst input = $input.first().json.data;\n\n// Split by the '---' separator to separate sections\nconst sections = input.split('---').map(s => s.trim());\n\n// Initialize extracted fields\nlet extracted = {\n  PostText: '',\n  ImageBackgroundPrompt: '',\n  Caption: '',\n  Hashtags: ''\n};\n\n// Helper function to clean markdown-like labels and trim\nfunction cleanLabel(text, label) {\n  return text.replace(label, '').trim();\n}\n\n// Parse each section\nfor (let i = 0; i < sections.length; i++) {\n  const sec = sections[i];\n  \n  if (sec.includes('1. Post Text:')) {\n    // Extract the quoted text after \"1. Post Text:\"\n    const lines = sec.split('\\n');\n    for (const line of lines) {\n      if (line.includes('\"') && !line.includes('Post Text:')) {\n        extracted.PostText = line.replace(/\"/g, '').trim();\n        break;\n      }\n    }\n  } \n  else if (sec.includes('2. Image Background Prompt:')) {\n    const lines = sec.split('\\n');\n    for (let j = 1; j < lines.length; j++) {\n      if (lines[j].trim() && !lines[j].includes('###')) {\n        extracted.ImageBackgroundPrompt = lines[j].trim();\n        break;\n      }\n    }\n  } \n  else if (sec.includes('3. Caption:')) {\n    const lines = sec.split('\\n');\n    for (let j = 1; j < lines.length; j++) {\n      if (lines[j].trim() && !lines[j].includes('###')) {\n        extracted.Caption = lines[j].trim();\n        break;\n      }\n    }\n  } \n  else if (sec.includes('4. Hashtags:')) {\n    const lines = sec.split('\\n');\n    for (let j = 1; j < lines.length; j++) {\n      if (lines[j].trim() && lines[j].includes('#')) {\n        extracted.Hashtags = lines[j].trim();\n        break;\n      }\n    }\n  }\n}\n\n// Return the extracted data\nreturn extracted;\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          1040,
          -280
        ],
        "id": "798a5300-a4a7-4f81-8fa3-f8f7316447ac",
        "name": "Code"
      },
      {
        "parameters": {
          "conditions": {
            "options": {
              "caseSensitive": true,
              "leftValue": "",
              "typeValidation": "strict",
              "version": 2
            },
            "conditions": [
              {
                "id": "2ff5ef25-fd40-438c-aff4-c5a900c78a89",
                "leftValue": "={{ $json.statusCode }}",
                "rightValue": 200,
                "operator": {
                  "type": "number",
                  "operation": "equals"
                }
              }
            ],
            "combinator": "and"
          },
          "options": {}
        },
        "type": "n8n-nodes-base.if",
        "typeVersion": 2.2,
        "position": [
          600,
          -230
        ],
        "id": "fb962de1-b7e2-442f-94cc-114fb945ef2d",
        "name": "If"
      },
      {
        "parameters": {},
        "type": "n8n-nodes-base.wait",
        "typeVersion": 1.1,
        "position": [
          820,
          -55
        ],
        "id": "ce4b0c8b-b09c-4621-8393-aceb394bf7f1",
        "name": "Wait",
        "webhookId": "f3463e2e-d920-4cfb-922e-ab2670d34358"
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "getAll",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "mj00h1eru2xiami",
          "returnAll": true,
          "options": {
            "fields": [
              "topic"
            ]
          }
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          140,
          -660
        ],
        "id": "d6d9f17d-a6be-4c14-bf94-fb96aa02a380",
        "name": "NocoDB",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      },
      {
        "parameters": {
          "jsCode": "// Get all topics from the previous node\nconst allTopics = $input.all().map(item => item.json.topic);\n\n// Use alternative method for static data storage\nlet usedTopics = [];\nlet currentCycle = 1;\n\n// Try to get existing data from node context (alternative to static data)\ntry {\n    const nodeData = $node.context || {};\n    usedTopics = nodeData.usedTopics || [];\n    currentCycle = nodeData.currentCycle || 1;\n} catch (e) {\n    // If context fails, use simple array approach\n    usedTopics = [];\n    currentCycle = 1;\n}\n\n// Check if we need to start a new cycle\nif (usedTopics.length >= allTopics.length) {\n    usedTopics = [];\n    currentCycle++;\n}\n\n// Get available topics (not yet used in current cycle)\nconst availableTopics = allTopics.filter(topic => !usedTopics.includes(topic));\n\n// Randomly select from available topics\nconst randomIndex = Math.floor(Math.random() * availableTopics.length);\nconst selectedTopic = availableTopics[randomIndex];\n\n// Update used topics\nusedTopics.push(selectedTopic);\n\n// Try to save data back to node context\ntry {\n    if (!$node.context) $node.context = {};\n    $node.context.usedTopics = usedTopics;\n    $node.context.currentCycle = currentCycle;\n} catch (e) {\n    // Context save failed, continue without persistence\n}\n\nreturn [{\n    json: {\n        selectedTopic: selectedTopic,\n        cycleInfo: {\n            currentCycle: currentCycle,\n            usedInCycle: usedTopics.length,\n            remainingInCycle: availableTopics.length - 1,\n            totalTopics: allTopics.length\n        },\n        usedTopics: usedTopics\n    }\n}];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          360,
          -660
        ],
        "id": "a8553e92-6965-43b0-92bb-7ef5e7340fdc",
        "name": "Code1"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "prompt",
                "value": "=Generate exactly a inspiring quotes about grace. the quote should be around 20 words. Return only the quote not reference author"
              },
              {
                "name": "model",
                "value": "={{ $json.name }}"
              }
            ]
          },
          "options": {}
        },
        "id": "a1046289-8a01-4ff1-99ff-073a6cd644e3",
        "name": "Edit Prompt and Model1",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          320,
          -460
        ]
      },
      {
        "parameters": {
          "jsCode": "// Get the input data\nconst input = $input.all()[0].json;\n\nlet cleanQuote = '';\n\n// Handle different possible data structures\nif (input.data) {\n    // If data is a string, check if it's JSON or direct quote\n    if (typeof input.data === 'string') {\n        // Try to parse as JSON first\n        try {\n            const parsed = JSON.parse(input.data);\n            cleanQuote = parsed.quote || input.data;\n        } catch (e) {\n            // If parsing fails, it's likely a direct quote string\n            // Remove extra quotes if they exist\n            cleanQuote = input.data.replace(/^\"|\"$/g, '');\n        }\n    } else if (input.data.quote) {\n        // If data is already an object with quote property\n        cleanQuote = input.data.quote;\n    } else {\n        // If data is an object but no quote property, convert to string\n        cleanQuote = String(input.data);\n    }\n} else if (input.quote) {\n    // If quote is directly in the input\n    cleanQuote = input.quote;\n} else {\n    // Fallback: convert entire input to string\n    cleanQuote = String(input);\n}\n\n// Clean up any remaining extra quotes or whitespace\ncleanQuote = cleanQuote.trim().replace(/^\"|\"$/g, '');\n\nreturn [{\n    json: {\n        quote: cleanQuote,\n        original_data: input.data // Keep original for debugging\n    }\n}];\n"
        },
        "type": "n8n-nodes-base.code",
        "typeVersion": 2,
        "position": [
          740,
          -500
        ],
        "id": "7ebbf861-d7a5-46e4-93f4-cb8377963976",
        "name": "Code2"
      },
      {
        "parameters": {
          "values": {
            "string": [
              {
                "name": "response",
                "value": "={{$json[\"text\"] || $json}}"
              }
            ]
          },
          "options": {}
        },
        "id": "012ef0df-daf3-4553-a98e-b4236e0ee953",
        "name": "ExtractResponse1",
        "type": "n8n-nodes-base.set",
        "typeVersion": 2,
        "position": [
          820,
          -280
        ]
      },
      {
        "parameters": {
          "content": "Generate a **single, unique, and complete social media update package**. This package will include:\n1.  Post Text (for the visual/image)\n2.  Image Background Prompt (to generate a suitable **dark-themed, text-free** visual background for white text overlay)\n3.  Caption (to accompany the post)\n4.  Hashtags\n\nThe entire package should be designed for high engagement, relatability, and a distinctive voice.\n\n**Instructions:**\n\n**I. Post Text (This is the white text that you will overlay on the generated dark background):**\n1.  **Theme Focus (Select ONE primary theme for this single post):**\n    *   A relatable observation about modern dating, relationship dynamics, or romantic frustrations.\n    *   A statement on self-respect, setting personal boundaries, or individual empowerment.\n    *   A witty, humorous, or sarcastic commentary on an everyday life scenario, work situation, or common social interaction.\n    *   A bold, unapologetic personal opinion or 'hot take' on a specific, common topic.\n    *   A motivational insight delivered with a blunt, realistic, or slightly edgy perspective.\n2.  **Tone (Select ONE dominant tone for this single post):**\n    *   Bold, direct, confident, and assertive.\n    *   Humorous and witty.\n    *   Sarcastic and dry.\n    *   Empowering and uplifting.\n    *   Slightly provocative or challenging.\n    *   Matter-of-fact and no-nonsense.\n3.  **Language Style:**\n    *   Use informal, colloquial language and contemporary slang appropriate to the chosen tone and theme.\n    *   Ensure the message is **concise and impactful** (ideally 1-3 short sentences or a memorable phrase).\n    *   Integrate **1-3 relevant emojis** that directly amplify the message's tone.\n4.  **Originality:**\n    *   The statement must be original and not a direct replica of common viral posts.\n\n**II. Image Background Prompt (For an AI image generator, to create a purely visual, dark-themed background for white text overlay. This background should NOT contain any text itself):**\n1.  **Core Style & Objective:**\n    *   Generate a **dark-themed** visually appealing background that is **specifically designed for white text overlay**.\n    *   Prioritize **simplicity, ample clean/negative space, and excellent contrast** to ensure overlaid white text is highly readable.\n    *   The background must be **text-free**. If your AI tool supports negative prompts, use terms like: \"no text,\" \"text-free,\" \"no words,\" \"no typography,\" \"exclude writing.\"\n2.  **Suggested Visual Styles (Focus on dark aesthetics):**\n    *   **Dark Minimalist Abstract:** Subtle dark gradients (e.g., charcoal to deep navy), soft dark textures (e.g., dark brushed metal, fine black paper texture, dark concrete), minimal deep-toned geometric shapes.\n    *   **Clean & Modern Dark:** Solid deep color fields (e.g., rich black, deep indigo, forest green, burgundy) with slight variations or subtle lighting effects.\n    *   **Atmospheric & Moody Dark:** Soft focus dark scenes, deep space with subtle stars, dark bokeh effects, gentle dark light leaks, ethereal dark color blends.\n3.  **Mood & Color Palette (Focus on dark colors suitable for white text):**\n    *   **Key Colors:** Charcoal grey, deep navy blue, rich black, dark forest green, deep plum, dark burgundy, slate grey.\n    *   Consider subtle highlights or secondary colors within the dark palette to add depth, but ensure they don't reduce overall contrast for white text.\n4.  **Elements to AVOID in the Background Image:**\n    *   **Any form of text, letters, numbers, or typography.**\n    *   Bright or light-colored dominant areas that would clash with white text.\n    *   Cluttered scenes, busy patterns, overly detailed illustrations, or distracting objects that would compete with the overlaid Post Text.\n    *   Prominent human figures or faces unless specifically requested and designed with very dark, shadowed aesthetics to leave clear space for white text.\n5.  **Example Phrases for Dark Background Prompt (These are guides, adapt them):**\n    *   \"Dark minimalist abstract background, charcoal to deep indigo gradient, subtle dark brushed metal texture, abundant clear space for white text overlay, text-free.\"\n    *   \"Clean, modern dark background, solid rich black with a slight textural grain, no text elements, designed for prominent white quote placement.\"\n    *   \"Atmospheric dark background, deep space with faint distant nebulae, text-free, ample dark copy space for white text.\"\n    *   \"Dark moody background, subtle deep forest green texture, soft vignette, completely text-free, perfect for white lettering.\"\n\n**III. Caption (This text accompanies the visual post):**\n1.  **Conciseness:** Keep the caption to 1-2 lines.\n2.  **Content Elements (Incorporate a suitable mix for this single caption):**\n    *   **Emojis:** Use 2-4 emojis that complement or enhance the post's overall vibe (e.g., 😂, 💯, 🤷‍♀️, 🔥, 👇, 🗣️, ✨, 🖤, 🌙).\n    *   **Relatability Cue (Optional):** A brief phrase acknowledging a shared experience (e.g., \"Who else feels this?\", \"Just me or...\", \"The accuracy!\").\n    *   **Call to Engagement (Recommended):**\n        *   Pose a simple question (e.g., \"Can you relate?\", \"Agree or disagree?\", \"What's your take?\").\n        *   Encourage tagging (e.g., \"Tag someone who needs to hear this!\").\n        *   Invite shares (e.g., \"Share if this is your mood!\").\n    *   **Account Tag:** Include the placeholder \"[@YourAccountName]\" for branding.\n3.  **Tone:**\n    *   The caption's tone should align with the energy of the main post text.\n    *   Maintain a light, conversational style.\n4.  **Originality:**\n    *   Ensure the caption feels fresh and prompts interaction.\n\n**IV. Hashtags:**\n1.  **Quantity:** Provide 2-4 hashtags for this single post.\n2.  **Style:**\n    *   Select **relevant, short, and a mix of popular and niche** hashtags.\n    *   Examples for inspiration: #RealTalk, #TruthBeTold, #MoodOfTheDay, #FunnyQuotes, #SelfLoveJourney, #Vibes, #Unfiltered, #DarkTheme, #[YourBrandSpecificHashtag].\n\n**Output Format:**\nPresent the **single generated update package** clearly separated as:\n*   **Post Text:** [Generated Text for the Post]\n*   **Image Background Prompt:** [Generated Prompt for Image Generator - ensure this requests a DARK, TEXT-FREE background]\n*   **Caption:** [Generated Caption]\n*   **Hashtags:** [Generated Hashtags]\n\nEnsure all four components are coherent and work together as one complete social media post.json output like \n[\n  {\n    \"PostText\": \"\",\n    \"ImageBackgroundPrompt\": \"\",\n    \"Caption\": \"\",\n    \"Hashtags\": \"\"\n  }\n]\n"
        },
        "type": "n8n-nodes-base.stickyNote",
        "position": [
          1100,
          -720
        ],
        "typeVersion": 1,
        "id": "22a13d2b-3423-4eb6-9f8d-b9f98b5aa83b",
        "name": "Sticky Note"
      }
    ],
    "connections": {
      "When clicking 'Execute workflow'": {
        "main": [
          [
            {
              "node": "Model Selection",
              "type": "main",
              "index": 0
            },
            {
              "node": "NocoDB",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Image": {
        "main": [
          [
            {
              "node": "Edit Image1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Image1": {
        "main": [
          [
            {
              "node": "HTML",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Edit Prompt and Model": {
        "main": [
          [
            {
              "node": "Send to Pollinations",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Send to Pollinations": {
        "main": [
          [
            {
              "node": "If",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Model Selection": {
        "main": [
          [
            {
              "node": "Edit Prompt and Model",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Code": {
        "main": [
          [
            {
              "node": "Edit Image",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "If": {
        "main": [
          [
            {
              "node": "ExtractResponse1",
              "type": "main",
              "index": 0
            }
          ],
          [
            {
              "node": "Wait",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "Wait": {
        "main": [
          [
            {
              "node": "Model Selection",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "NocoDB": {
        "main": [
          [
            {
              "node": "Code1",
              "type": "main",
              "index": 0
            }
          ]
        ]
      },
      "ExtractResponse1": {
        "main": [
          [
            {
              "node": "Code",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "a776e505-61b6-41c1-8db9-f8ac1f1a9f60",
    "triggerCount": 0,
    "tags": []
  },
  {
    "createdAt": "2025-04-15T12:41:29.948Z",
    "updatedAt": "2025-04-15T12:44:53.279Z",
    "id": "0AzAxBfdn6FHDMKY",
    "name": "My workflow 5",
    "active": false,
    "isArchived": false,
    "nodes": [
      {
        "parameters": {},
        "type": "n8n-nodes-base.manualTrigger",
        "typeVersion": 1,
        "position": [
          0,
          0
        ],
        "id": "b34d8b06-e2ea-4f06-bd08-fd0cda002c9d",
        "name": "When clicking ‘Test workflow’"
      },
      {
        "parameters": {
          "authentication": "nocoDbApiToken",
          "operation": "getAll",
          "workspaceId": "wiy9ne6p",
          "projectId": "p65a8hnug34ziyk",
          "table": "m8jfksa1urvr203",
          "options": {}
        },
        "type": "n8n-nodes-base.nocoDb",
        "typeVersion": 3,
        "position": [
          180,
          -140
        ],
        "id": "36ab0af2-cfa4-47cf-9b1a-13c07925b27a",
        "name": "NocoDB",
        "credentials": {
          "nocoDbApiToken": {
            "id": "D2dChTE8mgSdK7IP",
            "name": "NocoDB Token account"
          }
        }
      }
    ],
    "connections": {
      "When clicking ‘Test workflow’": {
        "main": [
          [
            {
              "node": "NocoDB",
              "type": "main",
              "index": 0
            }
          ]
        ]
      }
    },
    "settings": {
      "executionOrder": "v1"
    },
    "staticData": null,
    "meta": {
      "templateCredsSetupCompleted": true
    },
    "pinData": {},
    "versionId": "6ad68a54-9182-4e2d-9e4c-6b77a4dee6c7",
    "triggerCount": 0,
    "tags": []
  }
]