{
  "id": "0n2LNQ5gPodkjucr",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Remix Instagram Trends with AI: Apify, OpenAI & Slack Automation",
  "tags": [],
  "nodes": [
    {
      "id": "d779c78e-13d3-40ed-9a1f-39ac3ceec771",
      "name": "When clicking 'Test workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -208,
        224
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "106dbb83-23f5-483b-b2ea-3da545aaa0ef",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        16,
        224
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "apifyApiToken",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Your Apify API Token__>"
            },
            {
              "id": "id-2",
              "name": "hashtags",
              "type": "string",
              "value": "nuancenail,trendnails"
            },
            {
              "id": "id-3",
              "name": "resultsLimit",
              "type": "number",
              "value": 1
            },
            {
              "id": "id-4",
              "name": "skinTone",
              "type": "string",
              "value": "Yellow Base Spring"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "4f089925-9986-48a3-ae88-f748fe64d36f",
      "name": "Run an Actor and get dataset",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        240,
        144
      ],
      "parameters": {
        "url": "=https://api.apify.com/v2/acts/reGe1ST3OBgYZSsZJ/runs?token={{ $('Workflow Configuration').item.json.apifyApiToken }}&waitForFinish=120",
        "method": "POST",
        "options": {
          "response": {
            "response": {}
          }
        },
        "jsonBody": "={\n  \"hashtags\": {{ $('Workflow Configuration').item.json.hashtags.split(',') }},\n  \"resultsLimit\": {{ $('Workflow Configuration').item.json.resultsLimit }}\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.3
    },
    {
      "id": "9b0fece6-5f94-4cab-9766-3093e49488f9",
      "name": "OpenAI - Analyze Image & Generate Prompt",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        688,
        224
      ],
      "parameters": {
        "operation": "message"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3a3d0afc-c114-40c2-88b7-d85ab35c9a77",
      "name": "OpenAI - Generate DALL-E Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1040,
        224
      ],
      "parameters": {
        "prompt": "={{ $json.output[0].content[0].text }}",
        "options": {
          "size": "1024x1024",
          "dalleQuality": "hd"
        },
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "36d291d3-f8ba-4ada-a2fe-29c401e1bb1b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -176
      ],
      "parameters": {
        "width": 320,
        "height": 880,
        "content": "# Remix Instagram Trends with AI to Slack\n\nThis workflow automates the process of finding visual trends on Instagram and remixing them to suit specific personal features (like skin tone) using AI. It is perfect for stylists, beauty consultants, or content creators.\n\n## How it works\n1. **Configuration:** Define hashtags and target skin tone.\n2. **Scraping:** Apify finds top posts from Instagram.\n3. **Analysis:** GPT-4o analyzes the design and creates a personalized prompt.\n4. **Generation:** DALL-E 3 creates a new image based on the prompt.\n5. **Delivery:** The result is uploaded to Slack.\n\n## Setup Requirements\n- **Apify Account:** Ensure you have the `instagram-hashtag-scraper` actor.\n- **OpenAI Account:** API key with GPT-4o & DALL-E access.\n- **Slack Account:** OAuth2 connection.\n\n## Quick Start\nOpen the **\"Workflow Configuration\"** node to set your target `hashtags` and `skinTone`."
      },
      "typeVersion": 1
    },
    {
      "id": "4ae96219-f9b5-47c1-9815-7edaaf019ef5",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 816,
        "height": 416,
        "content": "## 1. Setup & Get Data\nConfigure your search tags and style settings. The workflow scrapes Instagram trends via Apify and merges them with your preferences."
      },
      "typeVersion": 1
    },
    {
      "id": "15f66f92-71f5-42ba-ab43-7a7410f6e4ab",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        656,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 512,
        "height": 416,
        "content": "## 2. AI Analysis & Remix\nGPT-4 analyzes the visual style of the Instagram trends. Then, DALL-E 3 generates a brand new design based on that analysis."
      },
      "typeVersion": 1
    },
    {
      "id": "20da763e-6ae8-4cd3-8963-efb020dd0776",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1216,
        64
      ],
      "parameters": {
        "color": 7,
        "height": 368,
        "content": "## 3. Deliver Result\nFinally, the generated image is uploaded directly to your Slack channel for review."
      },
      "typeVersion": 1
    },
    {
      "id": "b223db4f-a070-46e5-a436-3ec3012243c6",
      "name": "Combine Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        464,
        224
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "7583bc5a-26d3-4663-ad97-cbce51a3716c",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "position": [
        1264,
        224
      ],
      "parameters": {
        "options": {
          "channelId": "C09UDKC3G2W"
        },
        "resource": "file",
        "authentication": "oAuth2"
      },
      "credentials": {
        "slackOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "a0684070-9b83-48f3-8b7f-67f139ac9a99",
  "connections": {
    "Combine Data": {
      "main": [
        [
          {
            "node": "OpenAI - Analyze Image & Generate Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Run an Actor and get dataset",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "Combine Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Test workflow'": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Generate DALL-E Image": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI - Analyze Image & Generate Prompt": {
      "main": [
        [
          {
            "node": "OpenAI - Generate DALL-E Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}