Claude创意写作AI 评分 · 74/100AI 辅助编辑·未发现明显提示词注入风险n8n.io

Lightroom 云相册自动发布 Instagram(AI 生成配文)

从 n8n Data Table 队列取图 → Claude 生成 SEO 配文 → Instagram Graph API 发布 → 回写发布状态

经验丰富步骤流程提示词
给谁
拥有 Lightroom 云相册、Instagram 商业/创作者账号,并运行 n8n 实例的摄影师或内容运营者
你会得到
按设定时间表自动挑选未发布照片,由 AI 生成三行式 Instagram 配文(含器材参数与标签),通过 Graph API 发布并标记已发布状态
你需要
n8n · data-table

硬约束

前置条件:n8n 实例(需公网可访问域名)、Instagram Business/Creator 账号并绑定 Facebook 主页、Instagram Graph API v23.0 长期访问令牌(long-lived token)、Anthropic API 凭证。需先运行配套工作流:Workflow 1(Lightroom Cloud → Photos Queue,生成 AI 替代文本)和 Workflow 2(Lightroom Image Webhook,提供公开 JPEG 直链)。Data Table 需包含列:lr_asset_id, alt, lr_asset, ig_posted_at, ig_id, ig_caption。

他们做了什么

作者 camilleroux 在 n8n 官方模板库发布了该工作流,通过 Data Table 管理 Lightroom 照片队列,利用 Claude 模型将 AI 生成的替代文本与 EXIF 元数据转为 Instagram 配文,再经 Graph API 自动发布并回写状态。

效果如何

模板描述称可实现免手动 Lightroom 到 Instagram 的定时发布,配文风格拟人且针对搜索优化(作者自述,未实测)。

值得知道

本模板依赖两个配套工作流:Workflow 1(Lightroom Cloud → Photos Queue,AI 生成替代文本)和 Workflow 2(Lightroom Image Webhook,提供公开 JPEG 直链)。Instagram 账号必须是 Business 或 Creator 类型并绑定 Facebook 主页。Graph API 使用 v23.0,需长期访问令牌。n8n 实例需有公网可访问域名供图片 webhook 调用。AI 配文节点提示词要求严格基于 ALT/EXIF,禁止推断不存在的信息。

n8n 工作流模板

结构已检查 · 未实际运行

下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。

配置与测试清单

需要绑定的凭证

  • Message a model 节点:绑定Anthropic API 凭证。
  • Publish image 节点:绑定HTTP Bearer Auth 凭证。
  • Create container 节点:绑定HTTP Bearer Auth 凭证。
  • Get instagram id 节点:绑定HTTP Bearer Auth 凭证。
  • get access_token 节点:绑定HTTP Bearer Auth 凭证。

需要替换的配置

  • 源模板来自 n8n 公开库 #9694(约 17 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
  • Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。

测试输入与预期结果

  • 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
  • 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。

模板处理说明

  • 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
  • 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。

模板获取日期: 2026-10-24

