8
n8n 中文网amn8n.com

用于处理Telegram媒体组的数据表

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 35 个节点。主要使用 If, Set, Sort, Merge, Filter 等节点。 使用数据表缓存和NanoBanana AI处理Telegram图片相册

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "E2w7cqdpabvRwPoD",
  "meta": {
    "instanceId": "fb924c73af8f703905bc09c9ee8076f48c17b596ed05b18c0ff86915ef8a7c4a",
    "templateCredsSetupCompleted": true
  },
  "name": "用于处理 Telegram 媒体组的数据表",
  "tags": [],
  "nodes": [
    {
      "id": "26aabebc-cec7-4849-a55f-062e1d146040",
      "name": "Telegram触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -656,
        -112
      ],
      "webhookId": "4302df1d-7127-4554-bc5d-5e4dd6b47b66",
      "parameters": {
        "updates": [
          "*"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "3wRzveKu9ZdwUHIT",
          "name": "TG @testooooobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4038e194-780e-419b-9461-718e166cea2d",
      "name": "插入/更新行",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -64,
        -128
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "new",
            "chat_id": "={{ $json.message.chat.id }}",
            "message": "={{ $json.message.toJsonString() }}",
            "message_id": "={{ $json.message.message_id }}",
            "media_group": "={{ $json.message.media_group_id }}"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "message_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "message_id",
              "defaultMatch": false
            },
            {
              "id": "media_group",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "media_group",
              "defaultMatch": false
            },
            {
              "id": "message",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "message",
              "defaultMatch": false
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyName": "chat_id",
              "keyValue": "={{ $json.message.chat.id }}"
            },
            {
              "keyName": "message_id",
              "keyValue": "={{ $json.message.message_id }}"
            }
          ]
        },
        "matchType": "allConditions",
        "operation": "upsert",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "MbWzAb6WjNiw6KFK",
          "cachedResultUrl": "/projects/dI4ucORffuUU6JJc/datatables/MbWzAb6WjNiw6KFK",
          "cachedResultName": "TG_mediagroup"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "23ee86ea-56a8-4966-bb05-88e72dc1f7c6",
      "name": "定时触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -656,
        304
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds",
              "secondsInterval": 5
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1a05fa32-86c9-43cd-8e1c-787bd4b8d190",
      "name": "当点击“执行工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -656,
        480
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "fe0964b1-0e5c-4092-88fc-a139705fe438",
      "name": "过滤器",
      "type": "n8n-nodes-base.filter",
      "position": [
        144,
        656
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0d12392e-fb41-40ac-a595-6a414399839a",
              "operator": {
                "type": "dateTime",
                "operation": "before"
              },
              "leftValue": "={{ $json.max_createdAt }}",
              "rightValue": "={{ $now.minus(7,'seconds') }}"
            }
          ]
        }
      },
      "executeOnce": false,
      "typeVersion": 2.2
    },
    {
      "id": "9b3434cc-bbe8-4d3f-8b47-587a2dc53d6a",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        272,
        528
      ],
      "parameters": {
        "mode": "combine",
        "options": {
          "multipleMatches": "all"
        },
        "fieldsToMatchString": "media_group"
      },
      "typeVersion": 3.2
    },
    {
      "id": "f9e92f4d-7fb9-4134-b124-c2ecf59a42f5",
      "name": "获取文件",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1056,
        528
      ],
      "webhookId": "d746411c-e3f5-4353-8e78-940944de5767",
      "parameters": {
        "fileId": "={{ $json.message.photo[$json.message.photo.length-1].file_id }}",
        "download": false,
        "resource": "file"
      },
      "credentials": {
        "telegramApi": {
          "id": "3wRzveKu9ZdwUHIT",
          "name": "TG @testooooobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cb7ea8cd-35d8-4d41-86d3-2cdc84228989",
      "name": "是否为包含图片的媒体组?",
      "type": "n8n-nodes-base.if",
      "position": [
        -416,
        -112
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "846cfde9-3bbc-4f11-818a-19a07285fa7a",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json?.message?.media_group_id || \"\"}}",
              "rightValue": ""
            },
            {
              "id": "3faea66a-470f-47fd-9bc1-37ff95cb436a",
              "operator": {
                "type": "array",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.message.photo }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "64436107-f59c-453d-830f-61716095bb7c",
      "name": "遍历项目1",
      "type": "n8n-nodes-base.summarize",
      "position": [
        1536,
        528
      ],
      "parameters": {
        "options": {
          "skipEmptySplitFields": true
        },
        "fieldsToSplitBy": "chat_id, media_group",
        "fieldsToSummarize": {
          "values": [
            {
              "field": "img",
              "aggregation": "append"
            },
            {
              "field": "text",
              "aggregation": "append"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "1318a1ef-8400-4d0e-9257-b95293d994a7",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2144,
        672
      ],
      "parameters": {
        "options": {},
        "operation": "toBinary",
        "sourceProperty": "image_url"
      },
      "typeVersion": 1.1
    },
    {
      "id": "ed7d983c-6a72-4938-9175-800fab2d3ea4",
      "name": "合并1",
      "type": "n8n-nodes-base.merge",
      "position": [
        2304,
        416
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "8e3c9750-d8b9-472a-90ca-4d015e2dffab",
      "name": "合并2",
      "type": "n8n-nodes-base.merge",
      "position": [
        2704,
        320
      ],
      "parameters": {
        "mode": "chooseBranch"
      },
      "typeVersion": 3.2
    },
    {
      "id": "df18f925-bfc2-4653-9c6b-5aaf73b4994b",
      "name": "无操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -192,
        512
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1e390fc5-3996-40c0-988f-57c6d50734f4",
      "name": "媒体组中的最新消息",
      "type": "n8n-nodes-base.summarize",
      "position": [
        0,
        656
      ],
      "parameters": {
        "options": {},
        "fieldsToSplitBy": "media_group",
        "fieldsToSummarize": {
          "values": [
            {
              "field": "createdAt",
              "aggregation": "max"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "daacc6e1-1a06-427e-a70b-60b094b83230",
      "name": "排序",
      "type": "n8n-nodes-base.sort",
      "position": [
        656,
        528
      ],
      "parameters": {
        "options": {},
        "sortFieldsUi": {
          "sortField": [
            {
              "fieldName": "media_group"
            },
            {
              "fieldName": "createdAt"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b2e147bb-ecf2-464f-85fd-619a80122508",
      "name": "通过 OpenRouter 调用 NanoBanana",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1744,
        672
      ],
      "parameters": {
        "url": "https://openrouter.ai/api/v1/chat/completions",
        "method": "POST",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 300
            }
          }
        },
        "jsonBody": "={\n  \"model\": \"google/gemini-2.5-flash-image-preview\",\n  \"messages\": {{\n  [{\n    \"role\": \"user\",\n    \"content\": \n$json.appended_text.concat($json.appended_img)\n    \n  }].toJsonString()\n}},\n    \"modalities\": [\"image\", \"text\"]\n}\n",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "nodeCredentialType": "openRouterApi"
      },
      "credentials": {
        "openRouterApi": {
          "id": "Gi3w8UiM4lJ8sQpf",
          "name": "OpenRouter account 2"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dd75b31e-7246-4b39-9f88-b1f45859868c",
      "name": "提取 Base64",
      "type": "n8n-nodes-base.set",
      "position": [
        1952,
        672
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "1afd605f-bccf-4f53-aa29-45c9902c1cff",
              "name": "image_url",
              "type": "string",
              "value": "={{ $json.choices[0].message.images[0].image_url.url.split(',')[1] }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "85936461-66d3-45af-a27f-5a805a15097b",
      "name": "发送处理中消息",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1744,
        400
      ],
      "webhookId": "d746411c-e3f5-4353-8e78-940944de5767",
      "parameters": {
        "text": "Processing your request, please wait...",
        "chatId": "={{ $json.chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "3wRzveKu9ZdwUHIT",
          "name": "TG @testooooobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7e741bb2-25ab-42f5-8fde-047f4258ca1f",
      "name": "发送结果消息",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2512,
        416
      ],
      "webhookId": "6fa182d4-d7f9-425f-8864-ed9b999684d2",
      "parameters": {
        "chatId": "={{ $json.result.chat.id }}",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {
          "reply_to_message_id": "={{ $json.result.message_id }}"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "3wRzveKu9ZdwUHIT",
          "name": "TG @testooooobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "bdfa830b-593f-4e8e-a70e-cea310431b08",
      "name": "状态:处理中",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        480,
        528
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "processing"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "message_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "message_id",
              "defaultMatch": false
            },
            {
              "id": "media_group",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "media_group",
              "defaultMatch": false
            },
            {
              "id": "message",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "message",
              "defaultMatch": false
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyValue": "={{ $json.id }}"
            }
          ]
        },
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "MbWzAb6WjNiw6KFK",
          "cachedResultUrl": "/projects/dI4ucORffuUU6JJc/datatables/MbWzAb6WjNiw6KFK",
          "cachedResultName": "TG_mediagroup"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b679d7f2-6f88-4477-b164-73317600454a",
      "name": "状态:完成",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2896,
        320
      ],
      "parameters": {
        "columns": {
          "value": {
            "status": "done"
          },
          "schema": [
            {
              "id": "chat_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "chat_id",
              "defaultMatch": false
            },
            {
              "id": "message_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "message_id",
              "defaultMatch": false
            },
            {
              "id": "media_group",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "media_group",
              "defaultMatch": false
            },
            {
              "id": "message",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "message",
              "defaultMatch": false
            },
            {
              "id": "status",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "status",
              "defaultMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "filters": {
          "conditions": [
            {
              "keyValue": "={{ $json.id }}"
            }
          ]
        },
        "operation": "update",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "MbWzAb6WjNiw6KFK",
          "cachedResultUrl": "/projects/dI4ucORffuUU6JJc/datatables/MbWzAb6WjNiw6KFK",
          "cachedResultName": "TG_mediagroup"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "53114c9f-89ad-4d7b-885f-0478d783f5fe",
      "name": "获取新请求",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -192,
        304
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "status",
              "keyValue": "new"
            }
          ]
        },
        "operation": "get",
        "returnAll": true,
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "MbWzAb6WjNiw6KFK",
          "cachedResultUrl": "/projects/dI4ucORffuUU6JJc/datatables/MbWzAb6WjNiw6KFK",
          "cachedResultName": "TG_mediagroup"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "abacd752-a665-4fba-94cc-1807a2bfcb2c",
      "name": "准备用户消息",
      "type": "n8n-nodes-base.set",
      "position": [
        1328,
        528
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3d3c38a5-9dbf-47cb-a87a-d10556ddc408",
              "name": "text",
              "type": "object",
              "value": "={{ $('parse TG messages')?.item?.json?.message?.caption ? {\"type\": \"text\", \"text\": $('parse TG messages')?.item?.json?.message?.caption} : null }}"
            },
            {
              "id": "2cf84a2e-beb0-4fda-a1c0-fa23fd00e040",
              "name": "img",
              "type": "object",
              "value": "={\"type\":\"image_url\",\"image_url\":{\"url\":{{ `https://api.telegram.org/file/bot<TOKEN>/${$json.result.file_path}`.toJsonString() }} } }"
            },
            {
              "id": "452270fc-d92b-4838-bd55-989ecba84991",
              "name": "media_group",
              "type": "string",
              "value": "={{ $('parse TG messages').item.json.media_group }}"
            },
            {
              "id": "8aa85a48-c572-4e08-b757-d91197566423",
              "name": "chat_id",
              "type": "string",
              "value": "={{ $('parse TG messages').item.json.message.chat.id }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "7cf601c0-357d-4e0b-adf7-ef62f3029819",
      "name": "解析 Telegram 消息",
      "type": "n8n-nodes-base.set",
      "position": [
        832,
        528
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d1b933fb-b6ba-4c59-9437-5168c67f8d1b",
              "name": "message",
              "type": "object",
              "value": "={{ JSON.parse($json.message) }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "2e167ce8-4bf7-4d57-904e-1c8b697ed574",
      "name": "如果有新记录",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        -416,
        304
      ],
      "parameters": {
        "filters": {
          "conditions": [
            {
              "keyName": "status",
              "keyValue": "new"
            }
          ]
        },
        "operation": "rowExists",
        "dataTableId": {
          "__rl": true,
          "mode": "list",
          "value": "MbWzAb6WjNiw6KFK",
          "cachedResultUrl": "/projects/dI4ucORffuUU6JJc/datatables/MbWzAb6WjNiw6KFK",
          "cachedResultName": "TG_mediagroup"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ee73fca8-a430-4074-be65-0adf5e23541e",
      "name": "发送初始通知",
      "type": "n8n-nodes-base.telegram",
      "position": [
        96,
        -256
      ],
      "webhookId": "d746411c-e3f5-4353-8e78-940944de5767",
      "parameters": {
        "text": "Received your message, processing will begin shortly",
        "chatId": "={{ $json.message.chat.id }}",
        "additionalFields": {
          "appendAttribution": false,
          "reply_to_message_id": "={{ $json.message.message_id }}"
        }
      },
      "credentials": {
        "telegramApi": {
          "id": "3wRzveKu9ZdwUHIT",
          "name": "TG @testooooobot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "61b4408e-5f34-450e-87f9-caa3b4cf361f",
      "name": "过滤器1",
      "type": "n8n-nodes-base.filter",
      "position": [
        -192,
        -256
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "d730a632-ba84-4047-aa67-ca62299485e9",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ ($json?.message?.caption || \"\") }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "073ac5b7-ce9a-4ff3-ae41-fb14babec629",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -368
      ],
      "parameters": {
        "width": 432,
        "height": 256,
        "content": "## 回复带标题的消息"
      },
      "typeVersion": 1
    },
    {
      "id": "8450e163-1905-4bda-97db-c5334407edbb",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        400
      ],
      "parameters": {
        "width": 432,
        "height": 416,
        "content": "## 检查最新媒体组消息是否有足够延迟"
      },
      "typeVersion": 1
    },
    {
      "id": "e66cca00-5bb7-4710-a325-58f36d550c23",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        400
      ],
      "parameters": {
        "width": 464,
        "height": 304,
        "content": "## 直接从 Telegram 获取文件 URL 时,更新下载链接"
      },
      "typeVersion": 1
    },
    {
      "id": "128c8e62-7354-4f39-8964-df5ecd30e3c8",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1712,
        560
      ],
      "parameters": {
        "width": 560,
        "height": 240,
        "content": "## 通过 OpenRouter 向 NanoBanana 发送包含标题文本和所有图片的数组"
      },
      "typeVersion": 1
    },
    {
      "id": "2027d6af-862a-47c9-a878-d4dedd41e0b8",
      "name": "照常处理其他消息",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -192,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bb6d7a55-6b2f-4fff-9b64-37ea18fccc0d",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        208
      ],
      "parameters": {
        "width": 352,
        "height": 224,
        "content": "## 调整检查数据表中新记录的计时器"
      },
      "typeVersion": 1
    },
    {
      "id": "8f70cd56-bc97-4110-a8a6-f4eff030217b",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        -304
      ],
      "parameters": {
        "width": 528,
        "height": 440,
        "content": "# 先决条件"
      },
      "typeVersion": 1
    },
    {
      "id": "90d0915c-5b80-4408-af66-341f60695114",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -368
      ],
      "parameters": {
        "width": 464,
        "height": 696,
        "content": "## [通过 LinkedIn 联系](https://www.linkedin.com/in/parsadanyan/)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "executionOrder": "v1",
    "saveDataSuccessExecution": "all"
  },
  "versionId": "516b8782-4200-4b24-84c3-e4addd1e6851",
  "connections": {
    "NOOP": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          },
          {
            "node": "Latest message in media_group",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sort": {
      "main": [
        [
          {
            "node": "parse TG messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "status:processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Send result message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge2": {
      "main": [
        [
          {
            "node": "status:done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter1": {
      "main": [
        [
          {
            "node": "Send initial notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize": {
      "main": [
        [
          {
            "node": "Send processing message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Call NanoBanana via OpenRouter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file": {
      "main": [
        [
          {
            "node": "prepare user messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upsert row(s)": {
      "main": [
        []
      ]
    },
    "Extract Base64": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get new requests": {
      "main": [
        [
          {
            "node": "NOOP",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "If any new records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Is media group with images?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "parse TG messages": {
      "main": [
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "status:processing": {
      "main": [
        [
          {
            "node": "Sort",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If any new records": {
      "main": [
        [
          {
            "node": "Get new requests",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send result message": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "prepare user messages": {
      "main": [
        [
          {
            "node": "Summarize",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send processing message": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is media group with images?": {
      "main": [
        [
          {
            "node": "Upsert row(s)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Filter1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Process other messages as usual",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Latest message in media_group": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Call NanoBanana via OpenRouter": {
      "main": [
        [
          {
            "node": "Extract Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "If any new records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 内容创作, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量35
分类2
节点类型15
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流