Nano Banana AI图像编辑器(Telegram版)
中级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 9 个节点。主要使用 Set, Code, Telegram, HttpRequest, ConvertToFile 等节点。 通过Telegram使用的Nano Banana AI图像编辑器
前置要求
- •Telegram Bot Token
- •可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "61a48c7f-29f0-4cfe-9faf-6b8f78a79734",
"name": "照片消息接收器",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-96,
2048
],
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "675d0f05-d9f6-446d-9fd1-8ad5965d1b28",
"name": "下载 Telegram 照片",
"type": "n8n-nodes-base.telegram",
"position": [
112,
2048
],
"parameters": {
"fileId": "={{ $('Photo Message Receiver').item.json.message.photo[0].file_id }}",
"resource": "file",
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "c08670f8-81f0-41b9-ac7c-bc30847e5fba",
"name": "将照片转换为 Base64",
"type": "n8n-nodes-base.extractFromFile",
"position": [
304,
2048
],
"parameters": {
"options": {},
"operation": "binaryToPropery"
},
"typeVersion": 1
},
{
"id": "0880f91f-0499-4ee5-a813-398156eeb3b4",
"name": "格式化图像数据 URL",
"type": "n8n-nodes-base.code",
"position": [
512,
2048
],
"parameters": {
"jsCode": "const items = $input.all();\nconst updatedItems = items.map((item) => {\n const base64Url = item?.json?.data;\n const url = `data:image/png;base64,${base64Url}`;\n return { url };\n});\nreturn updatedItems;\n"
},
"typeVersion": 2
},
{
"id": "cb1a2a0c-38d4-47e3-9463-46a1be61f28a",
"name": "解析 AI 响应数据",
"type": "n8n-nodes-base.set",
"position": [
912,
2048
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "3782b286-b6fd-4943-8530-ff922944b803",
"name": "base",
"type": "string",
"value": "={{ $json.choices[0].message.images[0].image_url.url.split(',')[1] }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "398dc9e7-4ff4-4fe8-bcad-aec622a9b63b",
"name": "Base64 转二进制文件",
"type": "n8n-nodes-base.convertToFile",
"position": [
1136,
2048
],
"parameters": {
"options": {},
"operation": "toBinary",
"sourceProperty": "base"
},
"typeVersion": 1.1
},
{
"id": "c9cbd76a-0f2b-4d9f-aed7-0b5a0454f1fc",
"name": "发送处理后的照片",
"type": "n8n-nodes-base.telegram",
"position": [
1360,
2048
],
"parameters": {
"chatId": "YOUR_CHAT_ID_HERE",
"operation": "sendPhoto",
"binaryData": true,
"additionalFields": {}
},
"typeVersion": 1.2
},
{
"id": "408c2c7c-3e0a-4a56-baae-d1334fffbb49",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-608,
1648
],
"parameters": {
"width": 2240,
"height": 928,
"content": "# 🤖 Nano Banana AI 图像编辑器"
},
"typeVersion": 1
},
{
"id": "a04f072e-da6b-4d02-8369-556cfa728aab",
"name": "Nano Banana 图像处理器",
"type": "n8n-nodes-base.httpRequest",
"position": [
704,
2048
],
"parameters": {
"url": "https://openrouter.ai/api/v1/chat/completions",
"method": "POST",
"options": {},
"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\": \"{{ $('Photo Message Receiver').item.json.message.caption }}\"\n },\n {\n \"type\": \"image_url\",\n \"image_url\": {\n \"url\": \"{{ $json.url }}\"\n }\n }\n ]\n }\n ]\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer $OPENROUTER_API_KEY"
}
]
},
"nodeCredentialType": "openRouterApi"
},
"typeVersion": 4.2
}
],
"pinData": {},
"connections": {
"Base64 to Binary File": {
"main": [
[
{
"node": "Send Processed Photo",
"type": "main",
"index": 0
}
]
]
},
"Format Image Data URL": {
"main": [
[
{
"node": "Nano Banana Image Processor",
"type": "main",
"index": 0
}
]
]
},
"Parse AI Response Data": {
"main": [
[
{
"node": "Base64 to Binary File",
"type": "main",
"index": 0
}
]
]
},
"Photo Message Receiver": {
"main": [
[
{
"node": "Download Telegram Photo",
"type": "main",
"index": 0
}
]
]
},
"Convert Photo to Base64": {
"main": [
[
{
"node": "Format Image Data URL",
"type": "main",
"index": 0
}
]
]
},
"Download Telegram Photo": {
"main": [
[
{
"node": "Convert Photo to Base64",
"type": "main",
"index": 0
}
]
]
},
"Nano Banana Image Processor": {
"main": [
[
{
"node": "Parse AI Response Data",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
通过Telegram使用Nano Banana和Veo 3.1的产品视频创建器
通过Telegram使用Nano Banana和Veo 3.1的产品视频创建器
If
Code
Wait
+8
16 节点Roshan Ramani
内容创作
自动发布到 WooCommerce_模板
自动将Telegram频道帖子转换为WooCommerce产品
If
Set
Code
+9
26 节点Shohani
内容创作
家居装饰AI(Google Nano Banana)- Santhej Kallada
基于Google Gemini的AI图像生成与编辑及Telegram机器人
If
Set
Code
+9
28 节点Santhej Kallada
内容创作
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
1. 播放列表详情设置机器人副本
使用 Suno、GPT-4、Runway 和 Creatomate 创建 AI 生成的 YouTube 音乐播放列表
If
Set
Code
+22
203 节点Joseph
内容创作
使用 GPT-4o、ElevenLabs 和 WaveSpeed 口型同步创建真实 UGC 视频广告
使用 GPT-4o、ElevenLabs 和 WaveSpeed 口型同步创建真实 UGC 视频广告
If
Set
Wait
+12
38 节点Muhammad Farooq Iqbal
内容创作
工作流信息
难度等级
中级
节点数量9
分类2
节点类型8
作者
Roshan Ramani
@rawsun007I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!
外部链接
在 n8n.io 查看 →
分享此工作流