Apifyでスクレイピングし、GPT-4oでInstagramの協業チャンスを評価

中級

これはLead Generation, AI Summarization分野の自動化ワークフローで、12個のノードを含みます。主にSet, HttpRequest, ManualTrigger, Agent, LmChatOpenAiなどのノードを使用。 Apify によるスクレイピングと GPT-4o で Instagram での協業リードを評価

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "82533369-cc25-43f8-9698-c852ff0c6feb",
      "name": "ワークフロー実行時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -480,
        440
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d55cb854-75f0-4cfd-98dc-16a1560fcfcd",
      "name": "AIエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        760,
        280
      ],
      "parameters": {
        "text": "=followers: {{ $json.followersCount }} bio: {{ $json.bio }} ",
        "options": {
          "systemMessage": "You are a helpful assistant. I'm lookig for n8n creators to collaborate with. read their bio, and output yes or no if they are a good person for me to reach out to in order to collaborate on a project. I need the follower count to be 2k at leaset. \n\noutput like this. \n\n{\n\t\"lead status\": \"Yes or No\",\n\t\"Reasoning\": \"reasoning for why they are a good or bad lead. \"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2
    },
    {
      "id": "de7abe87-394e-49d1-b049-286ee6d1d477",
      "name": "OpenAIチャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        760,
        480
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "ghJTvay8CvwXDsXz",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "c3ffa5c7-8ebd-4be3-a9f3-2232ecb19c97",
      "name": "構造化出力パーサー",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        940,
        460
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"lead status\": \"Yes or No\",\n\t\"Reasoning\": \"reasoning for why they are a good or bad lead. \"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "ba19cddd-f3e4-4b1f-8c19-c5ebeca3d72a",
      "name": "最近の投稿を検索",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -40,
        440
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/apify~instagram-hashtag-scraper/run-sync-get-dataset-items\n",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"hashtags\": [\n        \"{{ $json.Search_Term }}\"\n    ],\n    \"resultsLimit\": 5,\n    \"resultsType\": \"posts\"\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "yLUXsSPePLOGnHmf",
          "name": "Query Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7e3e1c9a-3bcc-4cbc-880d-e2f8c6440159",
      "name": "検索用語を作成",
      "type": "n8n-nodes-base.set",
      "position": [
        -260,
        300
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "ad5c9a23-7fe0-4ed4-b1e7-d3da417bcb86",
              "name": "Search_Term",
              "type": "string",
              "value": "n8n"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "b34f82fa-0286-4913-abc6-6b35eb155e44",
      "name": "アカウントをスクレイピング",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        200
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/apify~instagram-profile-scraper/run-sync-get-dataset-items\n",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"usernames\": [\n        \"{{ $json.ownerUsername }}\"\n    ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "yLUXsSPePLOGnHmf",
          "name": "Query Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8c2b4344-0b26-4eca-98b7-136593e21c7b",
      "name": "バイオとフォロワー数を設定",
      "type": "n8n-nodes-base.set",
      "position": [
        500,
        400
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "f2cfdd81-ee6c-4b27-885a-6cf21f6efffb",
              "name": "bio",
              "type": "string",
              "value": "={{ $json.biography }}"
            },
            {
              "id": "2761d89a-2de3-4aeb-8a05-fc61a20f9ed4",
              "name": "followersCount",
              "type": "number",
              "value": "={{ $json.followersCount }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3a1e36af-6e34-4ded-85cd-45f7f6788b22",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -160
      ],
      "parameters": {
        "color": 3,
        "width": 780,
        "height": 800,
        "content": "#### 1️⃣ Manual Trigger  \n- **Node**: `When clicking ‘Execute workflow’`  \n- **Use**: Allows you to run the workflow manually while testing.\n\n#### 2️⃣ Define Hashtag  \n- **Node**: `Create Search Term`  \n- **Value**: Sets `\"n8n\"` as the default Instagram hashtag to scan.  \n- You can edit this to any other hashtag you'd like.\n\n#### 3️⃣ Find Recent Posts  \n- **Node**: `Find Recent Posts`  \n- **API**: [Apify Instagram Hashtag Scraper](https://console.apify.com/actors/apify/instagram-hashtag-scraper)  \n- **Auth Setup**:  \n  - Go to your [Apify Console](https://console.apify.com/)  \n  - Click “Create new token”  \n  - In n8n, create a new **HTTP Query Auth** credential  \n    - Set token in the `token` query param (e.g., `?token=yourTokenHere`)  \n  - Choose the credential in this node"
      },
      "typeVersion": 1
    },
    {
      "id": "196cab38-3830-4a0e-8885-f1bc1fc0c57a",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        220,
        -160
      ],
      "parameters": {
        "color": 4,
        "width": 440,
        "height": 800,
        "content": "#### 4️⃣ Scrape Each Profile  \n- **Node**: `Scrape Accounts`  \n- **API**: [Apify Instagram Profile Scraper](https://console.apify.com/actors/apify/instagram-profile-scraper)  \n- **Body**: JSON with `usernames` from the hashtag search  \n- **Note**: Uses the same `httpQueryAuth` credential as the previous node.\n\n#### 5️⃣ Extract Fields  \n- **Node**: `Set bio and follower count`  \n- **What it does**: Extracts `biography` and `followersCount` from the profile JSON and stores them in clean variables for AI input.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d0c8ca4e-519c-452c-b906-7d07782ed166",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        680,
        -160
      ],
      "parameters": {
        "color": 6,
        "width": 420,
        "height": 800,
        "content": "#### 6️⃣ AI Lead Scoring  \n- **Node**: `AI Agent`  \n- **Purpose**: Uses GPT-4o-mini to analyze the bio and follower count  \n- **Prompt Details**:\n#### 7️⃣ AI Model  \n- **Node**: `OpenAI Chat Model`  \n- **Model**: `gpt-4o-mini`  \n- **Credential**: Connect your OpenAI account via API Key.  \n- Go to [OpenAI API Keys](https://platform.openai.com/account/api-keys)  \n- Copy your key and create a new **OpenAI API** credential in n8n.\n\n#### 8️⃣ Output Parser  \n- **Node**: `Structured Output Parser`  \n- **What it does**: Parses the response from the AI into structured JSON for further use \n\n---"
      },
      "typeVersion": 1
    },
    {
      "id": "7c5fb223-1d60-4134-96f8-e3bb03de25e5",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -340
      ],
      "parameters": {
        "width": 1680,
        "content": "## 📬 Need More Help?\n\n**👤 Robert Breen**  \nAutomation Consultant | AI Workflow Designer | n8n Expert  \n📧 [robert@ynteractive.com](mailto:robert@ynteractive.com)  \n🔗 [LinkedIn](https://www.linkedin.com/in/robert-breen-29429625/)\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "b34f82fa-0286-4913-abc6-6b35eb155e44": {
      "main": [
        [
          {
            "node": "8c2b4344-0b26-4eca-98b7-136593e21c7b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ba19cddd-f3e4-4b1f-8c19-c5ebeca3d72a": {
      "main": [
        [
          {
            "node": "b34f82fa-0286-4913-abc6-6b35eb155e44",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "de7abe87-394e-49d1-b049-286ee6d1d477": {
      "ai_languageModel": [
        [
          {
            "node": "d55cb854-75f0-4cfd-98dc-16a1560fcfcd",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "7e3e1c9a-3bcc-4cbc-880d-e2f8c6440159": {
      "main": [
        [
          {
            "node": "ba19cddd-f3e4-4b1f-8c19-c5ebeca3d72a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c3ffa5c7-8ebd-4be3-a9f3-2232ecb19c97": {
      "ai_outputParser": [
        [
          {
            "node": "d55cb854-75f0-4cfd-98dc-16a1560fcfcd",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "8c2b4344-0b26-4eca-98b7-136593e21c7b": {
      "main": [
        [
          {
            "node": "d55cb854-75f0-4cfd-98dc-16a1560fcfcd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "82533369-cc25-43f8-9698-c852ff0c6feb": {
      "main": [
        [
          {
            "node": "7e3e1c9a-3bcc-4cbc-880d-e2f8c6440159",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

中級 - リード獲得, AI要約

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

関連ワークフロー

Google Sheets、SerpAPI、Apify、GPT-4o を使ってローカル企業の連絡先を抽出
Google Sheets、SerpAPI、Apify、GPT-4oを使ってローカルの企業連絡先を取得する
Code
Filter
Summarize
+
Code
Filter
Summarize
18 ノードRobert Breen
リード獲得
ポッドキャストのノート記録器
GPTとGeminiを使用してパフォーマンスデータと結合して、高転化率のMeta広告スクリプトを作成
Set
Code
Merge
+
Set
Code
Merge
16 ノードRobert Breen
リード獲得
Apify スクレイパーと GPT-4o Mini を使って YouTube creators の メールアドレスを抽出
ApifyスクレイピングとGPT-4o Miniを使ってYouTubeクリエイターのメールアドレスを抽出
Set
Http Request
Manual Trigger
+
Set
Http Request
Manual Trigger
12 ノードRobert Breen
AI要約
GPT-4oを使ってOutlookのメールを自動でカラーカテゴリに分類する
GPT-4oを使ってOutlookのメールをカラーリストに自動分類
Set
Manual Trigger
Split In Batches
+
Set
Manual Trigger
Split In Batches
13 ノードRobert Breen
AI要約
初学者データ分析:GPT-4oを使ってGoogleシートで結合・フィルタリング・サマリー
初心者のデータ分析:GPT-4o を使用して Google スプレッドシートで結合、フィルタリング、集計
If
Set
Code
+
If
Set
Code
21 ノードRobert Breen
文書抽出
Indeedの求人情報スクレイピングとGPT-4o-miniを使った自動職業紹介状ジェネレーター
Indeed 求人クリーニングと GPT-4o-mini を用いた自動求職者レターゲンエイター
Set
Http Request
Manual Trigger
+
Set
Http Request
Manual Trigger
10 ノードRobert Breen
マルチモーダルAI
ワークフロー情報
難易度
中級
ノード数12
カテゴリー2
ノードタイプ7
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34