Apify + GPT-4o-mini를 사용하여 태그 분석을 통해 Instagram 제목 생성
이것은Content Creation, Multimodal AI분야의자동화 워크플로우로, 17개의 노드를 포함합니다.주로 Set, Code, Merge, SplitOut, Aggregate 등의 노드를 사용하며. Apify + GPT-4o-mini를 사용하여 태그 분석에서 Instagram 제목 생성
- •대상 API의 인증 정보가 필요할 수 있음
- •OpenAI API Key
사용된 노드 (17)
{
"meta": {
"instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439"
},
"nodes": [
{
"id": "2ea0c49a-6706-4272-8990-06f578c5c5a7",
"name": "‘워크플로 실행’ 클릭 시",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-360,
1080
],
"parameters": {},
"typeVersion": 1
},
{
"id": "a889197b-b78d-4808-948c-6d57883ee34f",
"name": "AI 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
920,
1060
],
"parameters": {
"text": "=posts: {{ $json.text }}",
"options": {
"systemMessage": "=I'm looking for ideas for posts about {{ $('Create Search Term').item.json.Search_Term }}\n\nHere's the last 5 posts on instagram about the topic. Use those to help me generate a list of relevent captions to post on my instagram. \n\ndo not make up ideas that are not like the others in the list. \n\noutput like this. \n\n{\n\t\"Post Idea\": [\"Idea1\", \"Idea2\"], \n \"Most Common Post\": [\"common post 1\", \"common post 2\"]\n}"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "47f4b1cb-9361-4aff-a439-2c8979fe93f4",
"name": "OpenAI 채팅 모델",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
960,
1280
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "ghJTvay8CvwXDsXz",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "2b0f574d-7976-469a-bf84-00a37ef15def",
"name": "구조화된 출력 파서",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1140,
1280
],
"parameters": {
"jsonSchemaExample": "{\n\t\"Post Idea\": [\"Idea1\", \"Idea2\"], \n \"Most Common Post\": [\"common post 1\", \"common post 2\"]\n}"
},
"typeVersion": 1.2
},
{
"id": "00910de9-80ba-41c9-8200-81fcb6d15f45",
"name": "최근 게시물 찾기",
"type": "n8n-nodes-base.httpRequest",
"position": [
140,
1120
],
"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\": 20,\n \"resultsType\": \"posts\"\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"id": "yLUXsSPePLOGnHmf",
"name": "Query Auth account"
}
},
"typeVersion": 4.2
},
{
"id": "5a62f897-74a6-4899-a8c9-a51a6d011373",
"name": "검색어 생성",
"type": "n8n-nodes-base.set",
"position": [
-140,
1000
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ad5c9a23-7fe0-4ed4-b1e7-d3da417bcb86",
"name": "Search_Term",
"type": "string",
"value": "n8n"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "33a01e12-8820-4184-92fb-6682470940b1",
"name": "바이오 및 팔로워 수 설정",
"type": "n8n-nodes-base.set",
"position": [
440,
920
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "ac638d8c-fa83-4cf6-92af-e0489d7349dd",
"name": "caption",
"type": "string",
"value": "={{ $json.caption }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "7275daae-bf7a-4c06-928a-16f0bfdc0a3b",
"name": "스티키 노트",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
100
],
"parameters": {
"color": 3,
"width": 780,
"height": 1380,
"content": "### 1️⃣ Manual Trigger\n\n#### 🧩 Node: `When clicking ‘Execute workflow’`\n- Manually starts the workflow for testing or single-run execution.\n\n---\n\n### 2️⃣ Define the Hashtag\n\n#### 🧩 Node: `Create Search Term`\n- Sets the value of the hashtag you'd like to scan.\n- Default is `n8n`, but you can modify it to anything.\n\n```json\n{\n \"Search_Term\": \"yourCustomHashtag\"\n}\n```\n\n---\n\n### 3️⃣ Scrape Instagram Posts\n\n#### 🧩 Node: `Find Recent Posts`\n- **API**: [Apify Instagram Hashtag Scraper](https://console.apify.com/actors/apify/instagram-hashtag-scraper)\n- **Setup**:\n - Visit [Apify Console](https://console.apify.com/)\n - Create an API token\n - In n8n, go to Credentials and add `HTTP Query Auth`\n - Use `?token=yourTokenHere` as the query string\n\n**JSON Body:**\n```json\n{\n \"hashtags\": [\"{{ $json.Search_Term }}\"],\n \"resultsLimit\": 20,\n \"resultsType\": \"posts\"\n}\n```\n\n---\n\n"
},
"typeVersion": 1
},
{
"id": "09a04fbd-a16b-4166-a623-555770c81605",
"name": "스티키 노트1",
"type": "n8n-nodes-base.stickyNote",
"position": [
400,
100
],
"parameters": {
"color": 4,
"width": 440,
"height": 1380,
"content": "\n### 4️⃣ Extract Captions\n\n#### 🧩 Node: `Set bio and follower count`\n- Extracts just the `caption` from each post and stores it in a clean variable for the AI agent to use.\n\n---\n\n### 5️⃣ Aggregate Captions\n\n#### 🧩 Node: `Aggregate`\n- Gathers all captions into one list before processing.\n- Useful for passing a large text block into the AI.\n\n---\n\n### 6️⃣ Convert to Single Text Block\n\n#### 🧩 Node: `Convert table names and columns into single text for agent`\n- Uses a `Code` node to combine all captions into a single string for OpenAI to read:\n```javascript\nreturn [\n {\n json: {\n text: items\n .map(item => `- ${JSON.stringify(item.json)}`)\n .join('\\n\\n'),\n },\n },\n];\n```\n\n---"
},
"typeVersion": 1
},
{
"id": "6a88d748-9563-49b8-9398-9d2032413f94",
"name": "스티키 노트2",
"type": "n8n-nodes-base.stickyNote",
"position": [
860,
100
],
"parameters": {
"color": 6,
"width": 420,
"height": 1380,
"content": "### 7️⃣ Generate Caption Ideas with AI\n\n#### 🧩 Node: `AI Agent`\n- Takes the combined post text and sends it to GPT-4o-mini.\n- Includes this system message:\n```text\nI'm looking for ideas for posts about {{ $('Create Search Term').item.json.Search_Term }}.\nHere’s the last 5 posts on Instagram about the topic. Use those to help me generate a list of relevant captions.\n\nDo not make up ideas that are not like the others in the list.\n\nOutput like this:\n{\n \"Post Idea\": [\"Idea1\", \"Idea2\"],\n \"Most Common Post\": [\"common post 1\", \"common post 2\"]\n}\n```\n\n---\n\n### 8️⃣ Choose Language Model\n\n#### 🧩 Node: `OpenAI Chat Model`\n- **Model**: `gpt-4o-mini`\n- **Credential**: Use your OpenAI API key.\n - Get it from: [OpenAI API Keys](https://platform.openai.com/account/api-keys)\n - Add it in n8n under OpenAI credentials.\n\n---\n\n### 9️⃣ Parse the AI Output\n\n#### 🧩 Node: `Structured Output Parser`\n- Parses the GPT response into structured JSON:\n```json\n{\n \"Post Idea\": [\"Idea1\", \"Idea2\"],\n \"Most Common Post\": [\"common post 1\", \"common post 2\"]\n}\n```\n\n---\n"
},
"typeVersion": 1
},
{
"id": "812c1007-ba56-4934-b88f-fcfe1f0bcf01",
"name": "스티키 노트3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-400,
-80
],
"parameters": {
"width": 2320,
"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
},
{
"id": "5fee94d6-f796-4785-a806-07714c2f0d64",
"name": "집계",
"type": "n8n-nodes-base.aggregate",
"position": [
600,
1100
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"fieldToAggregate": "caption"
}
]
}
},
"typeVersion": 1
},
{
"id": "0381aa63-dfa9-4e94-9991-6b266325d8ad",
"name": "에이전트용 테이블 이름 및 열을 단일 텍스트로 변환",
"type": "n8n-nodes-base.code",
"position": [
700,
880
],
"parameters": {
"jsCode": "return [\n {\n json: {\n text: items\n .map(item => `- ${JSON.stringify(item.json)}`)\n .join('\\n\\n'),\n },\n },\n];\n"
},
"typeVersion": 2
},
{
"id": "1d2af5fa-b9ef-401d-8b29-b0376d1317b4",
"name": "분할",
"type": "n8n-nodes-base.splitOut",
"position": [
1400,
1020
],
"parameters": {
"options": {},
"fieldToSplitOut": "output['Post Idea']"
},
"typeVersion": 1
},
{
"id": "12b8c5e9-3448-4459-ad9b-d6e1af7a7c84",
"name": "분할1",
"type": "n8n-nodes-base.splitOut",
"position": [
1420,
1260
],
"parameters": {
"options": {},
"fieldToSplitOut": "output['Most Common Post']"
},
"typeVersion": 1
},
{
"id": "73fd8217-6eae-4ce5-a2b5-f0325ea9154e",
"name": "병합",
"type": "n8n-nodes-base.merge",
"position": [
1660,
1140
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"typeVersion": 3.2
},
{
"id": "a25480f7-c832-4f8c-80e7-5e1ebd486305",
"name": "스티키 노트4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1300,
100
],
"parameters": {
"width": 620,
"height": 1380,
"content": "### 🔟 Split the Outputs\n\n#### 🧩 Nodes: `Split Out`, `Split Out1`\n- Separates the `Post Idea` list and `Most Common Post` list into individual items.\n\n---\n\n### 🔁 Merge for Final Output\n\n#### 🧩 Node: `Merge`\n- Combines the two split lists into one output stream.\n\n---"
},
"typeVersion": 1
}
],
"pinData": {
"AI Agent": [
{
"output": {
"Post Idea": [
"What are the top 3 automations you've implemented with n8n? Share your experiences!",
"Ever wondered how n8n can streamline your daily tasks? Let’s discuss the best workflows!",
"How can n8n transform your business processes? Share your thoughts!",
"Join our n8n community and learn from others’ automation journeys! What tips do you have to share?",
"Post about how you used n8n to solve a particular challenge—encourage followers to share their experiences!"
],
"Most Common Post": [
"Automate your business processes with n8n and focus on what truly matters!",
"Join our free webinar on using n8n for efficient workflow automation!",
"Discover how n8n connects different tools to save you time!",
"Share your favorite tools and how n8n helps you integrate them!",
"Tag a friend who needs to explore automation with n8n!"
]
}
}
]
},
"connections": {
"a889197b-b78d-4808-948c-6d57883ee34f": {
"main": [
[
{
"node": "1d2af5fa-b9ef-401d-8b29-b0376d1317b4",
"type": "main",
"index": 0
},
{
"node": "12b8c5e9-3448-4459-ad9b-d6e1af7a7c84",
"type": "main",
"index": 0
}
]
]
},
"5fee94d6-f796-4785-a806-07714c2f0d64": {
"main": [
[
{
"node": "0381aa63-dfa9-4e94-9991-6b266325d8ad",
"type": "main",
"index": 0
}
]
]
},
"1d2af5fa-b9ef-401d-8b29-b0376d1317b4": {
"main": [
[
{
"node": "73fd8217-6eae-4ce5-a2b5-f0325ea9154e",
"type": "main",
"index": 0
}
]
]
},
"12b8c5e9-3448-4459-ad9b-d6e1af7a7c84": {
"main": [
[
{
"node": "73fd8217-6eae-4ce5-a2b5-f0325ea9154e",
"type": "main",
"index": 1
}
]
]
},
"00910de9-80ba-41c9-8200-81fcb6d15f45": {
"main": [
[
{
"node": "33a01e12-8820-4184-92fb-6682470940b1",
"type": "main",
"index": 0
}
]
]
},
"47f4b1cb-9361-4aff-a439-2c8979fe93f4": {
"ai_languageModel": [
[
{
"node": "a889197b-b78d-4808-948c-6d57883ee34f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"5a62f897-74a6-4899-a8c9-a51a6d011373": {
"main": [
[
{
"node": "00910de9-80ba-41c9-8200-81fcb6d15f45",
"type": "main",
"index": 0
}
]
]
},
"2b0f574d-7976-469a-bf84-00a37ef15def": {
"ai_outputParser": [
[
{
"node": "a889197b-b78d-4808-948c-6d57883ee34f",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"33a01e12-8820-4184-92fb-6682470940b1": {
"main": [
[
{
"node": "5fee94d6-f796-4785-a806-07714c2f0d64",
"type": "main",
"index": 0
}
]
]
},
"2ea0c49a-6706-4272-8990-06f578c5c5a7": {
"main": [
[
{
"node": "5a62f897-74a6-4899-a8c9-a51a6d011373",
"type": "main",
"index": 0
}
]
]
},
"0381aa63-dfa9-4e94-9991-6b266325d8ad": {
"main": [
[
{
"node": "a889197b-b78d-4808-948c-6d57883ee34f",
"type": "main",
"index": 0
}
]
]
}
}
}이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
고급 - 콘텐츠 제작, 멀티모달 AI
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Robert Breen
@rbreenProfessional 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.
이 워크플로우 공유