Meta広告ライブラリをスクレイピングし、Geminiで動画広告を分析し、データをGoogle Sheetsに保存

上級

これはAI, Marketing分野の自動化ワークフローで、24個のノードを含みます。主にSet, Code, Sort, Wait, Limitなどのノードを使用、AI技術を活用したスマート自動化を実現。 GeminiでMeta広告ライブラリの動画広告を分析し、結果をGoogle Sheetsに保存する

前提条件
  • ターゲットAPIの認証情報が必要な場合あり
  • Google Sheets API認証情報
  • Google Gemini API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "Yfi6wLGrS1JxYNeN",
  "meta": {
    "instanceId": "e57685206b2ffad6bb88e99d036876c83d8c4db170e93fa79e832ec88de4560b",
    "templateCredsSetupCompleted": true
  },
  "name": "Scrape Meta Ad Library and analyze Video Ads with Gemini and store data to Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "30c7e140-fafe-4ae7-9de9-a969857967d5",
      "name": "「ワークフローをテスト」をクリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -100,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d38614bf-bbcc-4619-bcc4-cb42a80a1148",
      "name": "設定",
      "type": "n8n-nodes-base.set",
      "position": [
        100,
        380
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "7bb34d03-5cf0-497a-bead-87df84661ffd",
      "name": "アイテムをループ処理",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1960,
        380
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "d23fed5b-f230-4511-b4ea-76393617e740",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        3460,
        700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e56dbefc-458f-40db-850e-f243740c5651",
      "name": "プロンプトをクリーンアップ",
      "type": "n8n-nodes-base.code",
      "position": [
        300,
        380
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "6dbce614-58ce-4389-be16-a117ba5b6032",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "1f26b54d-d0c5-483b-b3cf-e5e971128f2e",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3260,
        300
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "e554fcd8-90f0-4f38-ad78-1b08f4cd4a82",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3360,
        860
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "96359003-2cd3-4ebf-90aa-8be4c44f1949",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3640,
        320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3e3c13b8-063c-4e0d-99dd-93902646c197",
      "name": "データを保存",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3860,
        440
      ],
      "parameters": {},
      "typeVersion": 4.5
    },
    {
      "id": "717fa264-afc3-4e2f-a48a-f3101e3ccf97",
      "name": "Structured Output Parsing Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        3480,
        440
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1.7
    },
    {
      "id": "a61b82eb-21bf-4a0a-8863-e3fd3321c280",
      "name": "アップロード処理完了まで待機",
      "type": "n8n-nodes-base.wait",
      "position": [
        3020,
        440
      ],
      "webhookId": "a0e5485e-3f3c-47c6-ab19-9b9dc6158ab5",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "b3a0113f-a5e4-45e6-b093-a61ec5933446",
      "name": "Gemini に値を渡す",
      "type": "n8n-nodes-base.set",
      "position": [
        2780,
        440
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "590f1356-4e6a-4e2a-aef4-9ec3c421b3bf",
      "name": "Gemini に動画をアップロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2580,
        440
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "88d88a31-4137-40e9-8470-4fb247cfac27",
      "name": "Gemini で動画を分析",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3240,
        440
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "2168902d-1a0c-4807-9e88-08b9349ba19a",
      "name": "ファイルをダウンロード",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2200,
        440
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "4fc6c731-ac04-4b33-a7df-919bff17ddc1",
      "name": "ファイルタイプを動画に変更",
      "type": "n8n-nodes-base.code",
      "position": [
        2380,
        440
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9cb29e1e-be52-4f7d-90aa-c930d283d442",
      "name": "Apify でMeta広告ライブラリをスクレイピング",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        500,
        380
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "59a198fa-3859-41a0-806b-280e9b9dd72a",
      "name": "関連フィールドを渡す",
      "type": "n8n-nodes-base.set",
      "position": [
        1720,
        380
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ea30c850-3ae8-455e-9681-f42f59681a8a",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3660,
        700
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "ac3ae0cd-8dda-4b38-858e-d3f4f21f7e5c",
      "name": "稼働日数を計算",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        380
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "28d391b3-d708-43a1-9d4b-28da08bc8175",
      "name": "リーチまたは稼働日数でソート",
      "type": "n8n-nodes-base.sort",
      "position": [
        960,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "82f7bdd7-5d20-4431-9772-4255e21ea963",
      "name": "動画広告のみをフィルタリング",
      "type": "n8n-nodes-base.filter",
      "position": [
        1200,
        380
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "b0a7273e-f540-49e9-98c2-f0437ea2749d",
      "name": "分析対象の動画数を制限",
      "type": "n8n-nodes-base.limit",
      "position": [
        1460,
        380
      ],
      "parameters": {},
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "79ac2590-6d68-4f1d-adb5-2c2fb5541f90",
  "connections": {
    "d38614bf-bbcc-4619-bcc4-cb42a80a1148": {
      "main": [
        [
          {
            "node": "e56dbefc-458f-40db-850e-f243740c5651",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3e3c13b8-063c-4e0d-99dd-93902646c197": {
      "main": [
        [
          {
            "node": "7bb34d03-5cf0-497a-bead-87df84661ffd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e56dbefc-458f-40db-850e-f243740c5651": {
      "main": [
        [
          {
            "node": "9cb29e1e-be52-4f7d-90aa-c930d283d442",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2168902d-1a0c-4807-9e88-08b9349ba19a": {
      "main": [
        [
          {
            "node": "4fc6c731-ac04-4b33-a7df-919bff17ddc1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7bb34d03-5cf0-497a-bead-87df84661ffd": {
      "main": [
        [],
        [
          {
            "node": "2168902d-1a0c-4807-9e88-08b9349ba19a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "59a198fa-3859-41a0-806b-280e9b9dd72a": {
      "main": [
        [
          {
            "node": "7bb34d03-5cf0-497a-bead-87df84661ffd",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "82f7bdd7-5d20-4431-9772-4255e21ea963": {
      "main": [
        [
          {
            "node": "b0a7273e-f540-49e9-98c2-f0437ea2749d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b3a0113f-a5e4-45e6-b093-a61ec5933446": {
      "main": [
        [
          {
            "node": "a61b82eb-21bf-4a0a-8863-e3fd3321c280",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "590f1356-4e6a-4e2a-aef4-9ec3c421b3bf": {
      "main": [
        [
          {
            "node": "b3a0113f-a5e4-45e6-b093-a61ec5933446",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b0a7273e-f540-49e9-98c2-f0437ea2749d": {
      "main": [
        [
          {
            "node": "59a198fa-3859-41a0-806b-280e9b9dd72a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4fc6c731-ac04-4b33-a7df-919bff17ddc1": {
      "main": [
        [
          {
            "node": "590f1356-4e6a-4e2a-aef4-9ec3c421b3bf",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d23fed5b-f230-4511-b4ea-76393617e740": {
      "ai_languageModel": [
        [
          {
            "node": "717fa264-afc3-4e2f-a48a-f3101e3ccf97",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "ea30c850-3ae8-455e-9681-f42f59681a8a": {
      "ai_outputParser": [
        [
          {
            "node": "717fa264-afc3-4e2f-a48a-f3101e3ccf97",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "88d88a31-4137-40e9-8470-4fb247cfac27": {
      "main": [
        [
          {
            "node": "717fa264-afc3-4e2f-a48a-f3101e3ccf97",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ac3ae0cd-8dda-4b38-858e-d3f4f21f7e5c": {
      "main": [
        [
          {
            "node": "28d391b3-d708-43a1-9d4b-28da08bc8175",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a61b82eb-21bf-4a0a-8863-e3fd3321c280": {
      "main": [
        [
          {
            "node": "88d88a31-4137-40e9-8470-4fb247cfac27",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "28d391b3-d708-43a1-9d4b-28da08bc8175": {
      "main": [
        [
          {
            "node": "82f7bdd7-5d20-4431-9772-4255e21ea963",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "717fa264-afc3-4e2f-a48a-f3101e3ccf97": {
      "main": [
        [
          {
            "node": "3e3c13b8-063c-4e0d-99dd-93902646c197",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9cb29e1e-be52-4f7d-90aa-c930d283d442": {
      "main": [
        [
          {
            "node": "ac3ae0cd-8dda-4b38-858e-d3f4f21f7e5c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "30c7e140-fafe-4ae7-9de9-a969857967d5": {
      "main": [
        [
          {
            "node": "d38614bf-bbcc-4619-bcc4-cb42a80a1148",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

上級 - 人工知能, マーケティング

有料ですか?

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

ワークフロー情報
難易度
上級
ノード数24
カテゴリー2
ノードタイプ14
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34