步骤

  1. 选取待发布图片

    Schedule Trigger 按设定时间触发 → Get row(s) 从 Photos 数据表筛选 ig_posted_at 为空的记录(未发布)→ Sort 按 createdAt 排序 → Limit 限制本轮最大发布数量。

  2. AI 生成 Instagram 配文

    Message a model(Anthropic Claude)节点接收 Limit 输出的 alt 文本与 lr_asset 中的 EXIF 元数据,按系统提示词生成三行配文。

    运行提示词 · 来源原文。Message a model(Anthropic 节点)的 messages.values[0].content 字段

    =**ROLE**  
    You write an Instagram caption from ALT text and EXIF metadata. Optimize for search and engagement **without inventing** anything.
    
    **INPUTS**  
    - `ALT`: {{ $('Limit').item.json.alt }}  
    - `EXIF (JSON or text)`: {{ JSON.stringify(JSON.parse($json.lr_asset).payload) }}
    
    **GOAL**  
    Produce **exactly 3 lines** under **220 total characters** (line breaks included):  
    1) **Action phrase (-ing) + brief outcome**; include **1–2 intent terms** from ALT if present (e.g., “portrait”, “long exposure”). **Max 12 words.**  
    2) **Gear & settings** on one line with an en dash:  
       `<CameraModel> + <Lens> — <Shutter> · f/<Aperture> · ISO <ISO> · WB <KelvinIfKnown>`  
       - Use EXIF fields **only if present**: make/cameraModel, lensModel, focalLength and FocalLengthIn35mmFilm, fNumber, exposureTime, iso, whiteBalance (Kelvin or “Auto”).  
       - If focal length exists but not in lens name, **prefix it** (e.g., `35/1.8`). Display FocalLengthIn35mmFilm too (format: "(28 mm eq. 35 mm)")
       - Format shutter `1/250s`; aperture `f/1.8`.  
       - Missing field? **Omit** it. **No inference.**
    3) **5–10 hashtags** (lowercase, **deduped**) using layered strategy:  
       - **Broad:** always `#photography` + **one** brand/lens tag if present (e.g., `#fujifilm #fujifilmxseries
     #fujilove`, `#xe5`).  
       - **Mid-tail:** 1–3 subject/genre from ALT (e.g., `#portrait`, `#streetphotography`).  
       - **Niche:** 1–2 specific technique/gear terms from ALT/EXIF.  
       - **Location:** add 1–2 only if GPS/city exists in EXIF (e.g., `#paris`, `#montmartre`).
       - **Mentions:** if the EXIF description/caption/title/userComment contains Instagram-style mentions (e.g., `@name`), **append them verbatim at the end of line 3 after the hashtags**. Deduplicate; do not invent; preserve exact handles. If the 220-character limit is exceeded, **remove niche hashtags first**, then mid-tail if needed, but keep mentions.
    
    
    **STYLE & SEO RULES**  
    - English only. Human, concise, non-salesy.  
    - No emojis unless clearly in ALT. No quotes. **No trailing spaces.**  
    - **Zero inference:** do not assert people/brands/places/conditions not in ALT/EXIF.  
    - **Deduplicate intelligently:** avoid repeating the exact same keyword in line 1 and hashtags if it reduces variety; keep the most useful mix for search.  
    - Keep line 2 compact and readable (models/settings aid search without spam).
    
    **OUTPUT (exact format)**  
    <action + outcome with intent terms>
    <gear & settings>
    <hashtags>
  3. Instagram 认证

    Params 节点预置 FB id、n8n 实例域名、LR catalog ID 等参数 → get access_token 调用 Graph API 获取页面访问令牌 → Get instagram id 查询绑定的 instagram_business_account.id。

  4. 发布图片

    Create container 调用 POST /media 创建媒体容器,传入 image_url(指向 Workflow 2 的公开 webhook 端点)、caption(AI 生成配文)、alt_text;Publish image 调用 POST /media_publish 携带 creation_id 完成发布。

  5. 更新数据表状态

    Update row(s) 根据 Limit 输出的记录 id 更新 Photos 表:写入 ig_id(发布返回的媒体 ID)、ig_caption(最终配文)、ig_posted_at(当前时间 $now)。

可复制提示词

搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限,再导入模板并配置 Params 节点

这一段是提示词,页面不会在这里插入广告。

你正在搭建 n8n 工作流,将 Lightroom 云相册照片自动发布到 Instagram。请先确认:1)n8n 实例有公网域名;2)已获取 Instagram Business/Creator 账号与 Facebook 主页的 Graph API v23.0 长期令牌;3)Anthropic API 凭证已配置;4)配套工作流 1(AI 替代文本)和 2(图片 webhook)已就绪;5)Photos 数据表包含必需列。随后按步骤导入模板并填入 Params 节点中的四个参数值。

需替换 Params 节点中的 instagram_business_account_id、FB id、n8n instance domain、LR catalog ID 为实际值

来源

Lightroom cloud to Instagram auto poster (AI captions) · camilleroux · n8n.io · 2025-10-15

留言与反馈

试过这个方法吗?分享效果、遇到的问题或改进建议。留言审核后公开,请勿填写敏感信息。

正在加载…

    相关用例