8
n8n 한국어amn8n.com

Instagram 잠재 고객 생성

고급

이것은Lead Generation, AI RAG분야의자동화 워크플로우로, 18개의 노드를 포함합니다.주로 Set, Code, Postgres, SplitOut, HttpRequest 등의 노드를 사용하며. Apify, GPT 및 PostgreSQL을 활용한 Instagram 인플루언서 잠재고객 수집 자동화

사전 요구사항
  • PostgreSQL 데이터베이스 연결 정보
  • 대상 API의 인증 정보가 필요할 수 있음
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "geEVmbXLYDSA8UGM",
  "meta": {
    "instanceId": "5ca157bf036415a321c9d29eeb986017053989bb83b5b61701e90fe3987ac8b7",
    "templateCredsSetupCompleted": true
  },
  "name": "Instagram Lead Generation",
  "tags": [],
  "nodes": [
    {
      "id": "5f49d3d3-5e81-4b9d-9bc4-687ee97e2e8f",
      "name": "워크플로우 '테스트' 클릭 시",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -256,
        0
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "9990229b-1098-4ff5-8906-c57a260f4d15",
      "name": "필드 편집",
      "type": "n8n-nodes-base.set",
      "position": [
        -32,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "8b66c6fb-0773-4c66-b088-e35fbb27fd08",
              "name": "site",
              "type": "string",
              "value": "instagram"
            },
            {
              "id": "9dddc30f-b90d-4759-81be-96161bc5dd48",
              "name": "field_of_interest",
              "type": "string",
              "value": "beauty & hair"
            },
            {
              "id": "9fba044b-013f-4ff0-8687-6a6c8954011a",
              "name": "target_country",
              "type": "string",
              "value": "USA"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a40f44bc-efee-4c89-8fbc-77cd0d09ff3e",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        224,
        0
      ],
      "parameters": {
        "text": "=field of interest: {{ $json.field_of_interest }}\ntarget country: {{ $json.target_country }}",
        "options": {
          "systemMessage": "You are an assistant designed to generate Google search queries based on user instructions. Your sole task is to create queries following a specific format like the one below:\n\nsite:instagram.com/*/ (inurl:\"/beauty\" OR inurl:\"/hair\" OR intitle:\"beauty\" OR intitle:\"hair\") (\"England\" OR \"UK\" OR \"London\" OR \"Manchester\" OR \"Birmingham\" OR \"Liverpool\" OR \"Leeds\") (\"@gmail.com\" OR \"@yahoo.com\" OR \"@hotmail.com\" OR \"@outlook.com\" OR \"@aol.com\" OR \"@icloud.com\") -inurl:\"/p/\" -inurl:\"/reel/\" -inurl:\"/tv/\"\n\nYour output must:\n\n1. Only return the Google search query, no explanation or extra text.\n\n2. Replace the niche-related keywords (e.g., \"beauty\" or \"hair\") with the field of interest specified by the user.\n\n3. Replace the location filters (e.g., \"England\", \"UK\", \"London\") with the target country provided by the user. Add cities related to the target country as well.\n\n4. Always include the email provider filters:\n(\"@gmail.com\" OR \"@yahoo.com\" OR \"@hotmail.com\" OR \"@outlook.com\" OR \"@aol.com\" OR \"@icloud.com\")\n\n5. Always exclude media content using:\n-inurl:\"/p/\" -inurl:\"/reel/\" -inurl:\"/tv/\"\n\n6. Ensure the query remains **clean, optimized, and structurally consistent** with the original format. Do **not explain** the query — return only the **raw search string**.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "79b4c5f6-7fe9-46eb-932b-4d98593c2607",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        224,
        208
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "dUQjRoJSrkOznqAl",
          "name": "My OpenAi account "
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d2eecb84-b111-401c-9fb2-91722625cb66",
      "name": "HTTP 요청",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        736,
        32
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/apify~google-search-scraper/run-sync-get-dataset-items?token=apify_api_YOUR_TOKEN_HERE",
        "options": {},
        "jsonBody": "={\n    \"focusOnPaidAds\": false,\n    \"forceExactMatch\": false,\n    \"includeIcons\": false,\n    \"includeUnfilteredResults\": false,\n    \"maxPagesPerQuery\": 20,\n    \"mobileResults\": false,\n    \"queries\": \"{{ $json.escapedQuery }}\",\n    \"resultsPerPage\": 100,\n    \"saveHtml\": false,\n    \"saveHtmlToKeyValueStore\": true\n} ",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "ff3a6ff0-f66f-499d-b56f-2ae8f22534ba",
      "name": "코드",
      "type": "n8n-nodes-base.code",
      "position": [
        496,
        0
      ],
      "parameters": {
        "jsCode": "// n8n Function node code\nconst inputQuery = $input.first().json.output;\n\n// Replace all \" with \\\"\nconst escapedQuery = inputQuery.replace(/\"/g, '\\\\\"');\n\n// Return as output\nreturn [\n  {\n    json: {\n      escapedQuery\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "dd29f519-c629-4302-ad17-e1a5b0555e46",
      "name": "분할 출력",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        896,
        32
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "organicResults"
      },
      "typeVersion": 1
    },
    {
      "id": "32b57f66-c3cd-4a04-a787-3f7662af13c2",
      "name": "HTTP 요청1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1456,
        80
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/apify~instagram-scraper/run-sync-get-dataset-items?token=apify_api_YOUR_TOKEN_HERE",
        "options": {},
        "jsonBody": "={\n    \"addParentData\": false,\n    \"directUrls\": [\n        \"{{ $json.cleanedUrl }}\"\n    ],\n    \"enhanceUserSearchWithFacebookPage\": false,\n    \"isUserReelFeedURL\": false,\n    \"isUserTaggedFeedURL\": false,\n    \"resultsLimit\": 2,\n    \"resultsType\": \"details\",\n    \"searchLimit\": 1,\n    \"searchType\": \"hashtag\"\n} ",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "6e52cddd-1cf2-433f-8f78-cd1f0f2d89ad",
      "name": "코드1",
      "type": "n8n-nodes-base.code",
      "position": [
        1312,
        80
      ],
      "parameters": {
        "jsCode": "// n8n Function node code\nconst inputUrl = $input.first().json.url;\n\n// Remove trailing slash if present\nconst cleanedUrl = inputUrl.replace(/\\/$/, \"\");\n\nreturn [\n  {\n    json: {\n      cleanedUrl\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "28aaf56d-ee27-4a81-9cd7-b0e43d13aeb9",
      "name": "정보 추출기",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1600,
        80
      ],
      "parameters": {
        "text": "={{ $json.biography }}",
        "options": {
          "systemPromptTemplate": "You are an expert extraction algorithm. Extract relevant information from the given web scraped text data and present it in JSON format with the attribute Email . If email attribute is not found in the text, assign them the value \"N/A\". Always extract email address in small hand."
        },
        "schemaType": "manual",
        "inputSchema": "{\n\t\"type\": \"array\",\n\t\"properties\": {\n\t\t\"Email\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"format\": \"email\"\n\t\t}\n\t}\n}"
      },
      "typeVersion": 1
    },
    {
      "id": "f2a03fb3-9171-482e-b078-05a5dff93e6a",
      "name": "OpenAI 채팅 모델1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1600,
        304
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-3.5-turbo",
          "cachedResultName": "gpt-3.5-turbo"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "dUQjRoJSrkOznqAl",
          "name": "My OpenAi account "
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9d1fbc5b-538a-4d82-a897-00a03ce4d5cc",
      "name": "항목 반복",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1152,
        32
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "067b1f22-eb31-4573-80e1-47fac5bddb7b",
      "name": "Postgres",
      "type": "n8n-nodes-base.postgres",
      "position": [
        2032,
        80
      ],
      "parameters": {
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "Instagram_Leads_Beauty&Hair",
          "cachedResultName": "Instagram_Leads_Beauty&Hair"
        },
        "schema": {
          "__rl": true,
          "mode": "list",
          "value": "public"
        },
        "columns": {
          "value": {
            "email": "={{ $('Filter').item.json.output[0].Email }}",
            "user_name": "={{ $('HTTP Request1').item.json.username }}",
            "account_link": "={{ $('HTTP Request1').item.json.inputUrl }}",
            "follower_count": "={{ $('HTTP Request1').item.json.followsCount }}",
            "target_country": "={{ $('Edit Fields').item.json.target_country }}",
            "field_of_interest": "={{ $('Edit Fields').item.json.field_of_interest }}"
          },
          "schema": [
            {
              "id": "user_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": true,
              "displayName": "user_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "follower_count",
              "type": "number",
              "display": true,
              "required": true,
              "displayName": "follower_count",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "account_link",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "account_link",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "email",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "target_country",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "target_country",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "field_of_interest",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "field_of_interest",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "user_name"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "upsert"
      },
      "credentials": {
        "postgres": {
          "id": "sZAvcVeX17fuVXQz",
          "name": "Postgres account"
        }
      },
      "typeVersion": 2.6
    },
    {
      "id": "c8d53921-24d1-4f79-ab40-2f5794f0f057",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 304,
        "content": "## Specifying Our Target Niche \n"
      },
      "typeVersion": 1
    },
    {
      "id": "a466c89c-8766-4927-871c-474a67a42265",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -128
      ],
      "parameters": {
        "width": 464,
        "height": 464,
        "content": "## Generating Custom Optimized Search Engine Query for finding Instagram Accounts\n"
      },
      "typeVersion": 1
    },
    {
      "id": "8d2a5c18-c22b-4773-8890-12fa1e0b7913",
      "name": "스티커 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        672,
        -128
      ],
      "parameters": {
        "color": 3,
        "width": 368,
        "height": 336,
        "content": "## Extracting Search Results Using Apify Api"
      },
      "typeVersion": 1
    },
    {
      "id": "6d5711e0-b5d3-43ee-b1f4-b8db6c853d7d",
      "name": "스티커 노트3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        -128
      ],
      "parameters": {
        "color": 4,
        "width": 848,
        "height": 560,
        "content": "## Going Through Each of the Accounts & Extracting Leads From User's Bio"
      },
      "typeVersion": 1
    },
    {
      "id": "0c298e44-251f-4718-9f58-ba8904cb2708",
      "name": "스티커 노트4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1952,
        -32
      ],
      "parameters": {
        "color": 6,
        "width": 256,
        "height": 272,
        "content": "## Storing Leads In PostgreSQL"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "cd76a0c4-c864-4bb3-906f-57bfb43d2a9e",
  "connections": {
    "ff3a6ff0-f66f-499d-b56f-2ae8f22534ba": {
      "main": [
        [
          {
            "node": "d2eecb84-b111-401c-9fb2-91722625cb66",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6e52cddd-1cf2-433f-8f78-cd1f0f2d89ad": {
      "main": [
        [
          {
            "node": "32b57f66-c3cd-4a04-a787-3f7662af13c2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a40f44bc-efee-4c89-8fbc-77cd0d09ff3e": {
      "main": [
        [
          {
            "node": "ff3a6ff0-f66f-499d-b56f-2ae8f22534ba",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "067b1f22-eb31-4573-80e1-47fac5bddb7b": {
      "main": [
        [
          {
            "node": "9d1fbc5b-538a-4d82-a897-00a03ce4d5cc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "dd29f519-c629-4302-ad17-e1a5b0555e46": {
      "main": [
        [
          {
            "node": "9d1fbc5b-538a-4d82-a897-00a03ce4d5cc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9990229b-1098-4ff5-8906-c57a260f4d15": {
      "main": [
        [
          {
            "node": "a40f44bc-efee-4c89-8fbc-77cd0d09ff3e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d2eecb84-b111-401c-9fb2-91722625cb66": {
      "main": [
        [
          {
            "node": "dd29f519-c629-4302-ad17-e1a5b0555e46",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "32b57f66-c3cd-4a04-a787-3f7662af13c2": {
      "main": [
        [
          {
            "node": "28aaf56d-ee27-4a81-9cd7-b0e43d13aeb9",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9d1fbc5b-538a-4d82-a897-00a03ce4d5cc": {
      "main": [
        [],
        [
          {
            "node": "6e52cddd-1cf2-433f-8f78-cd1f0f2d89ad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "79b4c5f6-7fe9-46eb-932b-4d98593c2607": {
      "ai_languageModel": [
        [
          {
            "node": "a40f44bc-efee-4c89-8fbc-77cd0d09ff3e",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "f2a03fb3-9171-482e-b078-05a5dff93e6a": {
      "ai_languageModel": [
        [
          {
            "node": "28aaf56d-ee27-4a81-9cd7-b0e43d13aeb9",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "28aaf56d-ee27-4a81-9cd7-b0e43d13aeb9": {
      "main": [
        [
          {
            "node": "067b1f22-eb31-4573-80e1-47fac5bddb7b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5f49d3d3-5e81-4b9d-9bc4-687ee97e2e8f": {
      "main": [
        [
          {
            "node": "9990229b-1098-4ff5-8906-c57a260f4d15",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 리드 생성, AI RAG

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수18
카테고리2
노드 유형11
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34