8
n8n 中文网amn8n.com

🤖 自动化社交媒体内容引擎:从RSS到发布帖子

高级

这是一个Social Media, Multimodal AI领域的自动化工作流,包含 58 个节点。主要使用 If, Set, Code, Late, Switch 等节点。 使用AI、Airtable和GetLate为多平台自动化RSS到社交媒体发布流程

前置要求
  • Airtable API Key
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "Gax5ozmMKpBb1s7z",
  "meta": {
    "instanceId": "74d713ac149bdf2e1c898ad831b3f08fdb291e841248586bcb28212c38bd700b"
  },
  "name": "🤖 自动化社交媒体内容引擎:从 RSS 到发布帖子",
  "tags": [
    {
      "id": "B0Svy69BBALasOax",
      "name": "social-media-automation",
      "createdAt": "2025-09-30T19:09:24.274Z",
      "updatedAt": "2025-09-30T19:09:24.274Z"
    },
    {
      "id": "ePBEMpRwi21NHJQ6",
      "name": "ai-content-generation",
      "createdAt": "2025-09-30T19:10:15.132Z",
      "updatedAt": "2025-09-30T19:10:15.132Z"
    },
    {
      "id": "YtvOAZaBOf88KVk9",
      "name": "rss-to-social",
      "createdAt": "2025-09-30T19:10:22.750Z",
      "updatedAt": "2025-09-30T19:10:22.750Z"
    },
    {
      "id": "7XQbCSxeyZ4aPM1O",
      "name": "getlate-api",
      "createdAt": "2025-09-30T19:10:38.744Z",
      "updatedAt": "2025-09-30T19:10:38.744Z"
    }
  ],
  "nodes": [
    {
      "id": "8c08347d-a66d-40f8-847e-bec6ab08f699",
      "name": "设置帖子排程",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        784,
        1504
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 12
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4ee7d7a6-9c16-45b9-810f-13d398381096",
      "name": "LinkedIn SMCG",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2048,
        1360
      ],
      "parameters": {
        "batching": {},
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "a31281d3-9d15-4423-ba81-3d0d57fc8017",
      "name": "Bluesky SMCG",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2048,
        1664
      ],
      "parameters": {
        "batching": {}
      },
      "typeVersion": 1.7
    },
    {
      "id": "0916877b-7835-4fe5-8e36-b9d91c5b0e17",
      "name": "生成帖子图片(LinkedIn)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2816,
        1344
      ],
      "parameters": {
        "url": "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "inputs",
              "value": "={{ $json.output.image_prompt }}"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "image/png"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "gv5zYpvHHxYv727R",
          "name": "Bearer YOUR_TOKEN_HERE account - Hugging Face"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "47ef3d09-df53-4163-93b8-7be5dcc3a230",
      "name": "在 Imgbb 存储图片(LinkedIn)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3248,
        1344
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "value": "={{ $('Convert to Base64 (LinkedIn)').item.json.image_data[0].binary.data.data }}"
            }
          ]
        },
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "={{ $('Pull New Articles').item.json.createdTime }}-{{ $('Pull New Articles').item.json.id }}-{{ $('Pull New Articles').item.json.platform.toLowerCase() }}"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "pT3TEBbPhLosrjma",
          "name": "Query Auth account - Imgbb"
        },
        "httpBearerAuth": {
          "id": "gv5zYpvHHxYv727R",
          "name": "Bearer YOUR_TOKEN_HERE account - Hugging Face"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1aff70b8-54bd-4fe9-9cd2-8a5721cc90f4",
      "name": "存储生成的帖子内容(LinkedIn)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        3664,
        1344
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "RSS Feed Store - Wallabag RSS Feed Aggregator"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "id": "={{ $('Pull New Articles').item.json.id }}",
            "cta_used": "={{ $('LinkedIn SMCG').item.json.output.cta_used }}",
            "image_id": "={{ $('Store Image on Imgbb (LinkedIn)').item.json.data.id }}",
            "is_posted": 1,
            "post_text": "={{ $('LinkedIn SMCG').item.json.output.post_text }}",
            "image_link": "={{ $('Store Image on Imgbb (LinkedIn)').item.json.data.image.url }}",
            "article_url": "={{ $('Pull New Articles').item.json.article_url }}",
            "goal_applied": "={{ $('LinkedIn SMCG').item.json.output.goal_applied }}",
            "image_prompt": "={{ $('LinkedIn SMCG').item.json.output.image_prompt }}",
            "tone_applied": "={{ $('LinkedIn SMCG').item.json.output.tone_applied }}",
            "image_filename": "={{ $('Store Image on Imgbb (LinkedIn)').item.json.data.title }}",
            "character_count": "={{ $('LinkedIn SMCG').item.json.output.character_count }}",
            "audience_ targeted": "={{ $('LinkedIn SMCG').item.json.output.audience_targeted }}",
            "suggested_hashtags": "={{ $('LinkedIn SMCG').item.json.output.suggested_hashtags.join(', ') }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "351e0052-367d-42e2-ae40-9cb396fb9d0e",
      "name": "存储生成的帖子内容(无图片,LinkedIn)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        3040,
        1520
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "GetLate n8n Arena Challenge - Wallabag Content Store"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "id": "={{ $('Pull New Articles').item.json.id }}",
            "cta_used": "={{ $('Validate JSON (LinkedIn)').item.json.cta_used }}",
            "is_posted": 1,
            "post_text": "={{ $('Validate JSON (LinkedIn)').item.json.post_text }}",
            "article_url": "={{ $('Pull New Articles').item.json.article_url }}",
            "goal_applied": "={{ $('Validate JSON (LinkedIn)').item.json.goal_applied }}",
            "image_prompt": "={{ $('Validate JSON (LinkedIn)').item.json.image_prompt }}",
            "tone_applied": "={{ $('Validate JSON (LinkedIn)').item.json.tone_applied }}",
            "character_count": "={{ $('Validate JSON (LinkedIn)').item.json.character_count }}",
            "audience_ targeted": "={{ $('Validate JSON (LinkedIn)').item.json.audience_targeted }}",
            "suggested_hashtags": "={{ $('Validate JSON (LinkedIn)').item.json.suggested_hashtags.join(\", \")}}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "6ac4287e-18e8-43d6-8b01-0bbc7bd0d99a",
      "name": "检查平台",
      "type": "n8n-nodes-base.switch",
      "position": [
        1696,
        1488
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0dbe36a7-9d05-4ea1-8be6-aca799a0a361",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "linkedin"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "c9c2ccff-03be-474b-b1d9-86b809c723a8",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "bluesky"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "71eb6b63-8128-479d-92f9-1184f45f3cbc",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "instagram"
                  }
                ]
              }
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "ada5c92f-69ea-45f4-aa1a-bcce063a2aa1",
      "name": "Bluesky SMCG 提示",
      "type": "n8n-nodes-base.set",
      "position": [
        1872,
        1664
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3a30f765-4dac-4605-8f56-74b2076ece93",
              "name": "chatInput",
              "type": "string",
              "value": "=\nRole: You are a professional social media content generator specializing in Bluesky.\n\nTask: Create one optimized Bluesky post (skeet) based on the provided article content and user specifications.\n\nInput Data:\n- Niche: {{ $('Set SMCG Custom Parameters & Settings').item.json.niche }}\n- Tone: {{ $('Set SMCG Custom Parameters & Settings').item.json.tone }}\n- Goal: {{ $('Set SMCG Custom Parameters & Settings').item.json.goal }}\n- Call-To-Action (CTA): {{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}\n- Target Audience: {{ $('Set SMCG Custom Parameters & Settings').item.json.target_audience }}\n- Custom Tags: {{ $('Set SMCG Custom Parameters & Settings').item.json.custom_tags }}\n- Needs Image Prompt: {{ $('Set SMCG Custom Parameters & Settings').item.json.generate_image_bluesky }}\n- Article Title: {{ $('Pull New Articles').item.json.title }}\n- Article Author: {{ $('Pull New Articles').item.json.author }}\n- Article Content: {{ $('Pull New Articles').item.json.content_markdown }}\n\nContent Creation Guidelines:\n\n1. Bluesky Post Structure:\n- Create concise, engaging content suitable for a broad, real-time audience.\n- Length: Optimal 250-300 characters, maximum 300 characters.\n- First line must contain a strong, scroll-stopping hook.\n- Focus on one key insight, surprising takeaway, or compelling question from the article.\n- CRITICAL: After the main content and CTA, append ALL custom tags from the user's \"custom_tags\" input at the very end of the post, ensuring the total character count stays within the 300 character limit.\n- Integrate the CTA naturally into the post flow - weave it into the narrative rather than tacking it on at the end.\n\n2. Content Quality:\n- Extract the most valuable, counterintuitive, or actionable insight from the article.\n- Match the specified tone (can be more conversational or punchy than LinkedIn).\n- Express the CTA using natural language that matches the post's tone and flow.\n- Encourage replies or engagement (e.g., with a rhetorical question or bold claim).\n- Add brief context or perspective—don't just summarize.\n- Reserve character space to append all user-provided custom tags (hashtags and @mentions) at the end.\n- Make the CTA feel like an organic part of the conversation, not a separate command.\n\n3. Image Prompt Handling:\n- If \"needs_image_prompt\" is true: Generate a clear, descriptive image prompt reflecting the article's core idea in a visually engaging, Bluesky-appropriate style.\n- If \"needs_image_prompt\" is false: Set \"image_prompt\" to JSON null (not the string \"null\").\n- Image prompts should be detailed enough for AI image generation.\n\nOutput Requirements:\n- Return ONLY a valid JSON object with no extra text, markdown, or comments.\n- All keys and string values must use double quotes.\n- \"character_count\" must be an integer.\n- Do not include any fields beyond those listed.\n- Ensure all custom tags provided by the user appear at the end of post_text within the 300 character limit.\n\nJSON Output Structure:\n\n{\n  \"platform\": \"Bluesky\",\n  \"post_text\": \"Hook-driven post with CTA woven naturally, ending with custom tags: #tag1 #tag2 @mention\",\n  \"suggested_hashtags\": [\"#customtag1\", \"#customtag2\", \"#relevant\"],\n  \"cta_used\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}\",\n  \"tone_applied\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.tone }}\",\n  \"goal_applied\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.goal }}\",\n  \"audience_targeted\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.target_audience }}\",\n  \"character_count\": 285,\n  \"image_prompt\": \"Descriptive image prompt or null\"\n}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1d93e90d-914e-4987-b511-439529dad682",
      "name": "RSS 源触发器:'#to-share-bluesky'",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        784,
        432
      ],
      "parameters": {
        "feedUrl": "https://your-wallabag.instance/feed/wallabag/00000000000000/tags/t:your-tag-here",
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ab9052df-b7c0-4833-bf59-e50f495eaa19",
      "name": "设置平台(Bluesky)",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        432
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b9b8246a-695e-4d14-ace8-f194a0d1fc9f",
              "name": "platform",
              "type": "string",
              "value": "=bluesky"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "f63a70b0-984e-4ebb-bf4a-3ace9f8db7f9",
      "name": "存储文章内容(LinkedIn)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1792,
        240
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "GetLate n8n Arena Challenge - Wallabag Content Store"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "title": "={{ $('RSS Feed Trigger: \\'#to-share-linkedin\\'').item.json.title }}",
            "author": "={{ $('RSS Feed Trigger: \\'#to-share-linkedin\\'').item.json.author }}",
            "feed_id": "={{ $('RSS Feed Trigger: \\'#to-share-linkedin\\'').item.json.id }}",
            "platform": "={{ $('Set Platform (LinkedIn)').item.json.platform.toLowerCase() }}",
            "is_posted": 0,
            "article_url": "={{ $('RSS Feed Trigger: \\'#to-share-linkedin\\'').item.json.link }}",
            "character_count": 0,
            "content_markdown": "={{ $json.content_markdown }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c9b18bb9-2011-4888-92f1-8d27a759b1a8",
      "name": "设置平台(LinkedIn)",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        240
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b9b8246a-695e-4d14-ace8-f194a0d1fc9f",
              "name": "platform",
              "type": "string",
              "value": "=linkedin"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0bfff711-413d-4aad-b7bc-c97ffd8f8ccb",
      "name": "RSS 源触发器:'#to-share-linkedin'",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        784,
        240
      ],
      "parameters": {
        "feedUrl": "https://your-wallabag.instance/feed/wallabag/00000000000000/tags/t:your-tag-here",
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "10a20919-e4df-412b-b219-b208d655a543",
      "name": "LinkedIn SMCG 提示",
      "type": "n8n-nodes-base.set",
      "position": [
        1872,
        1360
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3a30f765-4dac-4605-8f56-74b2076ece93",
              "name": "chatInput",
              "type": "string",
              "value": "=Role: You are a professional social media content generator specializing in LinkedIn.\n\nTask: Create one optimized LinkedIn post based on the provided article content and user specifications.\n\nInput Data:\n- Niche: {{ $('Set SMCG Custom Parameters & Settings').item.json.niche }}\n- Tone: {{ $('Set SMCG Custom Parameters & Settings').item.json.tone }}\n- Goal: {{ $('Set SMCG Custom Parameters & Settings').item.json.goal }}\n- Call-To-Action (CTA): {{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}\n- Target Audience: {{ $('Set SMCG Custom Parameters & Settings').item.json.target_audience }}\n- Custom Tags: {{ $('Set SMCG Custom Parameters & Settings').item.json.custom_tags }}\n- Needs Image Prompt: {{ $('Set SMCG Custom Parameters & Settings').item.json.generate_image_linkedin }}\n- Article Title: {{ $('Pull New Articles').item.json.title }}\n- Article Author: {{ $('Pull New Articles').item.json.author }}\n- Article Content: {{ $('Pull New Articles').item.json.content_markdown }}\n\nContent Creation Guidelines:\n\n1. LinkedIn Post Structure:\n- Create professional content suitable for {{ $('Set SMCG Custom Parameters & Settings').item.json.niche }} audiences.\n- Length: 1,500-2,000 characters optimal, maximum 3,000 characters.\n- The first 150-200 characters must function as a standalone, high-impact hook designed to stop the scroll and entice the reader to click \"See more.\" This hook should pose a bold question, share a surprising insight, or challenge a common assumption.\n- Place the hook before any line breaks or paragraph spacing it must appear at the very top with no leading whitespace or emojis that might push it past the fold.\n- Follow the hook with 2-3 short, scannable paragraphs separated by line breaks.\n- Include 3-5 relevant hashtags at the end.\n- CRITICAL: After the main content and CTA, append ALL custom tags from the user's \"custom_tags\" input at the very end of the post, ensuring the total character count stays within the 3,000 character limit.\n- Use the user-provided CTA ({{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}) as the core action you want readers to take, and express it naturally within the post using language that matches the specified tone.\n\n2. Content Quality:\n- Focus on valuable insights from the article.\n- Use professional language matching the specified tone.\n- Place the user-provided CTA naturally at or near the end of the post.\n- Include a clear call-to-action aligned with the goal.\n- Pose questions to encourage engagement.\n- Add context or perspective beyond simple article summary.\n- Reserve space at the end to append all user-provided custom tags (hashtags and @mentions).\n\n3. Image Prompt Handling:\n- If \"needs_image_prompt\" is true: Generate a descriptive image prompt that visually represents the article's core concept in a professional style.\n- If \"needs_image_prompt\" is false: Set image_prompt to null.\n- Image prompts should be clear, descriptive, and suitable for general image generation.\n\nOutput Requirements:\n- Return ONLY a valid JSON object with no additional text.\n- Use the exact keys and types specified below:\n  - \"platform\": string (always \"LinkedIn\")\n  - \"post_text\": string (1500-3000 characters, with engaging hook and ALL custom tags appended at the end)\n  - \"suggested_hashtags\": array of strings (3-5 hashtags relevant to the content)\n  - \"cta_used\": string (clear call-to-action)\n  - \"tone_applied\": string (from input)\n  - \"goal_applied\": string (from input)\n  - \"audience_targeted\": string (from input)\n  - \"character_count\": integer (accurate count of post_text including appended custom tags)\n  - \"image_prompt\": string or null (descriptive if needed)\n\nJSON Output Structure:\n\n{\n  \"platform\": \"LinkedIn\",\n  \"post_text\": \"Hook-driven post with content and CTA, ending with all custom tags appended: #customtag1 #customtag2 @mention\",\n  \"suggested_hashtags\": [\"#tag1\", \"#tag2\", \"#tag3\"],\n  \"cta_used\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}\",\n  \"tone_applied\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.tone }}\",\n  \"goal_applied\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.goal }}\",\n  \"audience_targeted\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.target_audience }}\",\n  \"character_count\": 1850,\n  \"image_prompt\": \"Descriptive image prompt or null\"\n}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e9464751-3a9e-4e13-9239-6e1befc7a179",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2736,
        1248
      ],
      "parameters": {
        "width": 1392,
        "height": 1088,
        "content": "## ⚙️ 配置 Imgbb 和图片生成服务凭据"
      },
      "typeVersion": 1
    },
    {
      "id": "61f6a0bb-82b1-491b-ba5e-088ad675219d",
      "name": "便利贴5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        1392
      ],
      "parameters": {
        "color": 3,
        "height": 304,
        "content": "## ⚙️ 定义发布排程"
      },
      "typeVersion": 1
    },
    {
      "id": "33eb5616-a843-4eba-a475-c1e2c5b9c425",
      "name": "便签 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        1392
      ],
      "parameters": {
        "color": 4,
        "width": 304,
        "height": 304,
        "content": "## ⚙️ 设置 AI 内容生成器参数和配置"
      },
      "typeVersion": 1
    },
    {
      "id": "85364747-b049-4c31-b2ac-86dc26bf37c6",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        1248
      ],
      "parameters": {
        "width": 304,
        "height": 1104,
        "content": "## ⚙️ 配置 LLM 凭据"
      },
      "typeVersion": 1
    },
    {
      "id": "8e9c8934-a71b-480a-b715-151b6a0abac3",
      "name": "便签 7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        128
      ],
      "parameters": {
        "width": 656,
        "height": 720,
        "content": "## ⚙️ 配置源凭据和社交媒体平台"
      },
      "typeVersion": 1
    },
    {
      "id": "44538b3e-c45d-4122-9edc-4c79732a5693",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1616,
        128
      ],
      "parameters": {
        "width": 448,
        "height": 720,
        "content": "## ⚙️ 配置 Airtable 凭据"
      },
      "typeVersion": 1
    },
    {
      "id": "f8b84a38-9cb9-48e4-97df-a1d12940426d",
      "name": "通过 GetLate API 发布/草稿(无图片,LinkedIn)",
      "type": "n8n-nodes-late.late",
      "position": [
        2816,
        1520
      ],
      "parameters": {
        "tags": "={{ $json.suggested_hashtags.join(\", \") }}",
        "content": "={{ $json.post_text }}",
        "isDraft": "={{ $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }}",
        "resource": "posts",
        "operation": "create",
        "mediaItems": {
          "items": []
        },
        "publishNow": "={{ ! $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }}",
        "scheduledFor": "={{ $now.toFormat('yyyy-MM-dd HH:mm:ss') }}",
        "requestOptions": {},
        "linkedinAccounts": [
          "68dde73738690b4b9b1929b6"
        ],
        "selectedPlatforms": [
          "linkedin"
        ]
      },
      "credentials": {
        "lateApi": {
          "id": "n2J6xMNjaYjvIa9p",
          "name": "LATE account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "1f6b7008-9b63-44e8-a2ba-c549a05ae2a6",
      "name": "设置 SMCG 自定义参数和配置",
      "type": "n8n-nodes-base.set",
      "position": [
        1088,
        1504
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f40fcd95-5826-4562-abbf-b0ffac59463a",
              "name": "niche",
              "type": "string",
              "value": "Sustainable fashion"
            },
            {
              "id": "1c4fce50-7c27-4bea-9ea9-35e2e4fef801",
              "name": "tone",
              "type": "string",
              "value": "Friendly, witty, conversational"
            },
            {
              "id": "333f453a-a9c4-4401-adee-73e07ec754fc",
              "name": "goal",
              "type": "string",
              "value": "Spark debate or conversation"
            },
            {
              "id": "62fb7748-1f2e-4c40-ba01-d0d159844f23",
              "name": "cta",
              "type": "string",
              "value": "Leave a comment, visit newsletter"
            },
            {
              "id": "aae1540d-873c-40d4-9326-fda99ccfdf10",
              "name": "target_audience",
              "type": "string",
              "value": "Students, fashion/lifestyle influencer"
            },
            {
              "id": "54adc187-37ef-4005-842f-56d444004889",
              "name": "custom_tags",
              "type": "string",
              "value": "#n8n, #automation"
            },
            {
              "id": "7c18b6f9-2e26-44a0-acc8-904c6e4a311f",
              "name": "post_as_draft",
              "type": "boolean",
              "value": true
            },
            {
              "id": "8037d300-2be0-47cf-8ef8-8314a7ffd089",
              "name": "generate_image_bluesky",
              "type": "boolean",
              "value": true
            },
            {
              "id": "27bd8ac8-747f-4651-acf2-0a3f574310bb",
              "name": "generate_image_linkedin",
              "type": "boolean",
              "value": true
            },
            {
              "id": "e516e735-4146-40c6-a018-dde3db6ed06b",
              "name": "bluesky_account_id",
              "type": "string",
              "value": "{ BLUESKY_ACCOUNT_ID }"
            },
            {
              "id": "b0736923-4372-46c4-bfdf-91f68125d958",
              "name": "linkedin_account_id",
              "type": "string",
              "value": "{ LINKEDIN_ACCOUNT_ID }"
            },
            {
              "id": "24439397-d438-47fc-ab19-b450f57cf6cf",
              "name": "instagram_account_id",
              "type": "string",
              "value": "{ INSTAGRAM_ACCOUNT_ID }"
            }
          ]
        }
      },
      "typeVersion": 3.4,
      "alwaysOutputData": false
    },
    {
      "id": "2e346ac6-30cc-472e-b254-9c4235a348b8",
      "name": "Instagram SMCG 提示",
      "type": "n8n-nodes-base.set",
      "position": [
        1872,
        1936
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "3a30f765-4dac-4605-8f56-74b2076ece93",
              "name": "chatInput",
              "type": "string",
              "value": "=\nRole: You are a professional social media content generator specializing in Instagram.\n\nTask: Create one optimized Instagram post with a single image based on the provided article content and user specifications.\n\nInput Data:\n- Niche: {{ $('Set SMCG Custom Parameters & Settings').item.json.niche }}\n- Tone: {{ $('Set SMCG Custom Parameters & Settings').item.json.tone }}\n- Goal: {{ $('Set SMCG Custom Parameters & Settings').item.json.goal }}\n- Call-To-Action (CTA): {{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}\n- Target Audience: {{ $('Set SMCG Custom Parameters & Settings').item.json.target_audience }}\n- Custom Tags: {{ $('Set SMCG Custom Parameters & Settings').item.json.custom_tags }}\n- Article Title: {{ $('Pull New Articles').item.json.title }}\n- Article Author: {{ $('Pull New Articles').item.json.author }}\n- Article Content: {{ $('Pull New Articles').item.json.content_markdown }}\n\nContent Creation Guidelines:\n\n1. Instagram Post Structure:\n- Create a single, powerful image post (no carousel support)\n- Caption length: 125-200 characters maximum\n- Write as a single paragraph with NO LINE BREAKS - use emojis and punctuation for flow\n- First sentence must be a scroll-stopping hook with emotional appeal\n- Include 1-2 relevant emojis maximum to maintain clean appearance\n- Focus on one key takeaway that complements a single strong visual\n- Use the user-provided CTA ({{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}) as the core action you want readers to take, and express it naturally within the post using language that matches the specified tone.\n- CRITICAL: After the main content and CTA, append ALL custom tags from the user's \"custom_tags\" input at the very end of the post, ensuring the total character count stays within the 200 character limit.\n\n2. Content Quality:\n- Extract the most visually compelling aspect that can be represented in one image\n- Use conversational, authentic language that matches Instagram's tone\n- Place the user-provided CTA naturally at or near the end of the post.\n- Include a clear call-to-action for engagement (comments, saves, link clicks)\n- Create curiosity and emotional connection in a single continuous paragraph\n- Ensure the caption flows naturally without line breaks or paragraph separation\n- Reserve character space to append all user-provided custom tags at the end.\n\n3. Hashtag Strategy:\n- suggested_hashtags: 3-5 hashtags for first comment (include all custom tags from user)\n- Mix of niche-specific and community engagement hashtags\n- No hashtags in the main caption text EXCEPT for the custom tags appended at the very end\n\n4. Image Prompt Handling:\n- Generate ONE comprehensive image prompt that captures the essence of the article\n- Focus on a single compelling visual that tells the story\n- Include specific details: composition, mood, lighting, style, and key elements\n- Optimize for Instagram feed performance and scroll-stopping impact\n\nOutput Requirements:\n- Return ONLY a valid JSON object with no additional text.\n- Use the exact keys and types specified below:\n\nJSON Output Structure:\n\n{\n  \"platform\": \"Instagram\",\n  \"post_text\": \"Single paragraph with no line breaks using emojis strategically within continuous flow ending with custom tags: #tag1 #tag2\",\n  \"suggested_hashtags\": [\"#customtag1\", \"#customtag2\", \"#niche\", \"#community\"],\n  \"cta_used\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.cta }}\",\n  \"tone_applied\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.tone }}\",\n  \"goal_applied\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.goal }}\",\n  \"audience_targeted\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.target_audience }}\",\n  \"character_count\": 145,\n  \"image_prompt\": \"Single compelling image: [detailed description of one powerful visual]\"\n}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "1615455c-644b-4ce0-8935-c26dd4ab1274",
      "name": "Instagram SMCG",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        2048,
        1936
      ],
      "parameters": {
        "batching": {}
      },
      "typeVersion": 1.7
    },
    {
      "id": "a7212bf7-e7f3-4009-84b1-22b2e20093e7",
      "name": "检查图片提示(Bluesky)",
      "type": "n8n-nodes-base.if",
      "position": [
        2576,
        1664
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a729b165-a3f6-461c-bf55-90d34cd32db4",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.image_prompt }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "dbc93362-8252-42ab-8486-4a602ab5e050",
      "name": "检查图片提示(LinkedIn)",
      "type": "n8n-nodes-base.if",
      "position": [
        2576,
        1360
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a729b165-a3f6-461c-bf55-90d34cd32db4",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "=",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "98cb7f0f-afab-44c2-9d88-57698c6a623f",
      "name": "通过 GetLate API 发布/草稿(LinkedIn)",
      "type": "n8n-nodes-late.late",
      "position": [
        3456,
        1344
      ],
      "parameters": {
        "tags": "={{ $('LinkedIn SMCG').item.json.output.suggested_hashtags.join(\" \") }}",
        "content": "={{ $('LinkedIn SMCG').item.json.output.post_text }}",
        "isDraft": "={{ $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }}",
        "resource": "posts",
        "operation": "create",
        "mediaItems": {
          "items": []
        },
        "publishNow": "={{ ! $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }}",
        "requestOptions": {},
        "linkedinAccounts": [
          "68dde73738690b4b9b1929b6"
        ],
        "selectedPlatforms": [
          "linkedin"
        ]
      },
      "credentials": {
        "lateApi": {
          "id": "n2J6xMNjaYjvIa9p",
          "name": "LATE account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "787ee4dc-4927-45f2-8531-ca6361866e12",
      "name": "拉取新文章",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1344,
        1504
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "RSS Feed Store - Wallabag RSS Feed Aggregator"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "options": {
          "view": {
            "__rl": true,
            "mode": "list",
            "value": "viwzBm6hokiAHlXTp",
            "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5/viwzBm6hokiAHlXTp",
            "cachedResultName": "Grid view"
          },
          "fields": [
            "id",
            "feed_id",
            "title",
            "author",
            "content_markdown",
            "is_posted",
            "platform",
            "post_text",
            "suggested_hashtags",
            "cta_used",
            "tone_applied",
            "goal_applied",
            "audience_ targeted",
            "character_count",
            "image_prompt",
            "image_id",
            "image_filename",
            "image_link",
            "article_url"
          ]
        },
        "operation": "search",
        "filterByFormula": "is_posted=0"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "CebUWyzJFFDQNNfZ",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": false
    },
    {
      "id": "0cf88e2a-8200-402f-9a28-401a56ca3029",
      "name": "转换为 Base64(Bluesky)",
      "type": "n8n-nodes-base.code",
      "position": [
        3232,
        1728
      ],
      "parameters": {
        "jsCode": "// The image data (binary) is the raw response body (i.e. base64 encoded string)\nreturn {\n  image_data: $input.all(),\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "9480fb73-6fbc-4e08-9b4b-50cb164b3653",
      "name": "转换为 Base64(LinkedIn)",
      "type": "n8n-nodes-base.code",
      "position": [
        3040,
        1344
      ],
      "parameters": {
        "jsCode": "// The image data (binary) is the raw response body (i.e. base64 encoded string)\nreturn {\n  image_data: $input.all(),\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "352b458b-5a3a-4a96-8aca-fe7f1f840208",
      "name": "在 Imgbb 存储图片(Bluesky)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3424,
        1728
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "value": "={{ $('Convert to Base64 (Bluesky)').item.json.image_data[0].binary.data.data }}"
            }
          ]
        },
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "={{ $('Pull New Articles').item.json.createdTime }}-{{ $('Pull New Articles').item.json.id }}-{{ $('Pull New Articles').item.json.platform.toLowerCase() }}"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "pT3TEBbPhLosrjma",
          "name": "Query Auth account - Imgbb"
        },
        "httpBearerAuth": {
          "id": "gv5zYpvHHxYv727R",
          "name": "Bearer YOUR_TOKEN_HERE account - Hugging Face"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "9f305a00-fa02-44e3-ac57-a5ce4a37afe0",
      "name": "存储生成的帖子内容(Bluesky)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        3856,
        1728
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "RSS Feed Store - Wallabag RSS Feed Aggregator"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "id": "={{ $('Pull New Articles').item.json.id }}",
            "cta_used": "={{ $('Validate JSON (Bluesky)').item.json.cta_used }}",
            "image_id": "={{ $('Store Image on Imgbb (Bluesky)').item.json.data.id }}",
            "is_posted": 1,
            "post_text": "={{ $('Validate JSON (Bluesky)').item.json.post_text }}",
            "image_link": "={{ $('Store Image on Imgbb (Bluesky)').item.json.data.image.url }}",
            "article_url": "={{ $('Pull New Articles').item.json.article_url }}",
            "goal_applied": "={{ $('Validate JSON (Bluesky)').item.json.goal_applied }}",
            "image_prompt": "={{ $('Validate JSON (Bluesky)').item.json.image_prompt }}",
            "tone_applied": "={{ $('Validate JSON (Bluesky)').item.json.tone_applied }}",
            "image_filename": "={{ $('Store Image on Imgbb (Bluesky)').item.json.data.title }}",
            "character_count": "={{ $('Validate JSON (Bluesky)').item.json.character_count }}",
            "audience_ targeted": "={{ $('Validate JSON (Bluesky)').item.json.audience_targeted }}",
            "suggested_hashtags": "={{ $('Validate JSON (Bluesky)').item.json.suggested_hashtags.join(', ') }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "705a8394-7a11-499b-98d8-0e7bbc3ff852",
      "name": "存储生成的帖子内容(无图片,Bluesky)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        3040,
        1904
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "GetLate n8n Arena Challenge - Wallabag Content Store"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "id": "={{ $('Pull New Articles').item.json.id }}",
            "cta_used": "={{ $('Validate JSON (Bluesky)').item.json.cta_used }}",
            "is_posted": 1,
            "post_text": "={{ $('Validate JSON (Bluesky)').item.json.post_text }}",
            "article_url": "={{ $('Pull New Articles').item.json.article_url }}",
            "goal_applied": "={{ $('Validate JSON (Bluesky)').item.json.goal_applied }}",
            "image_prompt": "={{ $('Validate JSON (Bluesky)').item.json.image_prompt }}",
            "tone_applied": "={{ $('Validate JSON (Bluesky)').item.json.tone_applied }}",
            "character_count": "={{ $('Validate JSON (Bluesky)').item.json.character_count }}",
            "audience_ targeted": "={{ $('Validate JSON (Bluesky)').item.json.audience_targeted }}",
            "suggested_hashtags": "={{ $('Validate JSON (Bluesky)').item.json.suggested_hashtags.join(', ') }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "CebUWyzJFFDQNNfZ",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "7dc2d352-4eb9-4d6b-8853-98317f9a40f6",
      "name": "验证 JSON(Instagram)",
      "type": "n8n-nodes-base.code",
      "position": [
        2368,
        1936
      ],
      "parameters": {
        "jsCode": "// n8n Function Node: Manual JSON Parser & Validator\nconst raw = $input.first().json.text;\n\n// Handle case where LLM returns a string (common if JSON is malformed)\nlet data;\nif (typeof raw === 'string') {\n  try {\n    // Try to parse JSON, including handling common LLM formatting issues\n    const cleanedRaw = raw\n      .replace(/(\\w)'(\\w)/g, '$1\\'$2') // Fix unescaped quotes in words\n      .replace(/,\\s*}/g, '}') // Remove trailing commas\n      .replace(/,\\s*]/g, ']'); // Remove trailing commas in arrays\n    \n    data = JSON.parse(cleanedRaw);\n  } catch (e) {\n    throw new Error(`LLM did not return valid JSON. Output: ${raw}`);\n  }\n} else if (typeof raw === 'object' && raw !== null) {\n  // n8n already parsed it as JSON object\n  data = { ...raw };\n} else {\n  throw new Error(`Unexpected LLM output type: ${typeof raw}`);\n}\n\n// --- Validation & Correction ---\nconst requiredFields = [\n  'platform', 'post_text', 'suggested_hashtags',\n  'cta_used', 'tone_applied', 'goal_applied',\n  'audience_targeted', 'image_prompt'\n];\n\n// Check for missing fields - CRITICAL ERROR\nfor (const field of requiredFields) {\n  if (!(field in data)) {\n    throw new Error(`Missing required field: ${field}`);\n  }\n}\n\n// Ensure post_text is string - CRITICAL ERROR\nif (typeof data.post_text !== 'string') {\n  throw new Error('post_text must be a string');\n}\n\n// Auto-correct character_count (most reliable approach!)\nconst actualCount = data.post_text.length;\n// Optional: warn if LLM provided a different count\nif (typeof data.character_count !== 'undefined' && data.character_count !== actualCount) {\n  console.log(`⚠️ LLM reported character_count=${data.character_count}, but actual is ${actualCount}. Using actual.`);\n}\ndata.character_count = actualCount;\n\n// Validate and fix hashtags - AUTO-FIX MINOR ISSUES\nif (!Array.isArray(data.suggested_hashtags)) {\n  // Try to convert to array if it's a string\n  if (typeof data.suggested_hashtags === 'string') {\n    console.log('⚠️ suggested_hashtags was a string, converting to array');\n    data.suggested_hashtags = data.suggested_hashtags.split(',').map(tag => tag.trim());\n  } else {\n    throw new Error('suggested_hashtags must be an array');\n  }\n}\n\n// Fix hashtags by ensuring they all start with # and are valid\ndata.suggested_hashtags = data.suggested_hashtags\n  .map(tag => {\n    if (typeof tag !== 'string') {\n      // Try to convert non-string values\n      if (tag === null || tag === undefined) {\n        console.log('⚠️ Found null/undefined hashtag, removing');\n        return null;\n      }\n      console.log(`⚠️ Converting non-string hashtag: ${tag}`);\n      tag = String(tag);\n    }\n    \n    // Remove any existing # and add a new one to ensure proper formatting\n    const cleanTag = tag.replace(/^#+/, '').trim();\n    \n    // Skip empty tags\n    if (!cleanTag) {\n      console.log('⚠️ Found empty hashtag, removing');\n      return null;\n    }\n    \n    // Add # prefix\n    return `#${cleanTag}`;\n  })\n  .filter(tag => tag !== null) // Remove null entries\n  .filter(tag => tag.length <= 30) // Remove overly long hashtags\n  .slice(0, 30); // Limit to 30 hashtags maximum\n\n// Ensure we still have some hashtags after cleaning\nif (data.suggested_hashtags.length === 0) {\n  console.log('⚠️ No valid hashtags found after cleaning, using fallback');\n  data.suggested_hashtags = ['#socialmedia'];\n}\n\n// Ensure image_prompt is null or string - AUTO-FIX\nif (data.image_prompt === undefined) {\n  data.image_prompt = null;\n} else if (data.image_prompt !== null && typeof data.image_prompt !== 'string') {\n  console.log(`⚠️ Converting image_prompt from ${typeof data.image_prompt} to string`);\n  data.image_prompt = String(data.image_prompt);\n}\n\n// Clean up string fields - AUTO-FIX MINOR ISSUES\nconst stringFields = ['post_text', 'cta_used', 'tone_applied', 'goal_applied', 'audience_targeted'];\nstringFields.forEach(field => {\n  if (data[field] && typeof data[field] !== 'string') {\n    console.log(`⚠️ Converting ${field} from ${typeof data[field]} to string`);\n    data[field] = String(data[field]);\n  }\n  \n  // Trim whitespace from string fields\n  if (typeof data[field] === 'string') {\n    data[field] = data[field].trim();\n  }\n});\n\n// Platform validation with case-insensitive matching - AUTO-FIX CASE ISSUES\nconst allowedPlatforms = [\n  'facebook', 'instagram', 'linkedin', 'twitter', \n  'threads', 'tiktok', 'youtube', 'pinterest', \n  'reddit', 'bluesky'\n];\n\n// Convert platform to lowercase for comparison\nconst platformLower = data.platform.toLowerCase().trim();\nconst matchedPlatform = allowedPlatforms.find(p => p.toLowerCase() === platformLower);\n\nif (!matchedPlatform) {\n  throw new Error(`Unsupported platform: ${data.platform}. Allowed platforms: ${allowedPlatforms.join(', ')}`);\n}\n\n// Use the properly cased platform name\nif (data.platform !== matchedPlatform) {\n  console.log(`⚠️ Normalizing platform name from \"${data.platform}\" to \"${matchedPlatform}\"`);\n  data.platform = matchedPlatform;\n}\n\n// Validate field lengths - WARN BUT DON'T ERROR\nif (data.post_text.length > 280 && ['twitter', 'x'].includes(data.platform)) {\n  console.log('⚠️ Post text exceeds 280 characters for Twitter/X platform');\n}\n\nif (data.post_text.length > 2000 && data.platform === 'linkedin') {\n  console.log('⚠️ Post text exceeds 2000 characters for LinkedIn');\n}\n\n// Remove any extra fields that might cause issues\nconst allowedFields = [...requiredFields, 'character_count'];\nObject.keys(data).forEach(key => {\n  if (!allowedFields.includes(key)) {\n    console.log(`⚠️ Removing unexpected field: ${key}`);\n    delete data[key];\n  }\n});\n\n// Final validation - CRITICAL CHECKS\nif (data.post_text.trim().length === 0) {\n  throw new Error('post_text cannot be empty after trimming');\n}\n\nif (data.suggested_hashtags.length === 0) {\n  throw new Error('No valid hashtags remain after processing');\n}\n\nconsole.log('✅ Validation completed successfully with auto-fixes applied');\nreturn { json: data };"
      },
      "typeVersion": 2
    },
    {
      "id": "24efeb63-f997-4341-ba15-87032ad04556",
      "name": "验证 JSON(Bluesky)",
      "type": "n8n-nodes-base.code",
      "position": [
        2368,
        1664
      ],
      "parameters": {
        "jsCode": "// n8n Function Node: Manual JSON Parser & Validator\nconst raw = $input.first().json.text;\n\n// Handle case where LLM returns a string (common if JSON is malformed)\nlet data;\nif (typeof raw === 'string') {\n  try {\n    // Try to parse JSON, including handling common LLM formatting issues\n    const cleanedRaw = raw\n      .replace(/(\\w)'(\\w)/g, '$1\\'$2') // Fix unescaped quotes in words\n      .replace(/,\\s*}/g, '}') // Remove trailing commas\n      .replace(/,\\s*]/g, ']'); // Remove trailing commas in arrays\n    \n    data = JSON.parse(cleanedRaw);\n  } catch (e) {\n    throw new Error(`LLM did not return valid JSON. Output: ${raw}`);\n  }\n} else if (typeof raw === 'object' && raw !== null) {\n  // n8n already parsed it as JSON object\n  data = { ...raw };\n} else {\n  throw new Error(`Unexpected LLM output type: ${typeof raw}`);\n}\n\n// --- Validation & Correction ---\nconst requiredFields = [\n  'platform', 'post_text', 'suggested_hashtags',\n  'cta_used', 'tone_applied', 'goal_applied',\n  'audience_targeted', 'image_prompt'\n];\n\n// Check for missing fields - CRITICAL ERROR\nfor (const field of requiredFields) {\n  if (!(field in data)) {\n    throw new Error(`Missing required field: ${field}`);\n  }\n}\n\n// Ensure post_text is string - CRITICAL ERROR\nif (typeof data.post_text !== 'string') {\n  throw new Error('post_text must be a string');\n}\n\n// Auto-correct character_count (most reliable approach!)\nconst actualCount = data.post_text.length;\n// Optional: warn if LLM provided a different count\nif (typeof data.character_count !== 'undefined' && data.character_count !== actualCount) {\n  console.log(`⚠️ LLM reported character_count=${data.character_count}, but actual is ${actualCount}. Using actual.`);\n}\ndata.character_count = actualCount;\n\n// Validate and fix hashtags - AUTO-FIX MINOR ISSUES\nif (!Array.isArray(data.suggested_hashtags)) {\n  // Try to convert to array if it's a string\n  if (typeof data.suggested_hashtags === 'string') {\n    console.log('⚠️ suggested_hashtags was a string, converting to array');\n    data.suggested_hashtags = data.suggested_hashtags.split(',').map(tag => tag.trim());\n  } else {\n    throw new Error('suggested_hashtags must be an array');\n  }\n}\n\n// Fix hashtags by ensuring they all start with # and are valid\ndata.suggested_hashtags = data.suggested_hashtags\n  .map(tag => {\n    if (typeof tag !== 'string') {\n      // Try to convert non-string values\n      if (tag === null || tag === undefined) {\n        console.log('⚠️ Found null/undefined hashtag, removing');\n        return null;\n      }\n      console.log(`⚠️ Converting non-string hashtag: ${tag}`);\n      tag = String(tag);\n    }\n    \n    // Remove any existing # and add a new one to ensure proper formatting\n    const cleanTag = tag.replace(/^#+/, '').trim();\n    \n    // Skip empty tags\n    if (!cleanTag) {\n      console.log('⚠️ Found empty hashtag, removing');\n      return null;\n    }\n    \n    // Add # prefix\n    return `#${cleanTag}`;\n  })\n  .filter(tag => tag !== null) // Remove null entries\n  .filter(tag => tag.length <= 30) // Remove overly long hashtags\n  .slice(0, 30); // Limit to 30 hashtags maximum\n\n// Ensure we still have some hashtags after cleaning\nif (data.suggested_hashtags.length === 0) {\n  console.log('⚠️ No valid hashtags found after cleaning, using fallback');\n  data.suggested_hashtags = ['#socialmedia'];\n}\n\n// Ensure image_prompt is null or string - AUTO-FIX\nif (data.image_prompt === undefined) {\n  data.image_prompt = null;\n} else if (data.image_prompt !== null && typeof data.image_prompt !== 'string') {\n  console.log(`⚠️ Converting image_prompt from ${typeof data.image_prompt} to string`);\n  data.image_prompt = String(data.image_prompt);\n}\n\n// Clean up string fields - AUTO-FIX MINOR ISSUES\nconst stringFields = ['post_text', 'cta_used', 'tone_applied', 'goal_applied', 'audience_targeted'];\nstringFields.forEach(field => {\n  if (data[field] && typeof data[field] !== 'string') {\n    console.log(`⚠️ Converting ${field} from ${typeof data[field]} to string`);\n    data[field] = String(data[field]);\n  }\n  \n  // Trim whitespace from string fields\n  if (typeof data[field] === 'string') {\n    data[field] = data[field].trim();\n  }\n});\n\n// Platform validation with case-insensitive matching - AUTO-FIX CASE ISSUES\nconst allowedPlatforms = [\n  'facebook', 'instagram', 'linkedin', 'twitter', \n  'threads', 'tiktok', 'youtube', 'pinterest', \n  'reddit', 'bluesky'\n];\n\n// Convert platform to lowercase for comparison\nconst platformLower = data.platform.toLowerCase().trim();\nconst matchedPlatform = allowedPlatforms.find(p => p.toLowerCase() === platformLower);\n\nif (!matchedPlatform) {\n  throw new Error(`Unsupported platform: ${data.platform}. Allowed platforms: ${allowedPlatforms.join(', ')}`);\n}\n\n// Use the properly cased platform name\nif (data.platform !== matchedPlatform) {\n  console.log(`⚠️ Normalizing platform name from \"${data.platform}\" to \"${matchedPlatform}\"`);\n  data.platform = matchedPlatform;\n}\n\n// Validate field lengths - WARN BUT DON'T ERROR\nif (data.post_text.length > 280 && ['twitter', 'x'].includes(data.platform)) {\n  console.log('⚠️ Post text exceeds 280 characters for Twitter/X platform');\n}\n\nif (data.post_text.length > 2000 && data.platform === 'linkedin') {\n  console.log('⚠️ Post text exceeds 2000 characters for LinkedIn');\n}\n\n// Remove any extra fields that might cause issues\nconst allowedFields = [...requiredFields, 'character_count'];\nObject.keys(data).forEach(key => {\n  if (!allowedFields.includes(key)) {\n    console.log(`⚠️ Removing unexpected field: ${key}`);\n    delete data[key];\n  }\n});\n\n// Final validation - CRITICAL CHECKS\nif (data.post_text.trim().length === 0) {\n  throw new Error('post_text cannot be empty after trimming');\n}\n\nif (data.suggested_hashtags.length === 0) {\n  throw new Error('No valid hashtags remain after processing');\n}\n\nconsole.log('✅ Validation completed successfully with auto-fixes applied');\nreturn { json: data };"
      },
      "typeVersion": 2
    },
    {
      "id": "c30b0c4b-d6be-4463-9177-9e0f1eb65279",
      "name": "便签11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2352,
        2112
      ],
      "parameters": {
        "color": 7,
        "content": "# 💡 注意"
      },
      "typeVersion": 1
    },
    {
      "id": "249b5049-b899-41ee-a7cc-181614637689",
      "name": "生成帖子图片(Instagram)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2816,
        2112
      ],
      "parameters": {
        "url": "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "inputs",
              "value": "={{ $json.image_prompt }}"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "image/png"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "gv5zYpvHHxYv727R",
          "name": "Bearer YOUR_TOKEN_HERE account - Hugging Face"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5ba6d2f9-0339-4447-845a-470271278e5f",
      "name": "转换为 Base64(Instagram)",
      "type": "n8n-nodes-base.code",
      "position": [
        3040,
        2112
      ],
      "parameters": {
        "jsCode": "// The image data (binary) is the raw response body (i.e. base64 encoded string)\nreturn {\n  image_data: $input.all(),\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "5406e23c-5956-42d8-8072-b6e7eb6aceeb",
      "name": "在 Imgbb 存储图片(Instagram)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3248,
        2112
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendQuery": true,
        "contentType": "multipart-form-data",
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "value": "={{ $('Convert to Base64 (Instagram)').item.json.image_data[0].binary.data.data }}"
            }
          ]
        },
        "genericAuthType": "httpQueryAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "name",
              "value": "={{ $('Pull New Articles').item.json.createdTime }}-{{ $('Pull New Articles').item.json.id }}-{{ $('Pull New Articles').item.json.platform.toLowerCase() }}"
            }
          ]
        }
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "pT3TEBbPhLosrjma",
          "name": "Query Auth account - Imgbb"
        },
        "httpBearerAuth": {
          "id": "gv5zYpvHHxYv727R",
          "name": "Bearer YOUR_TOKEN_HERE account - Hugging Face"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1aba2006-5f47-4880-82ac-575467870802",
      "name": "存储生成的帖子内容(Instagram)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        3680,
        2112
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "RSS Feed Store - Wallabag RSS Feed Aggregator"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "id": "={{ $('Pull New Articles').item.json.id }}",
            "cta_used": "={{ $('Validate JSON (Instagram)').item.json.cta_used }}",
            "image_id": "={{ $('Store Image on Imgbb (Instagram)').item.json.data.id }}",
            "is_posted": 1,
            "post_text": "={{ $('Validate JSON (Instagram)').item.json.post_text }}",
            "image_link": "={{ $('Store Image on Imgbb (Instagram)').item.json.data.image.url }}",
            "article_url": "={{ $('Pull New Articles').item.json.article_url }}",
            "goal_applied": "={{ $('Validate JSON (Instagram)').item.json.goal_applied }}",
            "image_prompt": "={{ $('Validate JSON (Instagram)').item.json.image_prompt }}",
            "tone_applied": "={{ $('Validate JSON (Instagram)').item.json.tone_applied }}",
            "image_filename": "={{ $('Store Image on Imgbb (Instagram)').item.json.data.title }}",
            "character_count": "={{ $('Validate JSON (Instagram)').item.json.character_count }}",
            "audience_ targeted": "={{ $('Validate JSON (Instagram)').item.json.audience_targeted }}",
            "suggested_hashtags": "={{ $('Validate JSON (Instagram)').item.json.suggested_hashtags.join(', ') }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "37c9f0b3-d609-4934-8a44-80a2fef07acd",
      "name": "通过 GetLate API 发布/草稿(Instagram)",
      "type": "n8n-nodes-late.late",
      "position": [
        3472,
        2112
      ],
      "parameters": {
        "tags": "={{ $('Validate JSON (Instagram)').item.json.suggested_hashtags.join(\", \") }}",
        "content": "={{ $('Validate JSON (Instagram)').item.json.post_text }}",
        "isDraft": "={{ $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }}",
        "resource": "posts",
        "operation": "create",
        "mediaItems": {
          "items": [
            {
              "url": "={{ $json.data.url }}",
              "filename": "={{ $json.data.title }}"
            }
          ]
        },
        "publishNow": "={{ ! $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }}",
        "requestOptions": {},
        "instagramAccounts": [
          "68dde71338690b4b9b1929b5"
        ],
        "selectedPlatforms": [
          "instagram"
        ]
      },
      "credentials": {
        "lateApi": {
          "id": "n2J6xMNjaYjvIa9p",
          "name": "LATE account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "44dd2d52-5ca5-4d52-8c47-46f4e98d0ccf",
      "name": "Groq 聊天模型(Bluesky)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        2048,
        1792
      ],
      "parameters": {
        "model": "moonshotai/kimi-k2-instruct-0905",
        "options": {}
      },
      "credentials": {
        "groqApi": {
          "id": "Ec5dvu0WVN8oVpaW",
          "name": "Groq account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2bc19172-391d-4a85-8bcd-4c02a146f94d",
      "name": "Groq 聊天模型(LinkedIn)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        2048,
        1488
      ],
      "parameters": {
        "model": "moonshotai/kimi-k2-instruct-0905",
        "options": {}
      },
      "credentials": {
        "groqApi": {
          "id": "Ec5dvu0WVN8oVpaW",
          "name": "Groq account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a44f4692-77d8-4101-939e-dec36bff2aee",
      "name": "Groq 聊天模型(Instagram)",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        2048,
        2064
      ],
      "parameters": {
        "model": "moonshotai/kimi-k2-instruct-0905",
        "options": {}
      },
      "credentials": {
        "groqApi": {
          "id": "Ec5dvu0WVN8oVpaW",
          "name": "Groq account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fce2ecbe-074a-4b1e-b9e2-27cbd7f0adae",
      "name": "验证 JSON(LinkedIn)",
      "type": "n8n-nodes-base.code",
      "position": [
        2368,
        1360
      ],
      "parameters": {
        "jsCode": "// n8n Function Node: Manual JSON Parser & Validator\nconst raw = $input.first().json.text;\n\n// Handle case where LLM returns a string (common if JSON is malformed)\nlet data;\nif (typeof raw === 'string') {\n  try {\n    // Try to parse JSON, including handling common LLM formatting issues\n    const cleanedRaw = raw\n      .replace(/(\\w)'(\\w)/g, '$1\\'$2') // Fix unescaped quotes in words\n      .replace(/,\\s*}/g, '}') // Remove trailing commas\n      .replace(/,\\s*]/g, ']'); // Remove trailing commas in arrays\n    \n    data = JSON.parse(cleanedRaw);\n  } catch (e) {\n    throw new Error(`LLM did not return valid JSON. Output: ${raw}`);\n  }\n} else if (typeof raw === 'object' && raw !== null) {\n  // n8n already parsed it as JSON object\n  data = { ...raw };\n} else {\n  throw new Error(`Unexpected LLM output type: ${typeof raw}`);\n}\n\n// --- Validation & Correction ---\nconst requiredFields = [\n  'platform', 'post_text', 'suggested_hashtags',\n  'cta_used', 'tone_applied', 'goal_applied',\n  'audience_targeted', 'image_prompt'\n];\n\n// Check for missing fields - CRITICAL ERROR\nfor (const field of requiredFields) {\n  if (!(field in data)) {\n    throw new Error(`Missing required field: ${field}`);\n  }\n}\n\n// Ensure post_text is string - CRITICAL ERROR\nif (typeof data.post_text !== 'string') {\n  throw new Error('post_text must be a string');\n}\n\n// Auto-correct character_count (most reliable approach!)\nconst actualCount = data.post_text.length;\n// Optional: warn if LLM provided a different count\nif (typeof data.character_count !== 'undefined' && data.character_count !== actualCount) {\n  console.log(`⚠️ LLM reported character_count=${data.character_count}, but actual is ${actualCount}. Using actual.`);\n}\ndata.character_count = actualCount;\n\n// Validate and fix hashtags - AUTO-FIX MINOR ISSUES\nif (!Array.isArray(data.suggested_hashtags)) {\n  // Try to convert to array if it's a string\n  if (typeof data.suggested_hashtags === 'string') {\n    console.log('⚠️ suggested_hashtags was a string, converting to array');\n    data.suggested_hashtags = data.suggested_hashtags.split(',').map(tag => tag.trim());\n  } else {\n    throw new Error('suggested_hashtags must be an array');\n  }\n}\n\n// Fix hashtags by ensuring they all start with # and are valid\ndata.suggested_hashtags = data.suggested_hashtags\n  .map(tag => {\n    if (typeof tag !== 'string') {\n      // Try to convert non-string values\n      if (tag === null || tag === undefined) {\n        console.log('⚠️ Found null/undefined hashtag, removing');\n        return null;\n      }\n      console.log(`⚠️ Converting non-string hashtag: ${tag}`);\n      tag = String(tag);\n    }\n    \n    // Remove any existing # and add a new one to ensure proper formatting\n    const cleanTag = tag.replace(/^#+/, '').trim();\n    \n    // Skip empty tags\n    if (!cleanTag) {\n      console.log('⚠️ Found empty hashtag, removing');\n      return null;\n    }\n    \n    // Add # prefix\n    return `#${cleanTag}`;\n  })\n  .filter(tag => tag !== null) // Remove null entries\n  .filter(tag => tag.length <= 30) // Remove overly long hashtags\n  .slice(0, 30); // Limit to 30 hashtags maximum\n\n// Ensure we still have some hashtags after cleaning\nif (data.suggested_hashtags.length === 0) {\n  console.log('⚠️ No valid hashtags found after cleaning, using fallback');\n  data.suggested_hashtags = ['#socialmedia'];\n}\n\n// Ensure image_prompt is null or string - AUTO-FIX\nif (data.image_prompt === undefined) {\n  data.image_prompt = null;\n} else if (data.image_prompt !== null && typeof data.image_prompt !== 'string') {\n  console.log(`⚠️ Converting image_prompt from ${typeof data.image_prompt} to string`);\n  data.image_prompt = String(data.image_prompt);\n}\n\n// Clean up string fields - AUTO-FIX MINOR ISSUES\nconst stringFields = ['post_text', 'cta_used', 'tone_applied', 'goal_applied', 'audience_targeted'];\nstringFields.forEach(field => {\n  if (data[field] && typeof data[field] !== 'string') {\n    console.log(`⚠️ Converting ${field} from ${typeof data[field]} to string`);\n    data[field] = String(data[field]);\n  }\n  \n  // Trim whitespace from string fields\n  if (typeof data[field] === 'string') {\n    data[field] = data[field].trim();\n  }\n});\n\n// Platform validation with case-insensitive matching - AUTO-FIX CASE ISSUES\nconst allowedPlatforms = [\n  'facebook', 'instagram', 'linkedin', 'twitter', \n  'threads', 'tiktok', 'youtube', 'pinterest', \n  'reddit', 'bluesky'\n];\n\n// Convert platform to lowercase for comparison\nconst platformLower = data.platform.toLowerCase().trim();\nconst matchedPlatform = allowedPlatforms.find(p => p.toLowerCase() === platformLower);\n\nif (!matchedPlatform) {\n  throw new Error(`Unsupported platform: ${data.platform}. Allowed platforms: ${allowedPlatforms.join(', ')}`);\n}\n\n// Use the properly cased platform name\nif (data.platform !== matchedPlatform) {\n  console.log(`⚠️ Normalizing platform name from \"${data.platform}\" to \"${matchedPlatform}\"`);\n  data.platform = matchedPlatform;\n}\n\n// Validate field lengths - WARN BUT DON'T ERROR\nif (data.post_text.length > 280 && ['twitter', 'x'].includes(data.platform)) {\n  console.log('⚠️ Post text exceeds 280 characters for Twitter/X platform');\n}\n\nif (data.post_text.length > 2000 && data.platform === 'linkedin') {\n  console.log('⚠️ Post text exceeds 2000 characters for LinkedIn');\n}\n\n// Remove any extra fields that might cause issues\nconst allowedFields = [...requiredFields, 'character_count'];\nObject.keys(data).forEach(key => {\n  if (!allowedFields.includes(key)) {\n    console.log(`⚠️ Removing unexpected field: ${key}`);\n    delete data[key];\n  }\n});\n\n// Final validation - CRITICAL CHECKS\nif (data.post_text.trim().length === 0) {\n  throw new Error('post_text cannot be empty after trimming');\n}\n\nif (data.suggested_hashtags.length === 0) {\n  throw new Error('No valid hashtags remain after processing');\n}\n\nconsole.log('✅ Validation completed successfully with auto-fixes applied');\nreturn { json: data };"
      },
      "typeVersion": 2
    },
    {
      "id": "bbd38c8a-d211-45b3-aede-c2d9263b76ce",
      "name": "通过 GetLate API 发布/草稿(无图片,Bluesky)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2816,
        1904
      ],
      "parameters": {
        "url": "https://getlate.dev/api/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"content\": \"{{ $('Validate JSON (Bluesky)').item.json.post_text }}\",\n  \"platforms\": [\n    {\"platform\": \"bluesky\", \"accountId\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.bluesky_account_id }}\"}\n  ],\n  \"publishNow\": {{ ! $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }},\n  \"isDraft\": {{ $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }},\n  \"visibility\": \"public\",\n\"tags\": {{ JSON.stringify(Object.values($('Validate JSON (Bluesky)').item.json.suggested_hashtags || {})) }}\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "H8YYn03WwhfY88El",
          "name": "Bearer YOUR_TOKEN_HERE - GetLate"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f6afcdbe-56b1-45ec-92a7-fefd4a4fd973",
      "name": "生成帖子图片(Bluesky)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2816,
        1728
      ],
      "parameters": {
        "url": "https://api-inference.huggingface.co/models/stabilityai/stable-diffusion-xl-base-1.0",
        "method": "POST",
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        },
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "inputs",
              "value": "={{ $json.image_prompt }}"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "image/png"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "gv5zYpvHHxYv727R",
          "name": "Bearer YOUR_TOKEN_HERE account - Hugging Face"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "d58a2507-cc2c-4324-914f-2826105dd6ce",
      "name": "通过 GetLate API 发布/草稿(Bluesky)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3648,
        1728
      ],
      "parameters": {
        "url": "https://getlate.dev/api/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"content\": \"{{ $('Validate JSON (Bluesky)').item.json.post_text }}\",\n  \"platforms\": [\n    { \"platform\": \"bluesky\", \"accountId\": \"{{ $('Set SMCG Custom Parameters & Settings').item.json.bluesky_account_id }}\" }\n  ],\n  \"publishNow\": {{ !$('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }},\n  \"isDraft\": {{ $('Set SMCG Custom Parameters & Settings').item.json.post_as_draft }},\n  \"visibility\": \"public\",\n  \"tags\": \"{{ $('Validate JSON (Bluesky)').item.json.suggested_hashtags }}\",\n  \"mediaItems\": [\n    {\n      \"type\": \"image\",\n      \"url\": \"{{ $json.data.url }}\",\n      \"filename\": \"{{ $json.data.title }}\"\n    }\n  ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth"
      },
      "credentials": {
        "httpBearerAuth": {
          "id": "H8YYn03WwhfY88El",
          "name": "Bearer YOUR_TOKEN_HERE - GetLate"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8aaf4e2b-0944-44d2-9d48-26458e839c40",
      "name": "RSS 源触发器:'#to-share-instagram'",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        784,
        624
      ],
      "parameters": {
        "feedUrl": "https://your-wallabag.instance/feed/wallabag/00000000000000/tags/t:your-tag-here",
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8f9162e4-5a4f-427e-a033-5ecbc10a3522",
      "name": "设置平台(Instagram)",
      "type": "n8n-nodes-base.set",
      "position": [
        1104,
        624
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b9b8246a-695e-4d14-ace8-f194a0d1fc9f",
              "name": "platform",
              "type": "string",
              "value": "=instagram"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2f612709-3759-4dc5-b90a-c80261a4ef65",
      "name": "Markdown:转换文章内容(Instagram)",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1456,
        624
      ],
      "parameters": {
        "html": "={{ $('RSS Feed Trigger: \\'#to-share-instagram\"').item.json.content }}",
        "options": {},
        "destinationKey": "content_markdown"
      },
      "typeVersion": 1
    },
    {
      "id": "c5c19482-43e5-42bc-96ce-11712027a87c",
      "name": "存储文章内容(Instagram)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1792,
        624
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "RSS Feed Store - Wallabag RSS Feed Aggregator"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "title": "={{ $('RSS Feed Trigger: \\'#to-share-instagram\"').item.json.title }}",
            "author": "={{ $('RSS Feed Trigger: \\'#to-share-instagram\"').item.json.author }}",
            "feed_id": "={{ $('RSS Feed Trigger: \\'#to-share-instagram\"').item.json.id }}",
            "platform": "={{ $('Set Platform (Instagram)').item.json.platform.toLowerCase() }}",
            "is_posted": 0,
            "article_url": "={{ $('RSS Feed Trigger: \\'#to-share-instagram\"').item.json.link }}",
            "content_markdown": "={{ $json.content_markdown }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "b4a579ba-7468-4ab3-8bdc-4a420ce753dc",
      "name": "Markdown:转换文章内容(LinkedIn)",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1456,
        240
      ],
      "parameters": {
        "html": "={{ $('RSS Feed Trigger: \\'#to-share-linkedin\\'').item.json.content }}",
        "options": {},
        "destinationKey": "content_markdown"
      },
      "typeVersion": 1
    },
    {
      "id": "c0e87b09-4977-417b-ae46-3982f5919f23",
      "name": "Markdown:转换文章内容(Bluesky)",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1456,
        432
      ],
      "parameters": {
        "html": "={{ $('RSS Feed Trigger: \\'#to-share-bluesky\\'').item.json.content }}",
        "options": {},
        "destinationKey": "content_markdown"
      },
      "typeVersion": 1
    },
    {
      "id": "48730f3c-4067-4e43-9dac-0d6d2b294fbc",
      "name": "存储文章内容(Bluesky)",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1792,
        432
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "appobCAkHxBSApdQ3",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3",
          "cachedResultName": "RSS Feed Store - Wallabag RSS Feed Aggregator"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl8jsh0nMt3F5mo5",
          "cachedResultUrl": "https://airtable.com/appobCAkHxBSApdQ3/tbl8jsh0nMt3F5mo5",
          "cachedResultName": "RSS Feed - Content Store"
        },
        "columns": {
          "value": {
            "title": "={{ $('RSS Feed Trigger: \\'#to-share-bluesky\\'').item.json.title }}",
            "author": "={{ $('RSS Feed Trigger: \\'#to-share-bluesky\\'').item.json.author }}",
            "feed_id": "={{ $('RSS Feed Trigger: \\'#to-share-bluesky\\'').item.json.id }}",
            "platform": "={{ $('Set Platform (Bluesky)').item.json.platform.toLowerCase() }}",
            "is_posted": 0,
            "article_url": "={{ $('RSS Feed Trigger: \\'#to-share-bluesky\\'').item.json.link }}",
            "character_count": 0,
            "content_markdown": "={{ $json.content_markdown }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": true,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "feed_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "feed_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "article_url",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "article_url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "title",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "title",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "author",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "author",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "content_markdown",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "content_markdown",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "is_posted",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "is_posted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "platform",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "platform",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_text",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "post_text",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "suggested_hashtags",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "suggested_hashtags",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "cta_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "cta_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "tone_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "tone_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "goal_applied",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "goal_applied",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "audience_ targeted",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "audience_ targeted",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "character_count",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "character_count",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_prompt",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_prompt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_filename",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_filename",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "image_link",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "image_link",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "D9AiOyADd2P9e8YQ",
          "name": "Airtable Personal Access Token account 2"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "644e2b17-efb1-4b1d-ad53-6ad58022b894",
      "name": "调整图片尺寸(Bluesky)",
      "type": "n8n-nodes-base.editImage",
      "position": [
        3040,
        1728
      ],
      "parameters": {
        "width": 1080,
        "height": 1080,
        "options": {
          "format": "webp"
        },
        "operation": "resize"
      },
      "typeVersion": 1
    },
    {
      "id": "92a532cc-8958-4a18-ad88-c82eccfd1d5b",
      "name": "过滤平台重复项",
      "type": "n8n-nodes-base.code",
      "position": [
        1520,
        1504
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst seenPlatforms = new Set();\nconst uniqueItems = [];\n\nitems.forEach(item => {\n  const platform = item.json.platform;\n  \n  // If we haven't seen this platform yet, add it to results\n  if (platform && !seenPlatforms.has(platform)) {\n    seenPlatforms.add(platform);\n    uniqueItems.push(item);\n  }\n});\n\nreturn uniqueItems;"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {
    "Set Post Schedule": [
      {
        "json": {
          "Hour": "12",
          "Year": "2025",
          "Month": "October",
          "Minute": "35",
          "Second": "49",
          "Timezone": "America/New_York (UTC-04:00)",
          "timestamp": "2025-10-23T12:35:49.004-04:00",
          "Day of week": "Thursday",
          "Day of month": "23",
          "Readable date": "October 23rd 2025, 12:35:49 pm",
          "Readable time": "12:35:49 pm"
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "94f11dd1-823a-4f0d-826b-dddf1112ebd9",
  "connections": {
    "Bluesky SMCG": {
      "main": [
        [
          {
            "node": "Validate JSON (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn SMCG": {
      "main": [
        [
          {
            "node": "Validate JSON (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Platform": {
      "main": [
        [
          {
            "node": "LinkedIn SMCG Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Bluesky SMCG Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Instagram SMCG Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram SMCG": {
      "main": [
        [
          {
            "node": "Validate JSON (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull New Articles": {
      "main": [
        [
          {
            "node": "Filter Platform Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Post Schedule": {
      "main": [
        [
          {
            "node": "Set SMCG Custom Parameters & Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Bluesky SMCG Prompt": {
      "main": [
        [
          {
            "node": "Bluesky SMCG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LinkedIn SMCG Prompt": {
      "main": [
        [
          {
            "node": "LinkedIn SMCG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram SMCG Prompt": {
      "main": [
        [
          {
            "node": "Instagram SMCG",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resize Image (Bluesky)": {
      "main": [
        [
          {
            "node": "Convert to Base64 (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Platform (Bluesky)": {
      "main": [
        [
          {
            "node": "Markdown: Convert Article Content (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Platform (LinkedIn)": {
      "main": [
        [
          {
            "node": "Markdown: Convert Article Content (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate JSON (Bluesky)": {
      "main": [
        [
          {
            "node": "Check For Image Prompt (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Platform (Instagram)": {
      "main": [
        [
          {
            "node": "Markdown: Convert Article Content (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate JSON (LinkedIn)": {
      "main": [
        [
          {
            "node": "Check For Image Prompt (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model (Bluesky)": {
      "ai_languageModel": [
        [
          {
            "node": "Bluesky SMCG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Validate JSON (Instagram)": {
      "main": [
        [
          {
            "node": "Generate Post Image (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Platform Duplicates": {
      "main": [
        [
          {
            "node": "Check Platform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model (LinkedIn)": {
      "ai_languageModel": [
        [
          {
            "node": "LinkedIn SMCG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Base64 (Bluesky)": {
      "main": [
        [
          {
            "node": "Store Image on Imgbb (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model (Instagram)": {
      "ai_languageModel": [
        [
          {
            "node": "Instagram SMCG",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Base64 (LinkedIn)": {
      "main": [
        [
          {
            "node": "Store Image on Imgbb (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to Base64 (Instagram)": {
      "main": [
        [
          {
            "node": "Store Image on Imgbb (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Post Image (Bluesky)": {
      "main": [
        [
          {
            "node": "Resize Image (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Post Image (LinkedIn)": {
      "main": [
        [
          {
            "node": "Convert to Base64 (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Image on Imgbb (Bluesky)": {
      "main": [
        [
          {
            "node": "Post/Draft via GetLate API (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Post Image (Instagram)": {
      "main": [
        [
          {
            "node": "Convert to Base64 (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Image on Imgbb (LinkedIn)": {
      "main": [
        [
          {
            "node": "Post/Draft via GetLate API (LinkedIn)3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check For Image Prompt (Bluesky)": {
      "main": [
        [
          {
            "node": "Generate Post Image (Bluesky)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post/Draft via GetLate API (No Image, Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store Image on Imgbb (Instagram)": {
      "main": [
        [
          {
            "node": "Post/Draft via GetLate API (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check For Image Prompt (LinkedIn)": {
      "main": [
        [
          {
            "node": "Generate Post Image (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post/Draft via GetLate API (No Image, LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post/Draft via GetLate API (Bluesky)": {
      "main": [
        [
          {
            "node": "Store Generated Post Content (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Trigger: '#to-share-bluesky'": {
      "main": [
        [
          {
            "node": "Set Platform (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set SMCG Custom Parameters & Settings": {
      "main": [
        [
          {
            "node": "Pull New Articles",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post/Draft via GetLate API (Instagram)": {
      "main": [
        [
          {
            "node": "Store Generated Post Content (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post/Draft via GetLate API (LinkedIn)3": {
      "main": [
        [
          {
            "node": "Store Generated Post Content (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Trigger: '#to-share-linkedin'": {
      "main": [
        [
          {
            "node": "Set Platform (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "RSS Feed Trigger: '#to-share-instagram\"": {
      "main": [
        [
          {
            "node": "Set Platform (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown: Convert Article Content (Bluesky)": {
      "main": [
        [
          {
            "node": "Store Article Content (Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown: Convert Article Content (LinkedIn)": {
      "main": [
        [
          {
            "node": "Store Article Content (LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Markdown: Convert Article Content (Instagram)": {
      "main": [
        [
          {
            "node": "Store Article Content (Instagram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post/Draft via GetLate API (No Image, Bluesky)": {
      "main": [
        [
          {
            "node": "Store Generated Post Content (No Image, Bluesky)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post/Draft via GetLate API (No Image, LinkedIn)": {
      "main": [
        [
          {
            "node": "Store Generated Post Content (No Image, LinkedIn)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 社交媒体, 多模态 AI

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流