AutomationFlows β€Ί AI & RAG β€Ί Generate Multi-format Social Visuals with Abyssale and Publish via Blotato

Generate Multi-format Social Visuals with Abyssale and Publish via Blotato

ByDr. Firas @drfirasβœ“ on n8n.io

πŸ“„ Documentation: Notion Guide

Event triggerβ˜…β˜…β˜…β˜…β˜… complexityAI-powered53 nodesTelegram TriggerHTTP RequestAgentOpenAI ChatTelegramOutput Parser StructuredOpenAIForm Trigger
AI & RAG Trigger: Event Nodes: 53 Complexity: β˜…β˜…β˜…β˜…β˜… AI nodes: yes Added:

This workflow corresponds to n8n.io template #13357 β€” we link there as the canonical source.

This workflow follows the Agent β†’ Form recipe pattern β€” see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide β†’

Download .json
{
  "id": "yGPhOB5pUhqpSSZ3",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automate multi-format design creation in Abyssale and publish via Blotato",
  "tags": [],
  "nodes": [
    {
      "id": "232ae3dc-e4df-4625-9397-391931f3ba07",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2080,
        32
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {
          "download": true
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d18ba114-72ad-4db5-9c4b-c941f8f27531",
      "name": "Upload Image to tmpfiles",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1568,
        32
      ],
      "parameters": {
        "url": "https://tmpfiles.org/api/v1/upload",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "responseFormat": "json"
            }
          }
        },
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "file",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "f1861716-a262-4d02-829f-70d458a92198",
      "name": "Extract Public URL",
      "type": "n8n-nodes-base.code",
      "position": [
        -1344,
        32
      ],
      "parameters": {
        "jsCode": "const response = $input.first().json;\nconst tmpUrl = response.data.url;\nconst publicUrl = tmpUrl.replace('tmpfiles.org/', 'tmpfiles.org/dl/');\n\nreturn [{\n  json: {\n    ...response,\n    publicImageUrl: publicUrl\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "cefed02e-4202-4190-a822-19d535f2729d",
      "name": "Prepare AI Agent Input",
      "type": "n8n-nodes-base.set",
      "position": [
        -1152,
        32
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "image_url",
              "type": "string",
              "value": "={{ $json.publicImageUrl }}"
            },
            {
              "id": "id-2",
              "name": "description",
              "type": "string",
              "value": "={{ $('Telegram Trigger').item.json.message.caption }}"
            },
            {
              "id": "id-3",
              "name": "chatId",
              "type": "string",
              "value": "={{ $('Telegram Trigger').item.json.message.chat.id }}"
            },
            {
              "id": "id-4",
              "name": "messageId",
              "type": "string",
              "value": "={{ $('Telegram Trigger').item.json.message.message_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "085dc2cc-78e9-4f59-bec7-dd4b202dba42",
      "name": "Generate NanoBanana Prompt",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -704,
        32
      ],
      "parameters": {
        "text": "=Your task is to create an image prompt following the system guidelines.  \nEnsure that the reference image is represented as **accurately as possible**, including all text elements.  \n\nUse the following inputs:  \n\n- **User\u2019s description:**  \n{{ $('Prepare AI Agent Input').item.json.description }}\n- **Reference image description:**  \n{{ $json.content }}",
        "options": {
          "systemMessage": "=You are a professional product image prompt engineer.\n\nYour task is to generate one concise, natural, and highly realistic image generation prompt for NanoBanana based on a given product description and/or reference image.\n\nThe generated prompt must:\n- Clearly describe the product with all visible details (shape, color, texture, materials, finish, branding if mentioned).\n- Preserve the exact product characteristics from the description.\n- Focus on a clean, complete, centered product view.\n- Ensure the product is fully visible (no cropping).\n- Specify studio-quality lighting, sharp focus, ultra-detailed, photorealistic rendering.\n- Explicitly require: no background.\n- Explicitly require: fully transparent background.\n- Clearly state: isolated product cutout.\n- Avoid adding extra objects unless specified.\n- Avoid any environment, scene, surface, shadow floor, gradient, or backdrop.\n\nAdd this mandatory composition rule:\n\nThe generated image must contain exactly one single instance of the product.\nDo not duplicate, clone, mirror, repeat, or show multiple angles.\nDo not create grouped layouts or grid compositions.\nDo not add secondary copies in the background.\nDo not add packaging unless explicitly requested.\n\nException rule:\nIf the User\u2019s description explicitly requests multiple products, multiple units, bundles, different positions, or multiple angles:\n\nUser\u2019s description:\n{{ $('Prepare AI Agent Input').item.json.description }}\n\nThen you may generate multiple products strictly according to the request.\n\nOtherwise, always enforce:\n\"Single product only, one instance, centered composition, no duplication.\"\n\nThis rule is mandatory and must be clearly reflected inside the generated image_prompt.\n\n\nRULES:\n- background : isolated product cutout, fully transparent background, true alpha channel transparency, no background, no surface, no shadows, no environment\n- Always output one JSON object only with the key:\n  - \"image_prompt\": string\n- No extra commentary.\n- No extra keys.\n- Maximum 120 words.\n\nAdd this mandatory preservation rule:\n\n-The product\u2019s original format, proportions, structure, packaging shape, and layout must never be altered.\n-Do not modify, reinterpret, redesign, stylize, or enhance the product.\n-Do not change colors, tones, shades, materials, textures, finishes, branding, typography, or logo placement.\n-Do not improve lighting in a way that alters perceived color accuracy.\n-Preserve exact color fidelity and visual identity.\n-Maintain the exact physical characteristics of the selected product.\n-This rule is strict and must be clearly reflected inside the generated image_prompt.\n\nOUTPUT CONTRACT:\n- JSON only.\n- No prose outside JSON.\n\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3.1
    },
    {
      "id": "9a761277-3dd0-404f-af33-a2bb7aa2728d",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -752,
        256
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5.2",
          "cachedResultName": "gpt-5.2"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "0d27891c-1c86-477e-b2d4-f332446305df",
      "name": "Create NanoBanana Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2080,
        624
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateImage",
        "method": "POST",
        "options": {},
        "jsonBody": "={{\n  {\n    model: \"google/nano-banana-pro/edit\",\n    aspect_ratio: \"1:1\",\n    enable_base64_output: false,\n    enable_sync_mode: false,\n    images: [\n      $(\"Prepare AI Agent Input\").item.json.image_url\n    ],\n    output_format: \"png\",\n    prompt: $json.output.image_prompt,\n    resolution: \"1k\"\n  }\n}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <__PLACEHOLDER_VALUE__AtlasCloud API Key__>"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "49cc7a95-ed18-448f-8781-5e5f524fb116",
      "name": "Extract Prediction ID",
      "type": "n8n-nodes-base.code",
      "position": [
        -1840,
        624
      ],
      "parameters": {
        "jsCode": "const response = $input.first().json;\n\nreturn [{\n  json: {\n    predictionId: response.data.id,\n    chatId: $('Prepare AI Agent Input').item.json.chatId,\n    messageId: $('Prepare AI Agent Input').item.json.messageId\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "19aa00e5-1ff7-464f-98ac-597b19a3c38a",
      "name": "Wait Before Polling",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1632,
        624
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "1e001217-7330-4f11-8979-11162600119a",
      "name": "Check Image Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1408,
        544
      ],
      "parameters": {
        "url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $('Extract Prediction ID').item.json.predictionId }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <__PLACEHOLDER_VALUE__AtlasCloud API Key__>"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "18205223-f657-44fe-a4fa-3ca893f662ae",
      "name": "Check If Completed",
      "type": "n8n-nodes-base.if",
      "position": [
        -1184,
        624
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "35c79312-101d-4d24-8fb1-0df74494eb30",
      "name": "Extract Final Image URL",
      "type": "n8n-nodes-base.code",
      "position": [
        -576,
        608
      ],
      "parameters": {
        "jsCode": "// Extract Final Image URL\n\nreturn items.map(item => {\n  const imageUrl =\n    item.json?.data?.outputs?.[0] || null;\n\n  return {\n    json: {\n      imageUrl\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "fa9d6cf8-de1d-4f5b-b8c1-2c5ba73ed41d",
      "name": "Download Final Image",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -752,
        1024
      ],
      "parameters": {
        "url": "={{ $json.imageUrl }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "827f8e60-3332-491f-b41f-cc422fbcb16e",
      "name": "Send Photo to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -576,
        1024
      ],
      "parameters": {
        "chatId": "={{ $('Prepare AI Agent Input').item.json.chatId }}",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {
          "reply_to_message_id": "={{ $('Prepare AI Agent Input').item.json.messageId }}"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "3873ed63-05cf-476a-bb8c-67111030c436",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -560,
        256
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"image_prompt\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Detailed image generation prompt for NanoBanana API\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "9ddd1aad-aa7e-4340-8122-820c87b033ee",
      "name": "Get a file",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -1792,
        32
      ],
      "parameters": {
        "fileId": "={{$json.message.photo[$json.message.photo.length - 1].file_id}}",
        "resource": "file",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "771d9550-e94a-4bc9-9b09-31d7b4306e21",
      "name": "OpenAI Vision: Analyze Reference Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -928,
        32
      ],
      "parameters": {
        "text": "=You are an image analysis assistant.\n\nYour task is to analyze the given image and output results **only in YAML format**. Do not add explanations, comments, or extra text outside YAML.\n\nRules:\n\n- If the image depicts a **product**, return:\n    \n    ```yaml\n    brand_name: (brand if visible or inferable)\n    color_scheme:\n      - hex: (hex code of each prominent color)\n        name: (descriptive name of the color)\n    font_style: (serif/sans-serif, bold/thin, etc.)\n    visual_description: (1\u20132 sentences summarizing what is seen, ignoring the background)\n    \n    ```\n    \n- If the image depicts a **character**, return:\n    \n    ```yaml\n    character_name: (name if visible or inferable, else \"unknown\")\n    color_scheme:\n      - hex: (hex code of each prominent color on the character)\n        name: (descriptive name of the color)\n    outfit_style: (clothing style, accessories, or notable features)\n    visual_description: (1\u20132 sentences summarizing what the character looks like, ignoring the background)\n    \n    ```\n    \n- If the image depicts **both**, return **both sections** in YAML.\n\nOnly output valid YAML. No explanations.",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "resource": "image",
        "imageUrls": "={{ $json.image_url }}",
        "operation": "analyze"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "d16a1b1b-67bf-41f6-8381-0aa6ae4ec160",
      "name": "Extract Prediction ID1",
      "type": "n8n-nodes-base.code",
      "position": [
        -1824,
        1040
      ],
      "parameters": {
        "jsCode": "const response = $input.first().json;\n\nreturn [{\n  json: {\n    predictionId: response.data.id,\n    chatId: $('Prepare AI Agent Input').item.json.chatId,\n    messageId: $('Prepare AI Agent Input').item.json.messageId\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "6c5aba77-4e97-4254-82d8-1bdd32da5753",
      "name": "Wait Before Polling1",
      "type": "n8n-nodes-base.wait",
      "position": [
        -1632,
        1040
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "bd4e2d4c-9e24-412b-8c4a-d665e47a9e8b",
      "name": "Check Image Status1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1408,
        976
      ],
      "parameters": {
        "url": "=https://api.atlascloud.ai/api/v1/model/prediction/{{ $('Extract Prediction ID1').item.json.predictionId }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <__PLACEHOLDER_VALUE__AtlasCloud API Key__>"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "44d4f1be-036e-40f1-a631-908b20c3472b",
      "name": "Check If Completed1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1184,
        1040
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "483240de-724d-4480-8e2f-2e2e7ba66211",
      "name": "Extract Final Image URL1",
      "type": "n8n-nodes-base.code",
      "position": [
        -960,
        1024
      ],
      "parameters": {
        "jsCode": "// Extract Final Image URL\n\nreturn items.map(item => {\n  const imageUrl =\n    item.json?.data?.outputs?.[0] || null;\n\n  return {\n    json: {\n      imageUrl\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "ad3967cc-28fd-4b8e-a1b1-d36b2edb46a0",
      "name": "image background remover",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2064,
        1040
      ],
      "parameters": {
        "url": "https://api.atlascloud.ai/api/v1/model/generateImage",
        "method": "POST",
        "options": {},
        "jsonBody": "={{\n  ({\n    model: \"atlascloud/image-background-remover\",\n    enable_base64_output: false,\n    enable_sync_mode: false,\n    image: $json.imageUrl\n  })\n}}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer <__PLACEHOLDER_VALUE__AtlasCloud API Key__>"
            }
          ]
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "8a0f9bd6-b924-4bd1-b70f-b7f018fe44af",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        -96
      ],
      "parameters": {
        "color": 7,
        "width": 1776,
        "height": 512,
        "content": "# \ud83d\udd39 Step 1: Generate the NanoBanana Image Prompt"
      },
      "typeVersion": 1
    },
    {
      "id": "4732c674-806d-469f-99a5-568d4590cbca",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        448
      ],
      "parameters": {
        "color": 7,
        "width": 1776,
        "height": 416,
        "content": "# \ud83d\udd39 Step 2: Generate and Retrieve the Edited Product Image"
      },
      "typeVersion": 1
    },
    {
      "id": "410ceaf4-3597-4146-af88-993d73350a61",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        896
      ],
      "parameters": {
        "color": 7,
        "width": 1776,
        "height": 384,
        "content": "# \ud83d\udd39 Step 3: Remove the Background and Create Transparent Cutout"
      },
      "typeVersion": 1
    },
    {
      "id": "bc7327be-95f1-475a-98c3-9d16eb2d057e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        1344
      ],
      "parameters": {
        "color": 4,
        "width": 2496,
        "height": 448,
        "content": "# \ud83d\udd39 Step 4: Generate Multi-Platform Social Media Designs with **[Abyssale.com](https://abyssale.cello.so/wXzGGKBcrTl)** "
      },
      "typeVersion": 1
    },
    {
      "id": "297ac9c1-9a7b-4096-bfbe-fa6587d6fb50",
      "name": "Extract Layers",
      "type": "n8n-nodes-base.code",
      "position": [
        -1680,
        1504
      ],
      "parameters": {
        "jsCode": "const design = $input.first().json;\nconst elements = design.elements;\n\nconst fields = elements.map(el => {\n  const attr = el.attributes[0];\n  return {\n    name: el.name,\n    type: el.type,\n    attribute: attr.id,\n    currentValue: attr.values['facebook-post']\n  };\n});\n\nreturn [{ json: { templateId: design.template_id, fields } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "f9e9b69f-4cad-424d-b860-4daa9f383fa3",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2080,
        1504
      ],
      "parameters": {
        "options": {},
        "formTitle": "Abyssale Generator",
        "formFields": {
          "values": [
            {
              "fieldName": "Template ID",
              "fieldLabel": "Template ID",
              "placeholder": "Template ID"
            }
          ]
        }
      },
      "typeVersion": 2.4
    },
    {
      "id": "08f267cd-95fc-418e-bcd8-976d46a315ce",
      "name": "Form",
      "type": "n8n-nodes-base.form",
      "position": [
        -1264,
        1504
      ],
      "parameters": {
        "options": {
          "customCss": ":root {\n\t--font-family: 'Open Sans', sans-serif;\n\t--font-weight-normal: 400;\n\t--font-weight-bold: 600;\n\t--font-size-body: 12px;\n\t--font-size-label: 14px;\n\t--font-size-test-notice: 12px;\n\t--font-size-input: 14px;\n\t--font-size-header: 20px;\n\t--font-size-paragraph: 14px;\n\t--font-size-link: 12px;\n\t--font-size-error: 12px;\n\t--font-size-html-h1: 28px;\n\t--font-size-html-h2: 20px;\n\t--font-size-html-h3: 16px;\n\t--font-size-html-h4: 14px;\n\t--font-size-html-h5: 12px;\n\t--font-size-html-h6: 10px;\n\t--font-size-subheader: 14px;\n\n\t/* Colors */\n\t--color-background: #333333;\n\t--color-test-notice-text: #e6a23d;\n\t--color-test-notice-bg: #fefaf6;\n\t--color-test-notice-border: #f6dcb7;\n\t--color-card-bg: #333333;\n\t--color-card-border: #dbdfe7;\n\t--color-card-shadow: rgba(99, 77, 255, 0.06);\n\t--color-link: #7e8186;\n\t--color-header: #525356;\n\t--color-label: #ffffff;\n\t--color-input-border: #dbdfe7;\n\t--color-input-text: #71747A;\n\t--color-focus-border: rgb(90, 76, 194);\n\t--color-submit-btn-bg: #ff6d5a;\n\t--color-submit-btn-text: #ffffff;\n\t--color-error: #ea1f30;\n\t--color-required: #ff6d5a;\n\t--color-clear-button-bg: #7e8186;\n\t--color-html-text: #555;\n\t--color-html-link: #ff6d5a;\n\t--color-header-subtext: #7e8186;\n\n\t/* Border Radii */\n\t--border-radius-card: 8px;\n\t--border-radius-input: 6px;\n\t--border-radius-clear-btn: 50%;\n\t--card-border-radius: 8px;\n\n\t/* Spacing */\n\t--padding-container-top: 24px;\n\t--padding-card: 24px;\n\t--padding-test-notice-vertical: 12px;\n\t--padding-test-notice-horizontal: 24px;\n\t--margin-bottom-card: 16px;\n\t--padding-form-input: 12px;\n\t--card-padding: 24px;\n\t--card-margin-bottom: 16px;\n\n\t/* Dimensions */\n\t--container-width: 448px;\n\t--submit-btn-height: 48px;\n\t--checkbox-size: 18px;\n\n\t/* Others */\n\t--box-shadow-card: 0px 4px 16px 0px var(--color-card-shadow);\n\t--opacity-placeholder: 0.5;\n}"
        },
        "defineForm": "json",
        "jsonOutput": "={{ $json.formFields }}"
      },
      "typeVersion": 2.4
    },
    {
      "id": "e22e8f52-0eb8-437f-80c0-05e19cbe8db6",
      "name": "Build Form Fields",
      "type": "n8n-nodes-base.code",
      "position": [
        -1472,
        1504
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json;\nconst fields = data.fields;\nconst formFields = [];\nconst stripHtml = (str) => (str ?? '').toString().replace(/<[^>]*>/g, '');\n\n// Build dynamic fields from template\nfor (const field of fields) {\n  if (field.type === 'image' || field.type === 'logo') {\n    // Preview\n    formFields.push({\n      fieldLabel: `${field.name} (preview)`,\n      fieldType: \"html\",\n      html: `<div style=\"padding:12px;border:1px solid #ddd;border-radius:12px;margin:8px 0\">\n               <p style=\"font-weight:bold;margin-bottom:8px\">${field.name}</p>\n               <img src=\"${field.currentValue}\" width=\"300\" height=\"auto\" />\n             </div>`\n    });\n    // File upload\n    formFields.push({\n      fieldLabel: `${field.name} (upload new)`,\n      fieldType: \"file\",\n      acceptFileTypes: \".png, .jpg, .jpeg, .svg, .webp\",\n      requiredField: false\n    });\n  } else if (field.type === 'text') {\n    formFields.push({\n      fieldLabel: `${field.name}`,\n      fieldType: \"text\",\n      placeholder: stripHtml(field.currentValue),\n      defaultValue: stripHtml(field.currentValue),\n      requiredField: false\n    });\n  } else if (field.type === 'container') {\n    formFields.push({\n      fieldLabel: `${field.name} (${field.attribute})`,\n      fieldType: \"text\",\n      placeholder: field.currentValue,\n      defaultValue: field.currentValue,\n      requiredField: false\n    });\n  }\n}\n\n// ADDITION: caption input for social media\nformFields.push({\n  fieldLabel: \"caption for social media\",\n  fieldType: \"text\",\n  placeholder: \"Write the caption you want to publish with these images...\",\n  defaultValue: \"\",\n  requiredField: false\n});\n\nreturn [\n  {\n    json: {\n      templateId: data.templateId,\n      formFields,\n      totalFields: fields.length\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "bfdf16ff-ed68-4a1b-b9c7-7d307cf990a6",
      "name": "Build Abyssale Elements",
      "type": "n8n-nodes-base.code",
      "position": [
        -736,
        1504
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json;\nconst base64Images = data.base64Images || {};\nconst design = $('Get a design').first().json;\nconst templateId = design.template_id;\nconst formats = design.formats;\n\nconst elements = {};\nconst hexRegex = /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;\n\nfor (const el of design.elements) {\n  const name = el.name;\n  const attr = el.attributes[0];\n  const defaultVal = attr.values['facebook-post'];\n\n  if (el.type === 'container') {\n    let val = data[`${name} (${attr.id})`];\n    if (attr.id === 'background_color') {\n      val = (val && hexRegex.test(val)) ? val : defaultVal;\n    }\n    if (val) elements[name] = { [attr.id]: val };\n  } else if (el.type === 'text') {\n    const val = data[name] || defaultVal;\n    if (val) elements[name] = { payload: val };\n  } else if (el.type === 'image' || el.type === 'logo') {\n    // Key format: details__upload_new_, product__upload_new_, logo__upload_new_\n    const binaryKey = `${name}__upload_new_`;\n\n    if (base64Images[binaryKey]) {\n      const raw = base64Images[binaryKey].replace(/^data:[^;]+;base64,/, '');\n      elements[name] = { image_encoded: raw };\n    } else {\n      elements[name] = { image_url: defaultVal };\n    }\n  }\n}\n\nreturn formats.map(f => ({\n  json: {\n    url: `https://api.abyssale.com/banner-builder/${templateId}/generate`,\n    body: {\n      template_format_name: f.id,\n      elements\n    },\n    formatName: `${f.id} (${f.width}x${f.height})`\n  }\n}));"
      },
      "typeVersion": 2
    },
    {
      "id": "43ae98f5-a5bd-40a1-8fcb-810ee13b9dac",
      "name": "Generate Images",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -416,
        1504
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "method": "POST",
        "options": {},
        "jsonBody": "={{ $json.body }}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "AbyssaleApi"
      },
      "credentials": {
        "AbyssaleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.3
    },
    {
      "id": "c2fba49f-218b-4395-add2-1ad9fdee133a",
      "name": "Convert Uploads to Base64",
      "type": "n8n-nodes-base.code",
      "position": [
        -1056,
        1504
      ],
      "parameters": {
        "jsCode": "const jsonData = $input.first().json;\nconst binaryData = $input.first().binary || {};\nconst base64Images = {};\n\nfor (const key of Object.keys(binaryData)) {\n  const buffer = await this.helpers.getBinaryDataBuffer(0, key);\n  const mimeType = binaryData[key].mimeType;\n  base64Images[key] = `data:${mimeType};base64,${buffer.toString('base64')}`;\n}\n\nreturn [{\n  json: {\n    ...jsonData,\n    base64Images\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "ecf7e142-9849-4a5f-84ee-3ba4e2f9dfcb",
      "name": "Get a design",
      "type": "n8n-nodes-abyssale.abyssale",
      "position": [
        -1872,
        1504
      ],
      "parameters": {
        "designId": "={{ $json['Template ID'] }}",
        "resource": "design"
      },
      "credentials": {
        "AbyssaleApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "40a97295-d673-466d-9817-c35be92558c2",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        -144,
        1408
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0f1d9cb7-7155-4479-8388-bb793cd0bf79",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "facebook-post"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "5bbe2300-410f-4fb7-90a6-a62ce770daaf",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "facebook-reel"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "789476c7-b962-4da0-8d12-b14d4fd6638f",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "=instagram-post"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d2531084-24e3-41da-98ab-f0fc6e22e88a",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "instagram-story"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "715e5a39-550b-4b56-8345-489d097caff2",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "tiktok-post"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "d080e5a9-5d37-4524-8ed1-26fbf6bc0390",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "twitter-post"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "593f6831-87cf-4656-8b8c-152da535625e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "linkedin-feed"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 3,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "42effcc8-04f5-49ca-bd4f-86814194d616",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{$json.format.id}}",
                    "rightValue": "pinterest-pins"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.4
    },
    {
      "id": "47361162-0cac-48de-bada-fc9337e409c3",
      "name": "Upload media",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        80,
        1392
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4b3b55e9-863c-4de5-91cf-393a1991283c",
      "name": "Upload media1",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        224,
        1568
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "ab17e10c-ff38-4cd6-a751-cf0706c1b3aa",
      "name": "Upload media2",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        368,
        1712
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c7078365-3b0a-4be0-86e7-a7538443ab6b",
      "name": "Upload media3",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        512,
        1856
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "39f7f020-b7d6-43e1-9c41-4d055997aa2e",
      "name": "Upload media4",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        656,
        2000
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9e814c5f-8f5d-4dac-832c-d8968b554d1a",
      "name": "Upload media5",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        800,
        2144
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d3741df6-0f8f-4fe1-b7b3-8f9cb0ab3052",
      "name": "Upload media6",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        944,
        2288
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "8b4a13db-6984-4e67-8bb1-709d2c251b91",
      "name": "Upload media7",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1088,
        2432
      ],
      "parameters": {
        "mediaUrl": "={{ $json.file.cdn_url }}",
        "resource": "media"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "5ad85f0a-c812-401c-a3f2-458320f14f63",
      "name": "Create facebook-post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        288,
        1392
      ],
      "parameters": {
        "options": {},
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": "101603614680195",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759/subaccounts/101603614680195",
          "cachedResultName": "Dr. Firas"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "835769b8-a965-4282-99ec-e9f69f2cff91",
      "name": "Create facebook-reel",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        432,
        1568
      ],
      "parameters": {
        "options": {
          "facebookMediaType": "reel"
        },
        "platform": "facebook",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "facebookPageId": {
          "__rl": true,
          "mode": "list",
          "value": "101603614680195",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759/subaccounts/101603614680195",
          "cachedResultName": "Dr. Firas"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "a454dcb9-ada8-45c6-ba33-8157d8978992",
      "name": "Create instagram-post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        576,
        1712
      ],
      "parameters": {
        "options": {},
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "afbf44f7-3d68-4da7-b56c-b1d8c34bb896",
      "name": "Create instagram-story",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        720,
        1856
      ],
      "parameters": {
        "options": {
          "instagramMediaType": "reel"
        },
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "7027e436-973d-47f1-a2a3-2745ef9074d6",
      "name": "Create tiktok-post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        864,
        2000
      ],
      "parameters": {
        "options": {},
        "platform": "tiktok",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "2079",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/2079",
          "cachedResultName": "elitecybzcs"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "4b89de18-9909-4f90-97a5-49cf6096d000",
      "name": "Create twitter-post",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1008,
        2144
      ],
      "parameters": {
        "options": {},
        "platform": "twitter",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "afa64f71-6b3b-4b95-b48c-ec881d71e1a9",
      "name": "Create linkedin-feed",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1152,
        2288
      ],
      "parameters": {
        "options": {},
        "platform": "linkedin",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1446",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1446",
          "cachedResultName": "Samuel Amalric"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d9991da3-e57e-47ce-865e-731cef9bc25c",
      "name": "Create pinterest-pins",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        1296,
        2432
      ],
      "parameters": {
        "options": {},
        "platform": "pinterest",
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": "1759",
          "cachedResultUrl": "https://backend.blotato.com/v2/accounts/1759",
          "cachedResultName": "Firass Ben"
        },
        "postContentText": "={{ $('Form').item.json['caption for social media'] }}",
        "pinterestBoardId": {
          "__rl": true,
          "mode": "id",
          "value": "1146658823815436667"
        },
        "postContentMediaUrls": "={{ $json.url }}"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d0e9a4a8-738e-48ec-98a9-62083a893b3a",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2848,
        -96
      ],
      "parameters": {
        "width": 652,
        "height": 1892,
        "content": "# \ud83d\ude80  Generate social media designs in Abyssale and publish to Blotato \n## (By Dr. Firas)\n\n@[youtube](T9gNqXRH8nE)\n\n# \ud83d\udcd8 Documentation  \nAccess detailed setup instructions, API config, platform connection guides, and workflow customization tips: \ud83d\udcce [Open the full documentation on Notion](https://automatisation.notion.site/Automate-multi-format-design-creation-in-Abyssale-and-publish-via-Blotato-3053d6550fd98094a291f106966ca092?source=copy_link)\n\n# \ud83d\ude80 Workflow Configuration Overview\n\n---\n\n## \ud83c\udd94  Object ID of this Workflow\n\nUse this ID when referencing the Abyssale template or duplicating the workflow in your workspace.\n\n---\n\n## \u2699\ufe0f What This Workflow Does\n\nThis workflow automates the complete lifecycle of a social media campaign:\n\n1. Generates a high-quality product image using AI  \n2. Removes the background to produce a transparent PNG  \n3. Injects the product into an Abyssale design template  \n4. Generates multiple social media formats automatically  \n5. Dispatches each format to a dedicated Blotato node  \n6. Publishes the visuals directly to their corresponding platforms  \n\nIt eliminates manual resizing, exporting, uploading, and publishing \u2014 everything runs in one automated pipeline.\n\n---\n\n## \ud83d\udd10 Setup\n\n## 1. **Credentials Required**\n- **[Abyssale](https://abyssale.cello.so/wXzGGKBcrTl)** API credentials  \n- **[Blotato](https://blotato.com/?ref=firas)** API credentials  \n- **[AtlasCloud](https://www.atlascloud.ai?ref=8QKPJE)** API (NanoBanana) + Background Remover API  \n\n---\n\n## 2. Configuration Steps\n- Add all required credentials inside n8n\n- Confirm your Abyssale template includes all required formats\n- Connect Blotato to your social media accounts\n- Verify the AI image generation and background remover endpoints\n- Test one execution before activating production mode"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "availableInMCP": false,
    "executionOrder": "v1"
  },
  "versionId": "fa2b748f-50a7-4645-88e7-693e5c4fa43d",
  "connections": {
    "Form": {
      "main": [
        [
          {
            "node": "Convert Uploads to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Upload media",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media3",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media4",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Upload media7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file": {
      "main": [
        [
          {
            "node": "Upload Image to tmpfiles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a design": {
      "main": [
        [
          {
            "node": "Extract Layers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media": {
      "main": [
        [
          {
            "node": "Create facebook-post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media1": {
      "main": [
        [
          {
            "node": "Create facebook-reel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media2": {
      "main": [
        [
          {
            "node": "Create instagram-post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media3": {
      "main": [
        [
          {
            "node": "Create instagram-story",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media4": {
      "main": [
        [
          {
            "node": "Create tiktok-post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media5": {
      "main": [
        [
          {
            "node": "Create twitter-post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media6": {
      "main": [
        [
          {
            "node": "Create linkedin-feed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload media7": {
      "main": [
        [
          {
            "node": "Create pinterest-pins",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Layers": {
      "main": [
        [
          {
            "node": "Build Form Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Images": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Form Fields": {
      "main": [
        [
          {
            "node": "Form",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Generate NanoBanana Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check If Completed": {
      "main": [
        [
          {
            "node": "Extract Final Image URL",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Polling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Image Status": {
      "main": [
        [
          {
            "node": "Check If Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Public URL": {
      "main": [
        [
          {
            "node": "Prepare AI Agent Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Get a design",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Completed1": {
      "main": [
        [
          {
            "node": "Extract Final Image URL1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Polling1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Image Status1": {
      "main": [
        [
          {
            "node": "Check If Completed1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Polling": {
      "main": [
        [
          {
            "node": "Check Image Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create facebook-post": {
      "main": [
        []
      ]
    },
    "Download Final Image": {
      "main": [
        [
          {
            "node": "Send Photo to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Polling1": {
      "main": [
        [
          {
            "node": "Check Image Status1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Prediction ID": {
      "main": [
        [
          {
            "node": "Wait Before Polling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Prediction ID1": {
      "main": [
        [
          {
            "node": "Wait Before Polling1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare AI Agent Input": {
      "main": [
        [
          {
            "node": "OpenAI Vision: Analyze Reference Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Abyssale Elements": {
      "main": [
        [
          {
            "node": "Generate Images",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create NanoBanana Image": {
      "main": [
        [
          {
            "node": "Extract Prediction ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Final Image URL": {
      "main": [
        [
          {
            "node": "image background remover",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Final Image URL1": {
      "main": [
        [
          {
            "node": "Download Final Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Generate NanoBanana Prompt",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to tmpfiles": {
      "main": [
        [
          {
            "node": "Extract Public URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "image background remover": {
      "main": [
        [
          {
            "node": "Extract Prediction ID1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Uploads to Base64": {
      "main": [
        [
          {
            "node": "Build Abyssale Elements",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate NanoBanana Prompt": {
      "main": [
        [
          {
            "node": "Create NanoBanana Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Vision: Analyze Reference Image": {
      "main": [
        [
          {
            "node": "Generate NanoBanana Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing β€” you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

πŸ“„ Documentation: Notion Guide

Source: https://n8n.io/workflows/13357/ β€” original creator credit. Request a take-down β†’

More AI & RAG workflows β†’ Β· Browse all categories β†’

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes β€” all on autopilot.

OpenAI, HTTP Request, Form Trigger +7
AI & RAG

Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.

@Blotato/N8N Nodes Blotato, Google Sheets, OpenAI Chat +9
AI & RAG

RAG CHATBOT Main. Uses telegram, telegramTrigger, lmChatOpenAi, n8n-nodes-mcp. Event-driven trigger; 87 nodes.

Telegram, Telegram Trigger, OpenAI Chat +8
AI & RAG

Digital marketers, content creators, social media managers, and businesses who want to use AI marketing automation for YouTube Shorts without spending hours on production. This AI workflow helps anyon

OpenAI, HTTP Request, OpenAI Chat +7
AI & RAG

Transform your salon/service business with this streamlined Telegram automation system featuring Claude integration, zero-setup database management, and intelligent conversation handling. Claude MCP I

Redis, Agent Tool, Google Calendar +10