{
  "name": "Write personalised direct messages for Instagram with Apify, OpenAI, GSheets",
  "nodes": [
    {
      "id": "b88a86c0-c6e7-4404-9fb5-b02c864e4371",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "d65b05f5-7037-4933-8576-c0670c33712c",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        480,
        0
      ]
    },
    {
      "id": "9d7fd662-9b0b-4357-a3fe-fdd23d5b1780",
      "name": "Analyze image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1616,
        0
      ]
    },
    {
      "id": "29be68c3-aaa5-4344-83ab-14a894ea5940",
      "name": "Get Instagram accounts",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        208,
        0
      ]
    },
    {
      "id": "7009a2f5-41ab-445a-87dc-972f56a8d9db",
      "name": "Fetch Instagram Account Data",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        816,
        0
      ]
    },
    {
      "id": "97bb8f7e-d763-4072-94b7-8053887ce3f7",
      "name": "Get Instagram Account Data",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        1168,
        0
      ]
    },
    {
      "id": "594d877e-92e1-4f97-95f7-8aa114d5bec2",
      "name": "Fetch Image of latest post",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1392,
        0
      ]
    },
    {
      "id": "b1e24aad-8a19-4da4-842f-f1bbcaeed1be",
      "name": "Generate Personalized DM",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1776,
        0
      ]
    },
    {
      "id": "4afd8206-d3b0-40aa-965c-3d7ca4d100a9",
      "name": "Add message to Account",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2176,
        0
      ]
    },
    {
      "id": "17c403c3-3726-4a18-9b1c-b7fe927fd2a5",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        -256
      ],
      "parameters": {
        "width": 460,
        "height": 816,
        "content": "## Audience Problem Keyword Research Workflow\n### This n8n template fetches Instagram profile information with Apify and generates personalized DMs in Google Sheets. This is great for creator outreach"
      }
    }
  ],
  "connections": {
    "Analyze image": {
      "main": [
        [
          {
            "node": "Generate Personalized DM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Fetch Instagram Account Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add message to Account": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Instagram accounts": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Personalized DM": {
      "main": [
        [
          {
            "node": "Add message to Account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Image of latest post": {
      "main": [
        [
          {
            "node": "Analyze image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Instagram Account Data": {
      "main": [
        [
          {
            "node": "Fetch Image of latest post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Instagram Account Data": {
      "main": [
        [
          {
            "node": "Get Instagram Account Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get Instagram accounts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}