Analyse visuelle Instagram : scraping avec Apify, GPT-5 d'OpenAI et intégration Google Sheets

Intermédiaire

Ceci est unMarket Research, Multimodal AIworkflow d'automatisation du domainecontenant 13 nœuds.Utilise principalement des nœuds comme Filter, SplitOut, HttpRequest, GoogleSheets, ManualTrigger. Analyse visuelle Instagram avec scraping via Apify, analyse GPT-5 d'OpenAI et stockage dans Google Sheets

Prérequis
  • Peut nécessiter les informations d'identification d'authentification de l'API cible
  • Informations d'identification Google Sheets API
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "5432b2ed-adde-4021-b6b3-e75e43bd102c",
      "name": "Lors du clic sur 'Exécuter le workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1152,
        3984
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5c21dec6-09d2-427e-89bc-2a1b809a0d40",
      "name": "Extraire les Détails",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -400,
        3952
      ],
      "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.User }}\"\n    ]\n}",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpQueryAuth"
      },
      "credentials": {
        "httpQueryAuth": {
          "id": "wR5zdRq0CfAhl2yx",
          "name": "Query Auth account"
        }
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "5dd0aa9e-2197-46e4-adcc-c4fed6e0b002",
      "name": "Obtenir la Feuille Google",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -928,
        3984
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dgkznTbUYCi6bzX_K2qRQT0WvmgTtPISWP9iyiLouyA/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1dgkznTbUYCi6bzX_K2qRQT0WvmgTtPISWP9iyiLouyA",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1dgkznTbUYCi6bzX_K2qRQT0WvmgTtPISWP9iyiLouyA/edit?usp=drivesdk",
          "cachedResultName": "Instagram Analysis"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HlBW2puZbuCCq8jJ",
          "name": "Google Sheets account 3"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "f316f5b7-e4be-42fd-8eb4-730cd2a8759c",
      "name": "Filtrer",
      "type": "n8n-nodes-base.filter",
      "position": [
        -672,
        3616
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "33016bc5-0c17-48c0-b77a-67c9b74584ac",
              "operator": {
                "type": "number",
                "operation": "equals"
              },
              "leftValue": "={{ $json.row_number }}",
              "rightValue": 2
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "37cf43bb-4e6b-462f-a34f-e0b4651e033d",
      "name": "Agent IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        352,
        3568
      ],
      "parameters": {
        "text": "=image: data",
        "options": {
          "systemMessage": "to go the url provided. analyze what is in the image. output the analyis and the image",
          "passthroughBinaryImages": true
        },
        "promptType": "define"
      },
      "executeOnce": true,
      "typeVersion": 2.2
    },
    {
      "id": "a690587f-4d14-4087-b255-67a152cc75fa",
      "name": "Modèle de Chat OpenAI",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        192,
        4064
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "gpt-5"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "4l6TDfLZVFS24g3X",
          "name": "OpenAi account 4"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "ac29d89e-49f2-4bbf-ba23-5fd00aa689d6",
      "name": "Diviser",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -176,
        3552
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "latestPosts"
      },
      "typeVersion": 1
    },
    {
      "id": "0ad175a5-c1c8-498e-b6b0-1c36aabacb8d",
      "name": "Requête HTTP",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        16,
        3568
      ],
      "parameters": {
        "url": "={{ $json.displayUrl }}",
        "options": {}
      },
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "c5f57bab-6350-4bf0-8524-75cbbca86321",
      "name": "Note Adhésive53",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        3312
      ],
      "parameters": {
        "color": 7,
        "width": 2144,
        "height": 1056,
        "content": "### Scrape Instagram images with Apify and analyze them using OpenAI in n8n for fast visual insights (Google Sheets + HTTP + OpenAI)\n\nPull recent Instagram post media for any username, fetch the image binaries, and run automated **visual analysis** with OpenAI — all orchestrated in n8n. Use a Google Sheet to supply target usernames and store results anywhere you like.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "38a41e2a-85bd-4e73-9513-1cc6b3277735",
      "name": "Note Adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1696,
        3312
      ],
      "parameters": {
        "width": 400,
        "height": 1056,
        "content": "\n\n## ⚙️ Setup (minimal credentials)\n### 1) Connect Google Sheets (OAuth2)\n1. In **n8n → Credentials → New → Google Sheets (OAuth2)**  \n2. Sign in with your Google account and grant access  \n3. In the **Get Google Sheet** node, select your **Spreadsheet** and **Worksheet** with a `user` column (the example uses the “Multi Scraper” sheet)\n\n### 2) Connect Apify (HTTP Query Auth)\n1. Get your **Apify API token** (Apify Console → *Integrations/API*)  \n2. In **n8n → Credentials → New → HTTP Query Auth**, add a query param `token=<YOUR_APIFY_TOKEN>`  \n3. In the **Scrape Details** node, pick that credential. The URL is set to  \n   `https://api.apify.com/v2/acts/apify~instagram-profile-scraper/run-sync-get-dataset-items`  \n   The body passes `usernames: [\"{{$json.user}}\"]` from the Google Sheet row.\n\n### 3) Connect OpenAI (API Key)\n1. In **n8n → Credentials → New → OpenAI API**  \n2. Paste your **OpenAI API key**  \n3. In **OpenAI Chat Model**, select your credential and a **vision-capable** chat model (e.g., `gpt-4o-mini`, `gpt-4o`, or your configured vision model)\n\n> That’s it. No other services required.\n\n-\n\n## 📬 Contact  \nNeed help customizing this (e.g., filtering by campaign, sending reports by email, or formatting your PDF)?  \n\n- 📧 **rbreen@ynteractive.com**  \n- 🔗 **[Robert Breen](https://www.linkedin.com/in/robert-breen-29429625/)**  \n- 🌐 **[ynteractive.com](https://ynteractive.com)**\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e8a37bc8-a2db-4eea-ae7f-3b13b647f6e5",
      "name": "Note Adhésive61",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        3664
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 496,
        "content": "### 1) Connect Google Sheets (OAuth2)\n1. In **n8n → Credentials → New → Google Sheets (OAuth2)**  \n2. Sign in with your Google account and grant access  \n3. In the **Get Google Sheet** node, select your **Spreadsheet** and **Worksheet** with a `user` column (the example uses the “Multi Scraper” sheet)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "b24c1d5f-9070-4578-bd70-6c4711545818",
      "name": "Note Adhésive63",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        3504
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 640,
        "content": "### 2) Connect Apify (HTTP Query Auth)\n1. Get your **Apify API token** (Apify Console → *Integrations/API*)  \n2. In **n8n → Credentials → New → HTTP Query Auth**, add a query param `token=<YOUR_APIFY_TOKEN>`  \n3. In the **Scrape Details** node, pick that credential. The URL is set to  \n   `https://api.apify.com/v2/acts/apify~instagram-profile-scraper/run-sync-get-dataset-items`  \n   The body passes `usernames: [\"{{$json.user}}\"]` from the Google Sheet row.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "23416d72-b9e9-4ab1-8b57-8a8a1f0cfcfe",
      "name": "Note Adhésive64",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        3776
      ],
      "parameters": {
        "color": 3,
        "width": 224,
        "height": 400,
        "content": "### 3) Connect OpenAI (API Key)\n1. In **n8n → Credentials → New → OpenAI API**  \n2. Paste your **OpenAI API key**  \n3. In **OpenAI Chat Model**, select your credential and a **vision-capable** chat model (e.g., `gpt-4o-mini`, `gpt-4o`, or your configured vision model)\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "f316f5b7-e4be-42fd-8eb4-730cd2a8759c": {
      "main": [
        [
          {
            "node": "5c21dec6-09d2-427e-89bc-2a1b809a0d40",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ac29d89e-49f2-4bbf-ba23-5fd00aa689d6": {
      "main": [
        [
          {
            "node": "0ad175a5-c1c8-498e-b6b0-1c36aabacb8d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0ad175a5-c1c8-498e-b6b0-1c36aabacb8d": {
      "main": [
        [
          {
            "node": "37cf43bb-4e6b-462f-a34f-e0b4651e033d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5c21dec6-09d2-427e-89bc-2a1b809a0d40": {
      "main": [
        [
          {
            "node": "ac29d89e-49f2-4bbf-ba23-5fd00aa689d6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5dd0aa9e-2197-46e4-adcc-c4fed6e0b002": {
      "main": [
        [
          {
            "node": "f316f5b7-e4be-42fd-8eb4-730cd2a8759c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a690587f-4d14-4087-b255-67a152cc75fa": {
      "ai_languageModel": [
        [
          {
            "node": "37cf43bb-4e6b-462f-a34f-e0b4651e033d",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "5432b2ed-adde-4021-b6b3-e75e43bd102c": {
      "main": [
        [
          {
            "node": "5dd0aa9e-2197-46e4-adcc-c4fed6e0b002",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Étude de marché, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds13
Catégorie2
Types de nœuds8
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34