๐ค AI ์ธ์คํ๊ทธ๋จ ํ์ ํฉ ์์ฑ๊ธฐ
์ด๊ฒ์Content Creation, Multimodal AI๋ถ์ผ์์๋ํ ์ํฌํ๋ก์ฐ๋ก, 11๊ฐ์ ๋ ธ๋๋ฅผ ํฌํจํฉ๋๋ค.์ฃผ๋ก If, Wait, HttpRequest, StopAndError, ScheduleTrigger ๋ฑ์ ๋ ธ๋๋ฅผ ์ฌ์ฉํ๋ฉฐ. MagicHour AI์ GPT-4๋ฅผ ์ฌ์ฉํ์ฌ ๋ฐ์ด๋ฌ์ค ํจ๊ณผ์ ์ธ ์ด๋ชจ์ง ํจํค์ง ์์ฑๅนถๅ์ก
- โข๋์ API์ ์ธ์ฆ ์ ๋ณด๊ฐ ํ์ํ ์ ์์
- โขOpenAI API Key
์ฌ์ฉ๋ ๋ ธ๋ (11)
์นดํ ๊ณ ๋ฆฌ
{
"id": "YOUR_WORKFLOW_ID",
"meta": {
"instanceId": "YOUR_INSTANCE_ID",
"templateId": "ai-instagram-meme-generator",
"templateCredsSetupCompleted": false
},
"name": "๐ค AI Instagram Meme Generator",
"tags": [
"social-media",
"instagram",
"ai",
"automation",
"memes",
"content-creation",
"late-api",
"viral-content"
],
"nodes": [
{
"id": "wait-for-generation",
"name": "โณ ์์ฑ ๋๊ธฐ",
"type": "n8n-nodes-base.wait",
"notes": "Allows time for AI meme generation to complete",
"position": [
680,
240
],
"webhookId": "YOUR_WEBHOOK_ID",
"parameters": {
"amount": 20
},
"typeVersion": 1.1
},
{
"id": "schedule-trigger",
"name": "๐
์ค์ผ์ค ํธ๋ฆฌ๊ฑฐ",
"type": "n8n-nodes-base.scheduleTrigger",
"notes": "Runs every 12 hours - customize the interval as needed",
"position": [
240,
240
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 12
}
]
}
},
"typeVersion": 1.2
},
{
"id": "get-generated-image",
"name": "๐ผ๏ธ ์์ฑ๋ ์ด๋ฏธ์ง ๊ฐ์ ธ์ค๊ธฐ",
"type": "n8n-nodes-base.httpRequest",
"notes": "Retrieves the completed meme from MagicHour API",
"position": [
920,
240
],
"parameters": {
"url": "=https://api.magichour.ai/v1/image-projects/{{ $('๐จ Generate Meme').item.json.id }}",
"options": {
"retry": {
"enabled": true,
"maxAttempts": 3,
"waitBetween": 1000
},
"timeout": 30000
},
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_MAGICHOUR_API_KEY"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_MAGICHOUR_CREDENTIAL_ID",
"name": "MagicHour API"
}
},
"typeVersion": 4.2
},
{
"id": "generate-meme",
"name": "๐จ ๋ฐ ์์ฑ",
"type": "n8n-nodes-base.httpRequest",
"notes": "Creates AI-generated meme using MagicHour API - customize the topic prompt for your niche",
"position": [
460,
240
],
"parameters": {
"url": "https://api.magichour.ai/v1/ai-meme-generator",
"method": "POST",
"options": {
"retry": {
"enabled": true,
"maxAttempts": 2,
"waitBetween": 2000
},
"timeout": 30000
},
"jsonBody": "{\n \"name\": \"AI Generated Meme - {{ new Date().toISOString() }}\",\n \"style\": {\n \"topic\": \"Create a funny, relatable meme that would go viral on Instagram. Focus on everyday situations, trending topics, or universal experiences that people can relate to. Keep it light-hearted and shareable. Avoid controversial topics.\",\n \"template\": \"Random\",\n \"searchWeb\": true\n }\n}",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_MAGICHOUR_API_KEY"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_MAGICHOUR_CREDENTIAL_ID",
"name": "MagicHour API"
}
},
"typeVersion": 4.2
},
{
"id": "check-image-ready",
"name": "โ
์ด๋ฏธ์ง ์ค๋น ํ์ธ",
"type": "n8n-nodes-base.if",
"notes": "Validates that the meme was generated successfully before proceeding",
"position": [
1160,
240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "image-check",
"operator": {
"type": "boolean",
"operation": "equal"
},
"leftValue": "={{ $json.downloads && $json.downloads.length > 0 }}",
"rightValue": true
}
]
}
},
"typeVersion": 2
},
{
"id": "generate-caption",
"name": "๐ AI ์บก์
์์ฑ",
"type": "@n8n/n8n-nodes-langchain.openAi",
"notes": "Creates engaging Instagram caption with hashtags using GPT-4",
"position": [
1400,
160
],
"parameters": {
"text": "Analyze this meme image and write a viral Instagram caption that will maximize engagement. Requirements:\n\n1. Write 1-2 sentences that are funny, relatable, and encourage interaction\n2. Include 5-8 relevant hashtags that match the meme content\n3. Add a call-to-action (like 'Tag someone who...', 'Double tap if...', or 'Comment if...')\n4. Keep the total caption under 150 characters for better mobile viewing\n5. Use emojis strategically but don't overuse them\n6. Make it shareable - something people want to repost\n\nDO NOT include quotation marks, intro text, or explanations. Write ONLY the final caption ready to post.",
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini",
"cachedResultName": "GPT-4O-MINI"
},
"options": {},
"resource": "image",
"imageUrls": "={{ $json.downloads[0].url }}",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"id": "YOUR_OPENAI_CREDENTIAL_ID",
"name": "OpenAI Account"
}
},
"typeVersion": 1.8
},
{
"id": "post-to-instagram",
"name": "๐ฑ Instagram์ ๊ฒ์",
"type": "n8n-nodes-base.httpRequest",
"notes": "Schedules the meme post to Instagram via Late API - posts 5 minutes after generation",
"position": [
1880,
160
],
"parameters": {
"url": "https://getlate.dev/api/v1/posts",
"method": "POST",
"options": {
"retry": {
"enabled": true,
"maxAttempts": 3,
"waitBetween": 2000
},
"timeout": 15000
},
"jsonBody": "={\n \"content\": \"{{ $('๐ Generate AI Caption').item.json.content }}\",\n \"scheduledFor\": \"{{ new Date(Date.now() + 5*60*1000).toISOString() }}\",\n \"timezone\": \"America/New_York\",\n \"platforms\": [\n {\n \"platform\": \"instagram\",\n \"accountId\": \"YOUR_INSTAGRAM_ACCOUNT_ID\"\n }\n ],\n \"mediaItems\": [\n {\n \"type\": \"image\",\n \"url\": \"{{ $('๐ผ๏ธ Get Generated Image').item.json.downloads[0].url }}\",\n \"altText\": \"AI-generated meme for Instagram engagement\"\n }\n ]\n}",
"sendBody": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_LATE_API_CREDENTIAL_ID",
"name": "Late API"
}
},
"typeVersion": 4.2
},
{
"id": "get-profiles",
"name": "๐ค ์ต๊ทผ ํ๋กํ ๊ฐ์ ธ์ค๊ธฐ",
"type": "n8n-nodes-base.httpRequest",
"notes": "Retrieves your Late account profiles - used for account validation",
"position": [
1400,
320
],
"parameters": {
"url": "https://getlate.dev/api/v1/profiles",
"options": {
"timeout": 10000
},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_LATE_API_CREDENTIAL_ID",
"name": "Late API"
}
},
"typeVersion": 4.2
},
{
"id": "get-accounts",
"name": "๐ ์ฐ๊ฒฐ๋ ๊ณ์ ๊ฐ์ ธ์ค๊ธฐ",
"type": "n8n-nodes-base.httpRequest",
"notes": "Gets your connected social media accounts from Late",
"position": [
1640,
320
],
"parameters": {
"url": "https://getlate.dev/api/v1/accounts",
"options": {
"timeout": 10000
},
"sendQuery": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "profileId",
"value": "YOUR_LATE_PROFILE_ID"
}
]
}
},
"credentials": {
"httpHeaderAuth": {
"id": "YOUR_LATE_API_CREDENTIAL_ID",
"name": "Late API"
}
},
"typeVersion": 4.2
},
{
"id": "handle-generation-error",
"name": "โ ์์ฑ ์ค๋ฅ ์ฒ๋ฆฌ",
"type": "n8n-nodes-base.stopAndError",
"notes": "Gracefully handles cases where meme generation fails",
"position": [
1160,
400
],
"parameters": {
"content": "๐จ Meme generation failed! \n\nThe AI couldn't create a meme this time. This might be due to:\n- API rate limits\n- Temporary service issues\n- Network connectivity problems\n\nThe workflow will try again in the next scheduled run (12 hours).\n\nNo action needed - this is automatically handled! โ
",
"options": {}
},
"typeVersion": 1
},
{
"id": "log-success",
"name": "๐ ์ฑ๊ณต ๋ก๊ทธ ๊ธฐ๋ก",
"type": "n8n-nodes-base.httpRequest",
"notes": "Optional: Logs successful workflow execution - replace URL with your logging service",
"position": [
2120,
160
],
"parameters": {
"url": "https://httpbin.org/post",
"method": "POST",
"options": {},
"jsonBody": "={\n \"workflow_run\": {\n \"timestamp\": \"{{ new Date().toISOString() }}\",\n \"status\": \"success\",\n \"meme_generated\": true,\n \"caption_created\": true,\n \"instagram_scheduled\": true,\n \"image_url\": \"{{ $('๐ผ๏ธ Get Generated Image').item.json.downloads[0].url }}\",\n \"caption_preview\": \"{{ $('๐ Generate AI Caption').item.json.content.substring(0, 50) }}...\",\n \"next_run\": \"{{ new Date(Date.now() + 12*60*60*1000).toISOString() }}\"\n }\n}",
"sendBody": true,
"specifyBody": "json"
},
"typeVersion": 4.2
}
],
"active": false,
"pinData": {},
"settings": {
"callerPolicy": "workflowsFromSameOwner",
"errorWorkflow": {
"errorWorkflow": "",
"continueOnFail": false
},
"executionOrder": "v1",
"saveManualExecutions": true
},
"versionId": "YOUR_VERSION_ID",
"connections": {
"generate-meme": {
"main": [
[
{
"node": "wait-for-generation",
"type": "main",
"index": 0
}
]
]
},
"check-image-ready": {
"main": [
[
{
"node": "generate-caption",
"type": "main",
"index": 0
},
{
"node": "get-profiles",
"type": "main",
"index": 0
}
],
[
{
"node": "handle-generation-error",
"type": "main",
"index": 0
}
]
]
},
"schedule-trigger": {
"main": [
[
{
"node": "generate-meme",
"type": "main",
"index": 0
}
]
]
},
"get-profiles": {
"main": [
[
{
"node": "get-accounts",
"type": "main",
"index": 0
}
]
]
},
"post-to-instagram": {
"main": [
[
{
"node": "log-success",
"type": "main",
"index": 0
}
]
]
},
"wait-for-generation": {
"main": [
[
{
"node": "get-generated-image",
"type": "main",
"index": 0
}
]
]
},
"generate-caption": {
"main": [
[
{
"node": "post-to-instagram",
"type": "main",
"index": 0
}
]
]
},
"get-accounts": {
"main": [
[
{
"node": "post-to-instagram",
"type": "main",
"index": 0
}
]
]
},
"get-generated-image": {
"main": [
[
{
"node": "check-image-ready",
"type": "main",
"index": 0
}
]
]
}
}
}์ด ์ํฌํ๋ก์ฐ๋ฅผ ์ด๋ป๊ฒ ์ฌ์ฉํ๋์?
์์ JSON ๊ตฌ์ฑ ์ฝ๋๋ฅผ ๋ณต์ฌํ์ฌ n8n ์ธ์คํด์ค์์ ์ ์ํฌํ๋ก์ฐ๋ฅผ ์์ฑํ๊ณ "JSON์์ ๊ฐ์ ธ์ค๊ธฐ"๋ฅผ ์ ํํ ํ, ๊ตฌ์ฑ์ ๋ถ์ฌ๋ฃ๊ณ ํ์์ ๋ฐ๋ผ ์ธ์ฆ ์ค์ ์ ์์ ํ์ธ์.
์ด ์ํฌํ๋ก์ฐ๋ ์ด๋ค ์๋๋ฆฌ์ค์ ์ ํฉํ๊ฐ์?
์ค๊ธ - ์ฝํ ์ธ ์ ์, ๋ฉํฐ๋ชจ๋ฌ AI
์ ๋ฃ์ธ๊ฐ์?
์ด ์ํฌํ๋ก์ฐ๋ ์์ ํ ๋ฌด๋ฃ์ด๋ฉฐ ์ง์ ๊ฐ์ ธ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๋ค๋ง, ์ํฌํ๋ก์ฐ์์ ์ฌ์ฉํ๋ ํ์ฌ ์๋น์ค(์: OpenAI API)๋ ์ฌ์ฉ์ ์ง์ ๋น์ฉ์ ์ง๋ถํด์ผ ํ ์ ์์ต๋๋ค.
๊ด๋ จ ์ํฌํ๋ก์ฐ ์ถ์ฒ
Katie Allred
@katiejallred์ด ์ํฌํ๋ก์ฐ ๊ณต์