AutomationFlowsAI & RAG › 文生图(banana)

文生图(banana)

文生图(banana). Uses httpRequest, chatTrigger, readWriteFile, agent. Chat trigger; 12 nodes.

Chat trigger trigger★★★★☆ complexityAI-powered12 nodesHTTP RequestChat TriggerRead Write FileAgentLm Chat Deep SeekOutput Parser Structured
AI & RAG Trigger: Chat trigger Nodes: 12 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow follows the Agent → Chat Trigger 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
{
  "active": false,
  "connections": {
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent1": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent1",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  },
  "createdAt": "2025-09-04T05:20:23.719Z",
  "id": "w93FM0cGWtLm3iZz",
  "isArchived": false,
  "meta": null,
  "name": "\u6587\u751f\u56fe\uff08banana\uff09",
  "nodes": [
    {
      "parameters": {
        "method": "POST",
        "url": "https://openrouter.ai/api/v1/chat/completions",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "openRouterApi",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"google/gemini-2.5-flash-image-preview:free\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": [\n        {\n          \"type\": \"text\",\n          \"text\": \"{{ $json.output }}\"\n        }\n      ]\n    }\n  ]\n} ",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1344,
        16
      ],
      "id": "ee86722e-d31f-4c73-8810-0167576d5b97",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "operation": "toBinary",
        "sourceProperty": "base",
        "options": {
          "fileName": "={{ $json.name }}.png"
        }
      },
      "type": "n8n-nodes-base.convertToFile",
      "typeVersion": 1.1,
      "position": [
        1648,
        16
      ],
      "id": "822bdec7-2881-45a4-b2a3-d6673aa21468",
      "name": "Convert to File"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "1105fbcd-2732-427a-af96-8102d1d4ef91",
              "name": "base",
              "value": "={{ $json.choices[0].message.images[0].image_url.url.split(\",\")[1] }}",
              "type": "string"
            },
            {
              "id": "0a8c6ab4-a596-4eb5-a681-4a0a52c46863",
              "name": "mime",
              "value": "={{ $json.choices[0].message.images[0].image_url.url.match(/^data:([^;]+)/)[1] }}",
              "type": "string"
            },
            {
              "id": "39873dde-90e0-4868-91f3-cdc1762ec64f",
              "name": "data",
              "value": "={{ $json.choices[0].message.images[0].image_url.url}}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1488,
        16
      ],
      "id": "3579b635-9eb1-48be-b9c3-6e4180d4d988",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ],
      "id": "9ff1dc34-f2e3-482f-8a29-e2904e8f1130",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "operation": "write",
        "fileName": "=./n8ndata/{{ $('Loop Over Items').item.json.output }}.png",
        "options": {}
      },
      "type": "n8n-nodes-base.readWriteFile",
      "typeVersion": 1,
      "position": [
        1824,
        16
      ],
      "id": "0595bbe7-ddcb-4dc7-9026-f82b42f70641",
      "name": "Read/Write Files from Disk"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.output }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "# \u4efb\u52a1\n\u6211\u9700\u8981\u4f60\u4e3a\u6211\u751f\u6210\u5355\u8bcd\u95ea\u5361\uff0c\u5f53\u7528\u6237\u63d0\u4f9b\u5355\u8bcd\u65f6\u9700\u8981\u4f60\u6839\u636e\u5355\u8bcd\u8f93\u51fa\u5bf9\u5e94\u7684\u56fe\u50cf\u63cf\u7ed8\u63d0\u793a\u8bcd\n\n## \u8f93\u51fa\u8981\u6c42\n\u98ce\u683c\u4e3a\u5361\u901a\u98ce\u683c\uff0c\u4e0a\u534a\u90e8\u5206\u4e3a\u8be5\u5355\u8bcd\u7684\u63cf\u8ff0\uff0c\u4e0b\u534a\u90e8\u5206\u7684\u80cc\u666f\u9ed8\u8ba4\u9009\u62e9\u7eaf\u767d\u8272\uff0c\u4e0b\u534a\u90e8\u5206\u8fd8\u6709\u6587\u5b57\u5185\u5bb9\u5355\u8bcd\u548c\u4e00\u53e5\u82f1\u8bed\u77ed\u8bed\u3002\n\n## \u8f93\u51fa\u793a\u4f8b\n\u98ce\u683c:\u5361\u901a\u98ce\u683c\uff0c\u4e0a\u534a\u90e8\u5206:\u5361\u901a\u5c0f\u8239\u5728\u84dd\u8272\u6e56\u9762\u4e0a\u5212\u884c\uff0c\u8239\u4e0a\u6709\u7b11\u8138\u5212\u6868\u7684\u5c0f\u5154\u5b50\uff0c\u4e0b\u534a\u90e8\u5206:\u80cc\u666f:\u7eaf\u767d\u8272\uff0c\u6587\u5b57:boat We row a boat on the lake.\n\n## \u9650\u5236\n- \u6309\u7167\u7528\u6237\u7684\u8f93\u5165\u6839\u636e\u8981\u6c42\u548c\u793a\u4f8b\u8fdb\u884c\u8f93\u51fa\uff0c\u4e0d\u5f97\u8f93\u51fa\u5176\u4ed6\u65e0\u5173\u7684\u5185\u5bb9\n\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.1,
      "position": [
        1008,
        16
      ],
      "id": "b32a3e92-2141-4c01-95e2-b45c0e403ea2",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        1008,
        224
      ],
      "id": "28d955f1-7c56-4827-928b-956d5295c720",
      "name": "DeepSeek Chat Model"
    },
    {
      "parameters": {
        "fieldToSplitOut": "output, o",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        560,
        0
      ],
      "id": "b9c25842-286f-4d08-b372-d178bd262c64",
      "name": "Split Out"
    },
    {
      "parameters": {
        "batchSize": 3,
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        768,
        0
      ],
      "id": "a84b7083-61c9-4c13-8f7d-761757d40932",
      "name": "Loop Over Items"
    },
    {
      "parameters": {
        "hasOutputParser": true,
        "options": {
          "systemMessage": "\u6839\u636e\u7528\u6237\u63d0\u4f9b\u7684\u4e3b\u9898\u8f93\u51fa\u8981\u6c42\u6570\u91cf\u7684\u82f1\u8bed\u5355\u8bcd"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2.1,
      "position": [
        192,
        0
      ],
      "id": "e459a95b-d68b-43ac-9d20-80cd4c5231b4",
      "name": "AI Agent1"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "typeVersion": 1,
      "position": [
        192,
        208
      ],
      "id": "09fe948b-5b2c-423e-9541-0ffbd02b8c01",
      "name": "DeepSeek Chat Model1"
    },
    {
      "parameters": {
        "jsonSchemaExample": "[\n  \"Apple\",\n  \"Banana\",\n  \"Orange\"\n]"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        384,
        208
      ],
      "id": "077a0069-e35d-4bca-a458-60dd15f9fee1",
      "name": "Structured Output Parser"
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "shared": [
    {
      "createdAt": "2025-09-04T05:20:23.726Z",
      "updatedAt": "2025-09-04T05:20:23.726Z",
      "role": "workflow:owner",
      "workflowId": "w93FM0cGWtLm3iZz",
      "projectId": "VqrcM1dcqhGnCvdT"
    }
  ],
  "staticData": null,
  "tags": [],
  "triggerCount": 0,
  "updatedAt": "2025-09-04T05:20:30.000Z",
  "versionId": "69c12404-9492-4eb2-865c-f07b1595aa5d"
}
Pro

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

About this workflow

文生图(banana). Uses httpRequest, chatTrigger, readWriteFile, agent. Chat trigger; 12 nodes.

Source: https://github.com/Monkey007YuFa/n8n_backup/blob/ac352dc0365e1aa446824ce892741f19dbd8edb8/workflowsw93FM0cGWtLm3iZz.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

Who’s it for Creators who want to create faceless videos automatically, while keeping human oversight and quality control.

Read Write File, Agent, OpenAI Chat +7
AI & RAG

💰 Beginner Investor – Learn the market faster with AI-powered insights guiding your decisions. 📈 Retail Trader – Optimize your trading strategy with in-depth analysis typically reserved for profession

HTTP Request, Output Parser Structured, OpenAI Chat +4
AI & RAG

This comprehensive workflow automates the complete financial document processing pipeline using AI. Upload invoices via chat, drop expense receipts into a folder, or add bank statements - the system a

Chat Trigger, HTTP Request, Google Sheets +8
AI & RAG

This template attempts to create an AI-powered content assistant for WordPress sites using Mistral AI, enabling article recommendations, content summarization, and contextual Q&A capabilities.

Chat Trigger, Output Parser Structured, Agent +10
AI & RAG

by Varritech Technologies

Chat Trigger, Agent, OpenAI Chat +8