8
n8n 中文网amn8n.com

AI驱动的Instagram内容再利用

中级

这是一个自动化工作流,包含 15 个节点。主要使用 Set, HttpRequest, GoogleSheets, ManualTrigger, SplitInBatches 等节点。 基于AI的Instagram内容再利用,集成OpenAI GPT-4O和Perplexity研究

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "73e3c0fd395bfd0d194601f37f29fe40e0317103ab5899d92df39eaef2eb4c87",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "802db012-446f-4573-b6bd-b71039a073e1",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        1232,
        2960
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "06a7a587-1c0f-4745-a338-5224e9f46fda",
      "name": "获取 Instagram 用户帖子1",
      "type": "n8n-nodes-scrape-creators.scrapeCreators",
      "position": [
        2016,
        2976
      ],
      "parameters": {
        "limit": 1,
        "handle": "={{ $json['Instagram Handles'] }}",
        "operation": "getInstagramUserPosts",
        "requestOptions": {}
      },
      "credentials": {
        "scrapeCreatorsApi": {
          "id": "499fH7jAxvGPHHnE",
          "name": "Scrape Creators account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "3a275a3e-2ecf-4a34-843d-925851cb0ee0",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        2192,
        2976
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "d43ea994-eb0c-4634-a0d7-9626329e0500",
              "name": "items[0].video_versions[0].url",
              "type": "string",
              "value": "={{ $json.items[0].video_versions[0].url }}"
            },
            {
              "id": "6b19de57-7cb0-4ad0-a310-75be63b1d2f2",
              "name": "items[0].video_versions[2].url",
              "type": "string",
              "value": "={{ $json.items[0].video_versions[2].url }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ffff935e-28d5-4c0b-acaf-55793a35eba4",
      "name": "筛选和生成建议",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "onError": "continueRegularOutput",
      "position": [
        2784,
        2976
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a helpful, intelligent admin assistant."
            },
            {
              "content": "I run an AI & automation Instagram channel. I'm looking through news archives to find mentions of tools that I can repurpose into content for my channel.\n\nYour task is to take as input a transcript of a news archive, and then determine if the transcription is about a tool, a technology, or AI.\n\nIf so, you'll identify the tools, then write a list of step-by-step instructions to use the tool easily (ideally for free or for low cost), and one suggestion on exactly how to make this content more palatable to an AI automation audience.\n\nReturn your output in JSON using this format:\n\n{\n  \"verdict\":\"true or false\",\n  \"tools\":[\"list\",\"of\",\"tools\",\"or\",\"resources\"],\n  \"stepByStep\":\"Detailed instructions on how to use the tool(s).\",\n  \"suggestion\":\"Comprehensive, in-depth suggestions on how to make this content more interesting and palatable to my audience (AI automation).\",\n  \"searchPrompt\":\"A short search prompt we'll use to look up the service. Write it like '{toolName}, the {typeOfTool}'\"\n}\n\nIf verdict is \"false\", leave the rest of the fields empty."
            },
            {
              "content": "={\"transcript\":\"{{ $json.text }}\"}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "kcZxf0FA03D9xVdd",
          "name": "Sycorda"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.6
    },
    {
      "id": "cd8a1d86-d417-4f4e-a24a-71db9a3660aa",
      "name": "下载视频",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        2400,
        2976
      ],
      "parameters": {
        "url": "={{ $json.items[0].video_versions[0].url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "889524af-327d-40d1-9fc0-d8755710b04d",
      "name": "转录视频",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "onError": "continueRegularOutput",
      "position": [
        2592,
        2976
      ],
      "parameters": {
        "options": {},
        "resource": "audio",
        "operation": "transcribe"
      },
      "credentials": {
        "openAiApi": {
          "id": "kcZxf0FA03D9xVdd",
          "name": "Sycorda"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.6
    },
    {
      "id": "3cc5eb2c-763a-44d3-a639-319879706fa8",
      "name": "搜索 Perplexity",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        3136,
        2976
      ],
      "parameters": {
        "url": "https://api.perplexity.ai/chat/completions",
        "method": "POST",
        "options": {
          "redirect": {
            "redirect": {}
          }
        },
        "jsonBody": "={\n  \"model\": \"sonar-pro\",\n  \"messages\": [\n    {\n      \"role\": \"system\",\n      \"content\": \"Be precise and concise.\"\n    },\n    {\n      \"role\": \"user\",\n      \"content\": \"Tell me three interesting (peculiar) things about {{ $json.message.content.searchPrompt }}\"\n    }\n  ]\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "Bearer API KEY"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "7a164120-7e6b-4785-bd3b-1df7e688b5cd",
      "name": "编写新脚本",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "onError": "continueErrorOutput",
      "position": [
        3344,
        2976
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "GPT-4O"
        },
        "options": {
          "temperature": 0.7
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a helpful, intelligent writing assistant."
            },
            {
              "content": "I run an AI & automation Instagram channel.\n\nMy editors would like to make a new video. They've found an interesting tool or technology, compiled a step-by-step guide on how to use it, done some searching on the Internet to find some interesting things about it, wrote a rough draft about it, and we also had our chief editor write concrete suggestions for how to make the content better.\n\nYour task is to take as input all of these things, and then write a new, high quality script for us to feature.\n\nReturn your output in JSON using this format:\n\n{\n  \"script\":\"Your script goes here (~100 words).\n}\n\nRules:\n- Use a casual, spartan tone of voice. No frills. Be straightforward, and don't use poetic language.\n- End the script with a call to action like \"Want {thing}? Just comment {keyword} and I'll send it straight to your DMs\",\n- Add newlines as \\n between sentences."
            },
            {
              "content": "={\n  \"toolNames\":\"Speechma\",\n  \"roughDraftScript\":\"Hey there. So, I just wanted to let you know about a AI text-to-speech generator that has recently become available. It’s doesn’t cost anything at all.\\n\\nIt has a lot of voices! And the best part is you don’t need to sign up for an account in order to use it.\\n\\nThe process is really simple, too. You just go the site and type whatever you want converted into speech. There are lots of voices as well.\\n\\nIf this sounds interesting to you, I’d highly recommend giving it a try for yourself. Just leave a comment saying \"texttospeech,\" and I’ll make sure to send you the link so you can check it out firsthand.\",\n  \"perplexityOutput\": \"Here are three interesting things about Speechma, the AI text-to-speech tool:\\n\\n1. Speechma offers over 400 premium AI voices for text-to-speech conversion, allowing users to find the perfect voice for any project[1].\\n\\n2. The platform provides unlimited free usage with no restrictions on the number of conversions, which is unusual for a premium text-to-speech service[1].\\n\\n3. Speechma grants users commercial rights to use the generated audio for any purpose, including YouTube videos, TikTok content, and business presentations[1].\",\n  \"stepByStepGuide\":\"1. Visit the Speechma website.\\n2. Enter or paste your text into the provided text box.\\n3. Browse through the available 400+ voices and select one that fits your needs.\\n4. Choose the desired language from the 60 supported options.\\n5. Click the 'Generate' button to create your AI-generated speech.\\n6. Download or use your AI-generated speech as needed for projects like YouTube videos or TikToks.\",\n  \"suggestionsForImprovement\":\"Create a short tutorial video showing how to use Speechma, emphasizing its free nature and ease of use. Highlight its unlimited features and vast voice selection. Consider doing a voice comparison test using Speechma versus other popular tools. Discuss potential use cases such as content creation for social media, especially focusing on platforms like Instagram and TikTok, highlighting the benefit of rapid content creation using AI automation.\"\n}"
            },
            {
              "role": "assistant",
              "content": "={\n  \"script\":\"Hey—there’s a completely new AI text to speech generator that’s just as good as ElevenLabs, but FREE.\\nIt allows you to choose from over 400 voices, it supports 60 languages, and it’s all completely unlimited with no signup required.\\nJust head over to this website\\nPaste your text\\nChoose one of the voices\\nAnd click generate\\nThat’s it! Your AI speech is now ready to use.\\nYou can use this voice for YouTube videos, TikToks, or whatever you like.\\nSo go try it yourself.\\nJust Comment \"speech\" and I’ll share the link with you.\"\n}"
            },
            {
              "content": "={\n  \"toolNames\":\"{{ $('Filter & Generate Suggestions').item.json.message.content.tools.join() }}\",\n  \"roughDraftScript\":\"{{ $('Transcribe Video').all().first().json.text }}\",\n  \"perplexityOutput\": \"{{ $json.choices[0].message.content }}\",\n  \"stepByStepGuide\":\"{{ $('Filter & Generate Suggestions').item.json.message.content.stepByStep }}\",\n  \"suggestionsForImprovement\":\"{{ $('Filter & Generate Suggestions').item.json.message.content.suggestion }}\"\n}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "kcZxf0FA03D9xVdd",
          "name": "Sycorda"
        }
      },
      "retryOnFail": true,
      "typeVersion": 1.6
    },
    {
      "id": "daf8f870-433b-4190-812f-a13f3d62ea75",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1744,
        2960
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "1600e14f-230d-473f-af0f-5319d0f833d0",
      "name": "获取表格中的行数据",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1456,
        2960
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 1977263029,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tH-0MOe-Y_BsB3coqtFhhmZVHmchD0jTH8A3w1he3o8/edit#gid=1977263029",
          "cachedResultName": "profiles"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1tH-0MOe-Y_BsB3coqtFhhmZVHmchD0jTH8A3w1he3o8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tH-0MOe-Y_BsB3coqtFhhmZVHmchD0jTH8A3w1he3o8/edit?usp=drivesdk",
          "cachedResultName": "Insta profiles for Phantom"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GK3DNFmawp2s2qCA",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "055b4ff9-ab28-4ef9-bf38-84694cb9d66e",
      "name": "更新条目2",
      "type": "n8n-nodes-base.googleSheets",
      "onError": "continueRegularOutput",
      "position": [
        3856,
        2960
      ],
      "parameters": {
        "columns": {
          "value": {
            "id": "={{ $('Get an instagram user s posts1').item.json.items[0].id }}",
            "caption": "={{ $('Get an instagram user s posts1').item.json.items[0].caption.text }}",
            "Duration": "={{ $('Get an instagram user s posts1').item.json.items[0].image_versions2.scrubber_spritesheet_info_candidates.default.video_length }}",
            "videoUrl": "={{ $('Get an instagram user s posts1').item.json.items[0].video_versions[0].url }}",
            "Username ": "={{ $('Get row(s) in sheet1').item.json['Instagram Handles'] }}",
            "timeStamp": "={{ new Date($('Get an instagram user s posts1').item.json.items[0].caption.created_at * 1000).toISOString() }}\n",
            "likesCount": "={{ $('Get an instagram user s posts1').item.json.items[0].like_count }}",
            "commentcount": "={{ $('Get an instagram user s posts1').item.json.items[0].comment_count }}",
            "original Script": "={{ $('Transcribe Video').item.json.text }}",
            "videoViewsCount": "={{ $('Get an instagram user s posts1').item.json.items[0].play_count }}",
            "rewritten Script": "={{ $json.message.content.script }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "id",
              "defaultMatch": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "timeStamp",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "timeStamp",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "caption",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "caption",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "url",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "displayName": "url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "commentcount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "commentcount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "videoUrl",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "videoUrl",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "likesCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "likesCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "videoViewsCount",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "videoViewsCount",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Username ",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Username ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Duration",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Duration",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "original Script",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "original Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "rewritten Script",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "rewritten Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "style",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "style",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Updated",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Updated",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": 375581874,
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tH-0MOe-Y_BsB3coqtFhhmZVHmchD0jTH8A3w1he3o8/edit#gid=375581874",
          "cachedResultName": "pahtom output"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1tH-0MOe-Y_BsB3coqtFhhmZVHmchD0jTH8A3w1he3o8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1tH-0MOe-Y_BsB3coqtFhhmZVHmchD0jTH8A3w1he3o8/edit?usp=drivesdk",
          "cachedResultName": "Insta profiles for Phantom"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GK3DNFmawp2s2qCA",
          "name": "Google Sheets account"
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.5
    },
    {
      "id": "cf5a12ed-50a5-4b50-acd0-eb3559923d0a",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1520,
        2608
      ],
      "parameters": {
        "width": 496,
        "height": 304,
        "content": "步骤 1:数据输入和视频检索"
      },
      "typeVersion": 1
    },
    {
      "id": "92b863bc-2148-4ee2-8fad-f25f50115a67",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2208,
        2688
      ],
      "parameters": {
        "width": 496,
        "height": 240,
        "content": "步骤 2:视频处理和 AI 转录"
      },
      "typeVersion": 1
    },
    {
      "id": "865a30e2-c990-4c8b-8580-cd334dcc47c0",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2864,
        2672
      ],
      "parameters": {
        "width": 576,
        "height": 256,
        "content": "步骤 3:AI 内容分析和增强"
      },
      "typeVersion": 1
    },
    {
      "id": "5e0e63b4-efde-41d9-bf77-c25d6b33a7cd",
      "name": "便签 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3632,
        2688
      ],
      "parameters": {
        "width": 448,
        "height": 240,
        "content": "步骤 4:数据存储和循环管理"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Download Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Video": {
      "main": [
        [
          {
            "node": "Transcribe Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Get an instagram user s posts1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Entries2": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Transcribe Video": {
      "main": [
        [
          {
            "node": "Filter & Generate Suggestions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write New Script": {
      "main": [
        [
          {
            "node": "Update Entries2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Perplexity": {
      "main": [
        [
          {
            "node": "Write New Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter & Generate Suggestions": {
      "main": [
        [
          {
            "node": "Search Perplexity",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get an instagram user s posts1": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get row(s) in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级

需要付费吗?

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

工作流信息
难度等级
中级
节点数量15
分类-
节点类型8
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Hassan

Hassan

@sycorda

AI Automation Strategist. I build AI agents that increase your revenue while reducing costs.

外部链接
在 n8n.io 查看

分享此工作流