AutomationFlowsAI & RAG › AI Image & Template Generator with Gemini

AI Image & Template Generator with Gemini

Original n8n title: Master

Master. Uses gmail, googleGemini, googleCloudStorage. Webhook trigger; 19 nodes.

Webhook trigger★★★★☆ complexityAI-powered19 nodesGmailGoogle GeminiGoogle Cloud Storage
AI & RAG Trigger: Webhook Nodes: 19 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Gmail → Googlegemini 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
{
  "name": "Master",
  "nodes": [
    {
      "parameters": {
        "sendTo": "={{ $('Webhook').item.json.body.email }}",
        "subject": "P&G is WATCHING YOU",
        "message": "={{ $json.content.parts[0].text }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        640,
        1840
      ],
      "id": "0b7293d8-4d14-4205-8791-f505bad7deab",
      "name": "Send a message",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "resource": "image",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.5-flash-image-preview",
          "mode": "list",
          "cachedResultName": "models/gemini-2.5-flash-image-preview (Nano Banana)"
        },
        "prompt": "={{ $json.prompt }}\n\n\u56fe\u7247\u505a\u5c0f\u4e00\u70b9\u3002500kb\u4ee5\u5185\u3002",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        864,
        2128
      ],
      "id": "cb6d0dc1-7ed0-4081-bd85-cdbf982da410",
      "name": "Generate an image2",
      "retryOnFail": true,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.0-flash-lite",
          "mode": "list",
          "cachedResultName": "models/gemini-2.0-flash-lite"
        },
        "messages": {
          "values": [
            {
              "content": "={{ $json.content.parts[0].text }}\n\n\u6839\u636e\u8fd9\u4e9b\u4fe1\u606f\u751f\u6210\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u8425\u9500\u90ae\u4ef6\u6a21\u677f\u3002\n\n\u90ae\u4ef6\u683c\u5f0f\u662fhtml\uff0c\u7ed9\u624b\u673a\u7aef\u4f18\u5316\u3002\n\n\u90ae\u4ef6\u6570\u91cf\u53d6\u51b3\u4e8e\u4fe1\u606f\u91cc\u5305\u542b\u7684\u56fd\u5bb6\u3001\u5730\u533a\uff0c\u6309\u7167\u4e0d\u540c\u8bed\u8a00\u751f\u6210\u3002\u4e0d\u7ba1\u6709\u6ca1\u6709\u6307\u660e\uff0c\u90fd\u6700\u5c11\u751f\u6210\u82f1\u8bed+\u82ac\u5170\u8bed\u7684\u4e24\u4e2a\u7248\u672c\u3002\n\n\u90ae\u4ef6\u91cc\u8981\u6709\u81f3\u5c11\u4e00\u4e2a\u56fe\u7247\uff0c\u53ef\u4ee5\u6709\u66f4\u591a\uff0c\u6700\u591a\u56db\u4e2a\u3002\n\n\u56fe\u7247\u73b0\u5728\u53ea\u662f\u5360\u4f4d\u7b26\uff0c\u6211\u540e\u7eed\u4f1a\u901a\u8fc7\u63a5\u5165\u5176\u4ed6\u6a21\u578b\u751f\u6210\u3002\n\n\u76f4\u63a5\u8f93\u51fajson\u5b57\u7b26\u4e32\u683c\u5f0f\u3002\u5b57\u7b26\u4e32\u4e2d\u5305\u542b\uff0c\u90ae\u4ef6\u6a21\u677f\u5217\u8868\uff0c\u548c\u8981\u751f\u6210\u7684\u56fe\u7247\u7684prompt\u5217\u8868\uff0c\u6211\u540e\u7eed\u4f1a\u7ed9\u5176\u4ed6\u6a21\u578b\u4f7f\u7528\u3002\u8fd8\u8981\u6807\u8bb0html\u56fe\u7247\u7684\u5360\u4f4d\u7b26\u548c\u8981\u751f\u6210\u7684\u56fe\u7247\u7684\u5173\u7cfb\uff0c\u540e\u9762\u6211\u751f\u6210\u5b8c\u6210\u540e\uff0c\u8981\u62fc\u63a5\u56de\u6765\u3002\n\n\u8f93\u51fa\u7684\u683c\u5f0f\u662f\uff1a\n[{ \"language\": \"\", \"subject\": \"\", \"body_html\": \"\", \"image_prompts\": [{ \"image_placeholder\": \"\", \"prompt\": \"\" }] }]\n\n\u6570\u7ec4\u7684\u6bcf\u4e2aitem\u4ee3\u8868\u4e00\u4e2a\u90ae\u4ef6\u3002 \u6bcf\u4e2aitem\u4e2d\u7684image_prompts\uff0c\u662f\u5f53\u524d\u90ae\u4ef6\u7528\u5230\u7684\u56fe\u7247\u7684\u5360\u4f4d\u7b26\u3002\n\n\u4fdd\u8bc1\u5360\u4f4d\u7b26\u5168\u5267\u552f\u4e00\u3002\n\n\u5f3a\u8c03\uff1a\u76f4\u63a5\u8f93\u51fa\u6211\u9700\u8981\u7684\u5bf9\u5e94\u7684json\u5b57\u7b26\u4e32\uff0c\u4e0d\u8981\u6709\u5176\u4ed6markdown\u7b49\u4fe1\u606f\u3002"
            }
          ]
        },
        "jsonOutput": true,
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        -160,
        2064
      ],
      "id": "35c965c5-65fb-4784-be7a-4002034db610",
      "name": "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b26",
      "retryOnFail": true,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "return JSON.parse($input.first().json.content.parts[0].text)"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        192,
        2064
      ],
      "id": "928a307d-5cce-45af-8aa5-e93485024f76",
      "name": "Code in JavaScript",
      "executeOnce": false
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.5-pro",
          "mode": "list",
          "cachedResultName": "models/gemini-2.5-pro"
        },
        "messages": {
          "values": [
            {
              "content": "={{ $json.html_fulldata.html }}\n\n\u8fd9\u662f\u4e00\u4e2ahtml\u6a21\u677f\u3002\n\n{{ $json.html_fulldata.imgs.toJsonString() }}\n\u8fd9\u662f\u4e00\u4e2a\u53ef\u7528\u7684\u56fe\u7247\u94fe\u63a5\u548c\u8bf4\u660e\u5217\u8868\u3002\u5176\u4e2d\u7684url\u94fe\u63a5\uff0c\u4e0d\u53ef\u4ee5\u66f4\u6539\uff0c\u8981\u76f4\u63a5\u5f15\u7528\u5728HTML\u6587\u4ef6\u4e2d\u3002\u8c01\u6539\u8c01\u50bb\u903c\u3002\n\n\u540c\u4e00\u4e2ahtml\u6587\u4ef6\u91cc\uff0c\u4e0d\u8981\u7528\u91cd\u590d\u7684\u56fe\u7247url\u3002\n\n\u7ed9\u56fe\u7247\u6dfb\u52a0\u5230html\u91cc\uff0c\u5b8c\u5168\u66ff\u6362\u6389\u539f\u6765\u6a21\u677f\u4e2d\u63cf\u8ff0\u56fe\u7247\u5360\u4f4d\u7b26\u7684\u6240\u6709\u5757\u5143\u7d20\u3002\u4e4b\u540e\u4f18\u5316\u6392\u7248\uff0c\u786e\u4fdd\u6ca1\u6709\u8bed\u6cd5\u9519\u8bef\u3002\n\n\u68c0\u67e5\u751f\u6210\u7684HTML\u6587\u6863\uff0c\u786e\u4fdd\u5176\u4e2d\u7684\u56fe\u7247src\u5730\u5740\uff0c\u662f\u6211\u7ed9\u4f60\u7684\u53ef\u7528\u56fe\u7247\u5217\u8868\u4e2d\u7684URL\uff0c\u4e0d\u8981\u968f\u4fbf\u751f\u6210\uff0c\u4e0d\u8981\u4e0a\u7f51\u67e5\u627e\uff0c\u53ea\u7528\u6211\u7ed9\u4f60\u7684\u3002\n\n\u76f4\u63a5\u8fd4\u56de\u53ef\u7528\u7684HTML\u6587\u6863\u3002\u4e0d\u8981\u5199markdown\u7b49\u5176\u4ed6\u975e\u6cd5\u5b57\u7b26\u3002\u4e0d\u8981\u6dfb\u52a0\u989d\u5916\u7684\u6362\u884c\u7b26\u3002\u8f93\u51fa\u7684\u7ed3\u679c\u4e0d\u8981\u6dfb\u52a0\u5176\u4ed6\u5c42\u7ea7\u548c\u5b57\u6bb5\uff0c\u76f4\u63a5<!DOCTYPE html>\u5f00\u5934\u7684text\u3002"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        2864,
        2128
      ],
      "id": "5c717b15-b2f5-4e3c-a6c2-edd7c6e6c087",
      "name": "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b261",
      "retryOnFail": true,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "image_generated",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        2416,
        2064
      ],
      "id": "f790cb01-9540-40be-addc-d9fcf54f49ec",
      "name": "Aggregate"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        416,
        2064
      ],
      "id": "ed545007-9a8c-44ac-88c9-b440a47df032",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "fieldToSplitOut": "image_prompts",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        640,
        2128
      ],
      "id": "d9cc3306-fecc-4422-a5b9-06526c56cea7",
      "name": "Split Out1"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "image_generated",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        1968,
        2128
      ],
      "id": "3524f736-8c2a-4e86-a372-3836eb8a3f64",
      "name": "Aggregate2"
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "options": {}
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2192,
        2064
      ],
      "id": "a7fbb6e8-a1ad-4891-b16d-578c6f70976b",
      "name": "Merge"
    },
    {
      "parameters": {
        "jsCode": "const img = $input.first().json.image_generated[0]\n\nconst res = {html_fulldata: {\n  language: img.language,\n  subject : img.subject,\n  html: img.body_html,\n  imgs: img.image_prompts.map((item,index)=>{\n    return{\n      image_placeholder: item.image_placeholder,\n      prompt: item.prompt,\n      url: img.image_generated[index].url\n    }\n  })\n}}\n\nreturn res"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2640,
        2064
      ],
      "id": "86ff5800-4575-4d5f-90f0-8a56090e02c4",
      "name": "Code in JavaScript2"
    },
    {
      "parameters": {
        "resource": "object",
        "operation": "create",
        "bucketName": "junction-changlu",
        "objectName": "={{ $json.fileName }}",
        "createData": {},
        "createQuery": {},
        "encryptionHeaders": {},
        "requestOptions": {}
      },
      "type": "n8n-nodes-base.googleCloudStorage",
      "typeVersion": 1,
      "position": [
        1520,
        2128
      ],
      "id": "95d77184-9444-4faf-a4e3-594b56329ca2",
      "name": "Create an object",
      "retryOnFail": true,
      "credentials": {
        "googleCloudStorageOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nconst updatedItems = items.map((item) => {\n  const timestamp = Date.now();\n  const randomNum = Math.floor(Math.random() * 1000);\n  const newFileName = `${timestamp}${randomNum}.png`;\n  item.json.fileName = newFileName;\n  return item;\n});\nreturn updatedItems;\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1296,
        2128
      ],
      "id": "e8ad87de-eaaa-4369-878d-a8e61da08a06",
      "name": "Code in JavaScript3"
    },
    {
      "parameters": {
        "jsCode": "// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nconst res = []\nfor (const item of $input.all()) {\n  res.push({\n    url: `https://storage.googleapis.com/junction-changlu/` + item.json.name\n  })\n}\n\nreturn res;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1744,
        2128
      ],
      "id": "37eed9f1-d52d-4b74-a3ae-435cd1bc07b6",
      "name": "Code in JavaScript4"
    },
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "marketing-generate-send",
        "options": {
          "allowedOrigins": "*"
        }
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        -960,
        2064
      ],
      "id": "49eb157a-4270-4019-90db-f254db50cda1",
      "name": "Webhook"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "e4372916-0ad5-4aae-9486-a01463b8ad45",
              "leftValue": "={{ $binary.file.id }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        -736,
        2064
      ],
      "id": "b98707a5-471f-4904-8a9a-e40c62635970",
      "name": "If"
    },
    {
      "parameters": {
        "resource": "document",
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.0-flash-lite",
          "mode": "list",
          "cachedResultName": "models/gemini-2.0-flash-lite"
        },
        "text": "You are a CRM & lifecycle marketing expert.\n\nYour task:\nGiven the full text of a marketing plan, extract a structured JSON summary that will be used to generate multi-market, multi-language email variants. \nThis version also captures all image-related requirements found or implied in the document.\n\nYour output must be a single valid JSON object and nothing else.\nNo explanations. No markdown. No comments. Only pure JSON.\n\n----------------------------\nINPUT DOCUMENT\n----------------------------\n{{PLAN_TEXT}}\n----------------------------\n\nExtract all information using this schema:\n\n{\n  \"campaign_name\": \"\",\n  \"campaign_type\": \"\",\n  \"brand_or_program\": \"\",\n  \"product_or_offer\": \"\",\n\n  \"overall_objective\": \"\",\n  \"target_audience_text\": \"\",\n\n  \"markets\": [],\n  \"languages\": [],\n\n  \"market_language_requirements\": [\n    {\n      \"market\": \"\",\n      \"languages\": [],\n      \"emphasis_points\": [],\n      \"regulatory_or_cultural_notes\": \"\",\n      \"image_requirements\": {             \n        \"needs_localized_images\": false,  \n        \"preferred_image_styles\": [],      \n        \"forbidden_elements\": [],         \n        \"mandatory_elements\": [],          \n        \"notes\": \"\"                        \n      },\n      \"notes\": \"\"\n    }\n  ],\n\n  \"key_messages\": [],\n\n  \"tone_of_voice\": [],\n  \"mentions_other_channels\": false,\n\n  \"email_requirements\": {\n    \"num_variants_desired\": null,\n    \"personalisation_needed\": \"\",\n    \"important_constraints\": \"\",\n    \"general_image_guidelines\": {                    \n      \"recommended_image_types\": [],                \n      \"tone_or_mood\": \"\",                           \n      \"mandatory_brand_elements\": [],               \n      \"image_copy_integration_notes\": \"\"            \n    }\n  },\n\n  \"email_blueprints\": [\n    {\n      \"id\": \"\",\n      \"market\": \"\",\n      \"language\": \"\",\n      \"audience_segment\": \"\",\n      \"purpose\": \"\",\n      \"tone_override\": \"\",\n      \"cta_goal\": \"\",\n      \"emphasis_points\": [],\n\n      \"image_blueprint\": {                         \n        \"image_needed\": false,\n        \"image_purpose\": \"\",                        \n        \"image_style\": \"\",                          \n        \"image_subject\": \"\",                        \n        \"recommended_elements\": [],                 \n        \"forbidden_elements\": [],                   \n        \"example_reference_from_plan\": \"\"           \n      },\n\n      \"special_instructions\": \"\"\n    }\n  ],\n\n  \"notes\": \"\",\n  \"missing_info\": []\n}\n\nRules:\n- If any field is not present in the input, set it to \"\" or null or [] depending on type.\n- \u201cemphasis_points\u201d appear both at market level and blueprint level.\n- For all image-related fields:\n  - Capture anything the document implies about images, visuals, creative directions, cultural differences, restrictions, etc.\n  - If the plan references specific example visuals, summarize them in \u201cexample_reference_from_plan\u201d.\n- \"markets\" and \"languages\" must be deduplicated.\n- Add human-readable questions to \"missing_info\" for anything needed to produce good email and image variants but missing from the plan.\n- Output ONLY a single valid JSON object with no additional text.",
        "inputType": "binary",
        "binaryPropertyName": "file",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        -448,
        1968
      ],
      "id": "fdefd3c4-17f7-4dbb-9a25-5e83db32bcfc",
      "name": "Analyze plan by file",
      "retryOnFail": true,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.0-flash-lite",
          "mode": "list",
          "cachedResultName": "models/gemini-2.0-flash-lite"
        },
        "messages": {
          "values": [
            {
              "content": "=You are a CRM & lifecycle marketing expert.\n\nYour task:\nGiven the full text of a marketing plan, extract a structured JSON summary that will be used to generate multi-market, multi-language email variants. \nThis version also captures all image-related requirements found or implied in the document.\n\nYour output must be a single valid JSON object and nothing else.\nNo explanations. No markdown. No comments. Only pure JSON.\n\n----------------------------\nINPUT DOCUMENT\n----------------------------\n{{PLAN_TEXT}}\n----------------------------\n\nExtract all information using this schema:\n\n{\n  \"campaign_name\": \"\",\n  \"campaign_type\": \"\",\n  \"brand_or_program\": \"\",\n  \"product_or_offer\": \"\",\n\n  \"overall_objective\": \"\",\n  \"target_audience_text\": \"\",\n\n  \"markets\": [],\n  \"languages\": [],\n\n  \"market_language_requirements\": [\n    {\n      \"market\": \"\",\n      \"languages\": [],\n      \"emphasis_points\": [],\n      \"regulatory_or_cultural_notes\": \"\",\n      \"image_requirements\": {             \n        \"needs_localized_images\": false,  \n        \"preferred_image_styles\": [],      \n        \"forbidden_elements\": [],         \n        \"mandatory_elements\": [],          \n        \"notes\": \"\"                        \n      },\n      \"notes\": \"\"\n    }\n  ],\n\n  \"key_messages\": [],\n\n  \"tone_of_voice\": [],\n  \"mentions_other_channels\": false,\n\n  \"email_requirements\": {\n    \"num_variants_desired\": null,\n    \"personalisation_needed\": \"\",\n    \"important_constraints\": \"\",\n    \"general_image_guidelines\": {                    \n      \"recommended_image_types\": [],                \n      \"tone_or_mood\": \"\",                           \n      \"mandatory_brand_elements\": [],               \n      \"image_copy_integration_notes\": \"\"            \n    }\n  },\n\n  \"email_blueprints\": [\n    {\n      \"id\": \"\",\n      \"market\": \"\",\n      \"language\": \"\",\n      \"audience_segment\": \"\",\n      \"purpose\": \"\",\n      \"tone_override\": \"\",\n      \"cta_goal\": \"\",\n      \"emphasis_points\": [],\n\n      \"image_blueprint\": {                         \n        \"image_needed\": false,\n        \"image_purpose\": \"\",                        \n        \"image_style\": \"\",                          \n        \"image_subject\": \"\",                        \n        \"recommended_elements\": [],                 \n        \"forbidden_elements\": [],                   \n        \"example_reference_from_plan\": \"\"           \n      },\n\n      \"special_instructions\": \"\"\n    }\n  ],\n\n  \"notes\": \"\",\n  \"missing_info\": []\n}\n\nRules:\n- If any field is not present in the input, set it to \"\" or null or [] depending on type.\n- \u201cemphasis_points\u201d appear both at market level and blueprint level.\n- For all image-related fields:\n  - Capture anything the document implies about images, visuals, creative directions, cultural differences, restrictions, etc.\n  - If the plan references specific example visuals, summarize them in \u201cexample_reference_from_plan\u201d.\n- \"markets\" and \"languages\" must be deduplicated.\n- Add human-readable questions to \"missing_info\" for anything needed to produce good email and image variants but missing from the plan.\n- Output ONLY a single valid JSON object with no additional text.",
              "role": "model"
            },
            {
              "content": "={{ $json.body.brief }}"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        -512,
        2160
      ],
      "id": "c4c79935-cc19-46dd-9d3b-d4749a327194",
      "name": "Analyze plan by text",
      "retryOnFail": true,
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all();\nlet nonZeroFile = null;\n\nconst updatedItems = items.map((item) => {\n  if (item?.binary?.fileSize === \"0\") {\n    if (nonZeroFile) {\n      item.binary = nonZeroFile;\n    }\n  } else {\n    nonZeroFile = item.binary;\n  }\n  return item;\n});\n\nreturn updatedItems;\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1072,
        2128
      ],
      "id": "f73e6117-198e-4b06-a7ab-74f6b26bca34",
      "name": "Code in JavaScript1"
    }
  ],
  "connections": {
    "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b26": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate an image2": {
      "main": [
        [
          {
            "node": "Code in JavaScript1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Code in JavaScript2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split Out1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out1": {
      "main": [
        [
          {
            "node": "Generate an image2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript2": {
      "main": [
        [
          {
            "node": "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b261",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b261": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript3": {
      "main": [
        [
          {
            "node": "Create an object",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create an object": {
      "main": [
        [
          {
            "node": "Code in JavaScript4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript4": {
      "main": [
        [
          {
            "node": "Aggregate2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Analyze plan by file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Analyze plan by text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze plan by file": {
      "main": [
        [
          {
            "node": "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b26",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze plan by text": {
      "main": [
        [
          {
            "node": "\u751f\u6210\u6a21\u677f+\u56fe\u7247\u5360\u4f4d\u7b26",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript1": {
      "main": [
        [
          {
            "node": "Code in JavaScript3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "03825e33-b900-486b-b237-b8e4ffee1095",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "9cg0vPyhhG2sL97I",
  "tags": []
}

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

Master. Uses gmail, googleGemini, googleCloudStorage. Webhook trigger; 19 nodes.

Source: https://github.com/xfcced/onetap_campaign/blob/e438345ffd16d1063bca754ae29f4600bb8df716/n8n_config.json — 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

This workflow is a complete outbound automation system that discovers local businesses, extracts contact emails, generates personalized cold emails using AI, and runs a multi-step follow-up sequence —

Stop And Error, Google Sheets, HTTP Request +2
AI & RAG

Eu Clara – Funil Kiwify Completo. Uses postgres, openAi, httpRequest, gmail. Webhook trigger; 70 nodes.

Postgres, OpenAI, HTTP Request +1
AI & RAG

User Signup & Verification: The workflow starts when a user signs up. It generates a verification code and sends it via SMS using Twilio. Code Validation: The user replies with the code. The workflow

Postgres, HTTP Request, OpenAI +2
AI & RAG

This workflow automates the entire lifecycle of collecting, filtering, summarizing, and delivering the most important daily news in technology, artificial intelligence, cybersecurity, and the digital

RSS Feed Read, Gmail, Google Gemini
AI & RAG

Instantly map all internal URLs, perform AI-powered (ChatGPT) analysis, and deliver results in HTML via webhook, Google Sheets, or email. All from your own n8n instance!

OpenAI, HTTP Request, XML +3