n8n 自动将产品图转为奢侈品广告风格背景
Google Drive 透明产品图 → AI 生成背景提示词 → Pixelcut API 合成专业背景 → 保存增强图回 Drive
- 给谁
- 电商运营、产品摄影师、营销团队,需要将批量产品图快速转为专业广告背景
- 你会得到
- 自动为透明背景产品图生成 AI 背景并保存,减少手动修图与影棚拍摄成本
- 你需要
- n8n · google-drive · ai-agent · http-request · openai
硬约束
前置条件:n8n 实例(云或自建)、Google Drive OAuth2 凭证、Pixelcut.ai API Key、产品图建议为 PNG 透明背景。可选:OpenAI/Claude/Groq 的 Vision API 用于自动生成背景提示词。费用:Pixelcut.ai 与 AI API 按各自平台计费,n8n 按实例方案计费。
他们做了什么
作者 ARRE 在 n8n 官方模板库发布了一个工作流模板:从 Google Drive 批量获取 PNG 产品图,经可选 AI Agent 生成背景提示词后,调用 Pixelcut.ai API 合成专业背景,最终将增强图保存回 Google Drive。模板包含完整的节点配置、sticky note 指引与 workflow JSON。
效果如何
模板在 n8n 平台显示 3,278 次查看(author_report)。作者声称可自动处理批量图片、减少手动修图时间,但未提供具体处理耗时或成功率数据。
值得知道
1)AI Prompt Generator 节点为可选,模板默认连接 OpenAI Chat Model(gpt-4.1-mini),但 sticky note 提示该节点局限性较大,建议改用 GPT-4 Vision/Claude Vision 或手动提示词。2)该工作流预期输入为无背景产品图;若图片已有背景,需在前置步骤中先调用 Pixelcut remove-background API 或其他去背景服务。3)Pixelcut 节点默认输出 PNG,可在 bodyParameters 中改为 jpg/webp。4)本站未实测该工作流,reproduction=not_tested;实际运行前请用单图测试并监控 API 费用。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- 将 __UKH_BEARER_4__ 替换为实际密钥/令牌(原路径 /nodes/4/parameters/headerParameters/parameters/0/value;literal auth header)。
需要替换的配置
- 源模板来自 n8n 公开库 #6151(约 11 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。 另将 1 处字面量密钥替换为 __UKH_…__ 占位符。
模板获取日期: 2026-10-24
步骤
配置凭证与文件夹
在 n8n 中设置 Google Drive OAuth2 凭证;创建 Pixelcut.ai 账号并获取 API Key;在 Google Drive 中准备源文件夹(存放 PNG 产品图)与输出文件夹。将模板中的 YOUR_GOOGLE_DRIVE_FOLDER_ID、YOUR_OUTPUT_FOLDER_ID、YOUR_PIXELCUT_API_KEY 替换为实际值。建议先用单张图测试。
搭建指导 · 来源原文。n8n 模板导入后的配置核对清单;粘贴到工作区备注或本地检查表
## 📋 Setup Checklist **Required Credentials**: □ Google Drive OAuth2 API □ Pixelcut.ai API Key □ Vision AI API (if using AI prompts) any AI Accepts images **Folder Configuration**: □ Replace YOUR_GOOGLE_DRIVE_FOLDER_ID □ Replace YOUR_OUTPUT_FOLDER_ID □ Ensure proper folder permissions **Security Notes**: □ Never share API keys publicly □ Use environment variables for sensitive data □ Regularly rotate API keys □ Monitor API usage and costs **Testing Steps**: 1. Test with single image first 2. Verify output quality 3. Check file naming convention 4. Confirm folder permissions 5. Monitor API rate limits
从 Google Drive 获取产品图
使用 Google Drive 节点搜索指定文件夹中的 PNG 文件。节点参数:resource=fileFolder,returnAll=true,queryString='.png'。若需支持多格式,可将 queryString 改为 "mimeType='image/png' or mimeType='image/jpeg'"(本站建议,需自行测试)。
搭建指导 · 来源原文。Google Drive 节点 queryString 与 Pixelcut 节点 format 参数的配置指引
## ⚠️ File Format Warning **Current Limitation**: This workflow only processes PNG files **To Support Other Formats**: 1. Go to "Get Images from Google Drive" node 2. Change queryString from : - ".jpg" for JPEG files - ".webp" for WebP files ➡️ to : ".png" **Output Format**: Change the "format" parameter in Pixelcut node: - "png" - Best quality, transparency support - "jpg" - Smaller file size - "webp" - Modern format, good compression **Multiple Formats**: Use OR operator: "mimeType='image/png' or mimeType='image/jpeg'"
下载图片为二进制数据
通过 Google Drive 下载节点(operation=download)将上一步获取的文件转为二进制数据,binaryPropertyName 设为 imageData,供后续 Pixelcut 节点使用。fileId 使用表达式 {{ $json.id }} 自动引用前序节点结果。
可选:AI 生成背景提示词
如需自动提示词,启用 AI Agent 节点并连接 Vision-capable 模型(如 OpenAI GPT-4 Vision、Claude Vision)。该节点为可选;也可跳过此步,直接在 Pixelcut 节点中写入固定提示词。
运行提示词 · 来源原文。AI Prompt Generator (Optional) 节点的 text 字段
Analyze this product image and create a professional background prompt for commercial photography. Focus on style, lighting, and environment that would complement this product.
搭建指导 · 来源原文。AI Agent Instructions sticky note;了解该节点的可选性与限制
## 🤖 AI Agent Notes (Optional) **Purpose**: Generates background prompts automatically **How to Use**: 1. This node is OPTIONAL - you can skip it entirely 2. If using, connect a vision-capable AI model 3. Alternative: Write your own prompt directly in the Pixelcut node **⚠️ Important Limitations**: - Use OpenAI GPT-4 Vision or Claude Vision instead - Or simply disable this node and use manual prompts **Better Options**: - OpenAI GPT-4 Vision Preview - Anthropic Claude Vision - Google Gemini Vision - Manual prompt creation
Pixelcut API 生成专业背景
使用 HTTP Request 节点调用 Pixelcut.ai API。配置:POST https://api.developer.pixelcut.ai/v1/generate-background,header 中填入 X-API-KEY,body 为 multipart/form-data,包含 image(formBinaryData,inputDataFieldName=imageData)、prompt、format。默认提示词为 "Professional studio background with soft lighting, clean surfaces, and elegant atmosphere";可替换为 AI 生成或自定义提示词。
搭建指导 · 来源原文。Pixelcut Configuration Guide sticky note;配置 API Key 与输出格式
## 🎨 Pixelcut.ai Configuration **Required Setup**: 1. Get API key from pixelcut.ai 2. Replace YOUR_PIXELCUT_API_KEY with your actual key 3. Customize the prompt field for your desired background **Supported Formats**: - PNG (recommended for products) - JPG (smaller file size) - WEBP (modern format)
保存增强图回 Google Drive
使用 Google Drive 节点将 Pixelcut 返回的增强图片上传到输出文件夹。文件名设为 enhanced-{{ $('Get Images from Google Drive').item.json.name }},folderId 替换为 YOUR_OUTPUT_FOLDER_ID。确认上传成功后可在 Drive 中查看带 enhanced- 前缀的文件。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限,再按步骤核对节点配置
这一段是提示词,页面不会在这里插入广告。
你正在复现 n8n 模板「Make every product photo look like a luxury ad」。请先确认:1)n8n 实例可用;2)已获取 Google Drive OAuth2、Pixelcut.ai API Key;3)源/输出文件夹 ID 已替换;4)若使用 AI 提示词,已配置 Vision-capable 模型凭证。导入 workflow.json 后,按步骤检查节点参数,尤其 YOUR_* 占位符。先用单张 PNG 测试,确认输出质量后再批量运行。
粘贴到搭建助手的启动对话,用于按清单检查凭证与节点参数
来源
Make every product photo look like a luxury ad fully automated AI + google drive · arre · n8n.io · 2025-07-18
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。