This workflow corresponds to n8n.io template #13293 — we link there as the canonical source.
This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "e8hV8OJl1nEVninK3Ezzj",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Enrich newsletter subscribers with cross-platform social data and tag in Mailchimp",
"tags": [],
"nodes": [
{
"id": "9c89047b-3ea5-4c98-8742-36d544be2a2d",
"name": "STEP 4: AI CLASSIFICATION",
"type": "n8n-nodes-base.stickyNote",
"position": [
1904,
1728
],
"parameters": {
"color": 5,
"width": 388,
"height": 596,
"content": "## \ud83e\udd16 STEP 4: AI CLASSIFICATION\n\n**GPT-4 determines creator attributes**\n\nClassifies:\n\u2022 Creator Status: non_creator | aspiring_creator | active_creator\n\u2022 Creator Tier: nano | micro | mid | macro\n\u2022 Primary Platform: Instagram, TikTok, YouTube\n\u2022 Creator Type: written, videos, shorts, podcasts\n\u2022 Niche: lifestyle, business, fitness, etc.\n\u2022 Intent Signals: affiliate_links, has_brand_deals, sells_products\n\n\u2699\ufe0f MODEL: gpt-4o-mini\n\ud83d\udd12 OUTPUT: Enforced JSON schema"
},
"typeVersion": 1
},
{
"id": "28a1d23c-ebc4-4f88-bcff-b2bcf5da2a95",
"name": "STEP 5: ROUTING LOGIC",
"type": "n8n-nodes-base.stickyNote",
"position": [
2320,
1728
],
"parameters": {
"color": 5,
"width": 356,
"height": 596,
"content": "## \ud83d\udee4\ufe0f STEP 5: ROUTING LOGIC\n\n**Business rules determine onboarding flow**\n\nDecision factors:\n\u2713 Creator tier (50K+ = high value)\n\u2713 Activity status (90+ days = dormant)\n\u2713 Intent signals (brand deals = fast track)\n\u2713 Platform presence"
},
"typeVersion": 1
},
{
"id": "3afd5f2f-2e63-429f-83fa-8ed3338a8297",
"name": "STEP 6: MAILCHIMP TAGGING",
"type": "n8n-nodes-base.stickyNote",
"position": [
2704,
1728
],
"parameters": {
"color": 5,
"width": 356,
"height": 596,
"content": "## \ud83c\udff7\ufe0f STEP 6: MAILCHIMP TAGGING\n\n**Applies tags based on classification**\n\nTags applied:\n\u2022 Creator Status tag\n\u2022 Creator Tier tag\n\u2022 Primary Platform tag\n\u2022 Primary Niche tag\n\u2022 Routing Flow tag\n\u2022 Intent Signal tags (multiple)\n\nExample:\n\u2022 `creator:active_creator`\n\u2022 `tier:micro`\n\u2022 `platform:instagram`\n\u2022 `niche:fitness`\n\u2022 `flow:affiliate_partnership`\n\u2022 `signal:has_brand_deals`"
},
"typeVersion": 1
},
{
"id": "39796caa-f0a5-42ab-8345-f999dd3477bd",
"name": "Prepare Tags for Mailchimp",
"type": "n8n-nodes-base.code",
"position": [
2736,
2176
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const data = $input.item.json;\nconst classification = data.classification || {};\nconst routing = data.routing || {};\n\nconst tags = [];\n\n// Add creator status tag\nif (classification.creator_status) {\n tags.push(`status:${classification.creator_status}`);\n}\n\n// Add creator tier tag\nif (classification.creator_tier) {\n tags.push(`tier:${classification.creator_tier}`);\n}\n\n// Add primary platform tag\nif (classification.primary_platform && classification.primary_platform !== 'unknown') {\n tags.push(`platform:${classification.primary_platform}`);\n}\n\n// Add primary niche tag\nif (classification.primary_niche) {\n tags.push(`niche:${classification.primary_niche}`);\n}\n\n// Add routing flow tag\nif (routing.flow) {\n tags.push(`flow:${routing.flow}`);\n}\n\n// Add creator type tags\nif (classification.creator_type && Array.isArray(classification.creator_type)) {\n classification.creator_type.forEach(type => {\n tags.push(`type:${type}`);\n });\n}\n\n// Add intent signal tags\nif (classification.intent_signals && Array.isArray(classification.intent_signals)) {\n classification.intent_signals.forEach(signal => {\n tags.push(`signal:${signal}`);\n });\n}\n\n// Add priority tag\nif (routing.priority) {\n tags.push(`priority:${routing.priority}`);\n}\n\nreturn {\n json: {\n email: data.email,\n list_id: data.list_id,\n subscriber_id: data.subscriber_id,\n tags: tags,\n classification: classification,\n routing: routing\n }\n};"
},
"typeVersion": 2
},
{
"id": "ad6fc32d-1c7a-499d-aa99-3f211e15cfd3",
"name": "Apply Tags to Mailchimp Member",
"type": "n8n-nodes-base.mailchimp",
"position": [
2928,
2176
],
"parameters": {
"list": "94509e241e",
"tags": [
"={{ $json.tags[1] }}",
"={{ $json.tags[2] }}",
"={{ $json.tags[7] }}"
],
"email": "={{ $('Mailchimp On-Subscriber Trigger').first().json.data.email }}",
"options": {},
"resource": "memberTag",
"operation": "delete",
"authentication": "oAuth2"
},
"credentials": {
"mailchimpOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "a4efb03b-72e0-43dd-adea-b7a9b3899663",
"name": "STEP 1: TRIGGER1",
"type": "n8n-nodes-base.stickyNote",
"position": [
784,
1728
],
"parameters": {
"color": 5,
"width": 340,
"height": 596,
"content": "## \ud83d\udce5 STEP 1: TRIGGER\n\n**Listens for new subscribers**\n\nSources:\n\u2022 Mailchimp: subscribe events\n\u2022 ActiveCampaign: new contacts\n\u2022 Drift\n\nExtracts:\n\u2022 Email (required)\n\u2022 First/Last name\n\u2022 Tags\n\u2022 Source platform"
},
"typeVersion": 1
},
{
"id": "d50387ab-e758-477b-bc6a-9ff15a7141f4",
"name": "STEP 2: EXTRACT DATA1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1152,
1728
],
"parameters": {
"color": 5,
"width": 340,
"height": 592,
"content": "## \ud83d\udd0d STEP 2: EXTRACT DATA\n\n**Normalizes different input formats**\n\nHandles 3 sources:\n1. Mailchimp: `data.email`, `data.merge_fields.FNAME`\n2. ActiveCampaign: `contact.email`, `contact.first_name`\n3. Direct: `email` field\n\nValidation:\n\u2705 Email is required - throws error if missing\n\u2705 Email cleaned (lowercase, trimmed)\n\u2705 Source detected automatically"
},
"typeVersion": 1
},
{
"id": "cd8ff554-2107-406b-b0ed-13d255134f7f",
"name": "STEP 3: API ENRICHMENT1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
1728
],
"parameters": {
"color": 5,
"width": 340,
"height": 600,
"content": "## \ud83d\udd0d STEP 3: API ENRICHMENT\n\n**Calls influencers.club API**\n\nEndpoint: `/public/v1/creators/enrich/email/`\n\nResponse includes:\n\u2022 Main platform data\n\u2022 Follower counts & engagement\n\u2022 Niche classifications\n\u2022 Brand deal signals\n\u2022 Audience demographics"
},
"typeVersion": 1
},
{
"id": "758f7385-79cf-4705-8047-fa71935cb685",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1872,
2400
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "d4140f74-f632-45a5-80f4-40bc82f29ff5",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2224,
2400
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"required\": [\n \"creator_status\",\n \"creator_tier\",\n \"creator_type\",\n \"primary_niche\",\n \"primary_platform\",\n \"intent_signals\"\n ],\n \"properties\": {\n \"creator_status\": {\n \"type\": \"string\",\n \"enum\": [\"non_creator\", \"aspiring_creator\", \"active_creator\"]\n },\n \"creator_tier\": {\n \"type\": \"string\",\n \"enum\": [\"nano\", \"micro\", \"mid\", \"macro\"]\n },\n \"creator_type\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"written\", \"videos\", \"shorts\", \"podcasts\"]\n }\n },\n \"primary_niche\": {\n \"type\": \"string\",\n \"enum\": [\"lifestyle\", \"business\", \"fitness\", \"entertainment\", \"education\", \"other\"]\n },\n \"primary_platform\": {\n \"type\": \"string\",\n \"enum\": [\"instagram\", \"tiktok\", \"youtube\", \"unknown\"]\n },\n \"primary_platform_why\": {\n \"type\": \"string\"\n },\n \"intent_signals\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\"affiliate_links\", \"has_brand_deals\", \"sells_products\"]\n }\n }\n },\n \"additionalProperties\": false\n}\n"
},
"typeVersion": 1.3
},
{
"id": "729ea429-2e8f-4518-a991-9505ce6194f5",
"name": "Mailchimp On-Subscriber Trigger",
"type": "n8n-nodes-base.mailchimpTrigger",
"position": [
896,
2112
],
"parameters": {
"list": "94509e241e",
"events": [
"subscribe"
],
"sources": [
"user"
],
"authentication": "oAuth2"
},
"credentials": {
"mailchimpOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "67d3fe2e-6329-4a9d-8da3-75b98da8fd53",
"name": "Extract Subscriber Present Data",
"type": "n8n-nodes-base.code",
"position": [
1264,
2112
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const item = $input.item.json;\nlet email = null;\nlet firstName = null;\nlet lastName = null;\nlet tags = [];\nlet source = 'unknown';\nlet listId = null;\nlet subscriberId = null;\n\nif (item.type === 'subscribe' && item.data) {\n email = item.data.email;\n firstName = item.data.merge_fields?.FNAME || null;\n lastName = item.data.merge_fields?.LNAME || null;\n listId = item.data.list_id;\n subscriberId = item.data.id;\n source = 'mailchimp';\n} else if (item.contact) {\n email = item.contact.email;\n firstName = item.contact.first_name || null;\n lastName = item.contact.last_name || null;\n tags = item.contact.tags || [];\n source = 'activecampaign';\n} else if (item.email) {\n email = item.email;\n source = 'direct';\n}\n\nif (!email) {\n throw new Error('No email found in trigger data');\n}\n\nreturn {\n json: {\n email: email.toLowerCase().trim(),\n first_name: firstName,\n last_name: lastName,\n tags: tags,\n source: source,\n list_id: listId,\n subscriber_id: subscriberId,\n timestamp: new Date().toISOString(),\n original_data: item\n }\n};"
},
"typeVersion": 2
},
{
"id": "82635ddf-8090-4dfe-9fdb-72701b78ec31",
"name": "Classificator",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1984,
2112
],
"parameters": {
"text": "={{ JSON.stringify($json) }}",
"options": {
"systemMessage": "=You will receive a JSON object representing an enriched newsletter subscriber.\n\nReturn ONLY valid JSON matching the provided schema. No extra keys. No explanations outside JSON.\n\nCLASSIFICATION RULES\n\n1) creator_status\n- non_creator: is_creator is false OR no social accounts exist\n- aspiring_creator: is_creator is true AND all follower counts are below 10,000\n- active_creator: is_creator is true AND at least one platform has 10,000+ followers\n\n2) creator_tier\nUse the MAX audience size across platforms:\n- instagram.follower_count\n- tiktok.follower_count\n- youtube.subscriber_count\nTier thresholds:\n- nano: < 10,000\n- micro: 10,000\u201399,999\n- mid: 100,000\u2013499,999\n- macro: >= 500,000\n\n3) primary_platform (REQUIRED)\nCompute deterministically using these rules in order:\nA) Choose the platform with the highest audience size:\n - Instagram = instagram.follower_count\n - TikTok = tiktok.follower_count\n - YouTube = youtube.subscriber_count\nB) If there is a tie, prefer the platform with the higher posting frequency in recent months:\n - instagram.posting_frequency_recent_months\n - tiktok.posting_frequency_recent_months\n - youtube.posting_frequency_recent_months\nC) If still tied or missing, prefer in this order: tiktok > instagram > youtube\nD) If no platform data exists, set \"unknown\"\n\nAlso include primary_platform_why as a short reason, e.g.\n\"tiktok has the highest audience (212,442 followers)\"\n\n4) creator_type\nInfer applicable content types:\n- written (if bio/description indicates writing OR platform presence without video indicators)\n- videos (YouTube presence or general video creator language)\n- shorts (TikTok presence OR Instagram reels percentage/short-form indicators)\n- podcasts (only if explicitly indicated)\nReturn an array.\n\n5) primary_niche\nChoose the most relevant niche from niche_class or niche_sub_class, normalize to:\nlifestyle, business, fitness, entertainment, education, other\n\n6) intent_signals (MULTIPLE ALLOWED)\nAdd ALL that apply:\n- affiliate_links if promotes_affiliate_links is true OR affiliate/monetization URLs detected in links_in_bio/external_urls\n- has_brand_deals if has_brand_deals is true\n- sells_products if has_merch is true OR store/checkout URLs detected in links_in_bio/external_urls\nIf none apply, return [].\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3.1
},
{
"id": "59a61098-0f0e-4d9d-9fc8-494efeedb8ee",
"name": "Determine Routing",
"type": "n8n-nodes-base.code",
"position": [
2448,
2112
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "function daysSinceDate(dateStr) {\n try {\n if (!dateStr) return null;\n const postDate = new Date(dateStr);\n if (isNaN(postDate.getTime())) return null;\n const now = new Date();\n return Math.ceil((now - postDate) / (1000 * 60 * 60 * 24));\n } catch {\n return null;\n }\n}\n\nfunction checkIfDormant(data) {\n const platforms = ['instagram', 'tiktok', 'youtube', 'twitter'];\n let mostRecentPostDays = null;\n\n for (const platform of platforms) {\n const platformData = data?.[platform];\n if (!platformData) continue;\n\n let lastPostDate = null;\n if (platform === 'instagram') lastPostDate = platformData.most_recent_post_date;\n if (platform === 'tiktok') lastPostDate = platformData.last_post_date;\n if (platform === 'youtube') lastPostDate = platformData.last_uploaded;\n\n if (lastPostDate) {\n const daysSince = daysSinceDate(lastPostDate);\n if (daysSince !== null && (mostRecentPostDays === null || daysSince < mostRecentPostDays)) {\n mostRecentPostDays = daysSince;\n }\n }\n }\n\n return mostRecentPostDays !== null && mostRecentPostDays >= 90;\n}\n\nfunction getMaxFollowers(data) {\n return Math.max(\n data?.instagram?.follower_count || 0,\n data?.tiktok?.follower_count || 0,\n data?.youtube?.subscriber_count || 0,\n data?.twitter?.follower_count || 0\n );\n}\n\nfunction determineRouting(classification, creatorData) {\n const routing = {\n flow: null,\n priority: 'standard',\n actions: [],\n notes: null,\n email_template: null,\n crm_actions: [],\n slack_alert: false\n };\n\n const status = classification.creator_status;\n const tier = classification.creator_tier;\n const intentSignals = classification.intent_signals || [];\n\n const isDormant = checkIfDormant(creatorData);\n const maxFollowers = getMaxFollowers(creatorData);\n const isHighValue = maxFollowers >= 50000;\n\n if (isDormant && isHighValue) {\n routing.flow = 'dormant_reactivation';\n routing.priority = 'medium-high';\n routing.slack_alert = true;\n return routing;\n }\n\n if (status === 'non_creator') {\n routing.flow = 'standard_newsletter';\n routing.priority = 'low';\n return routing;\n }\n\n if (status === 'aspiring_creator') {\n routing.flow = 'education_and_growth';\n routing.priority = 'medium';\n return routing;\n }\n\n if (status === 'active_creator') {\n if (tier === 'mid' || tier === 'macro') {\n routing.flow = 'partnership_team';\n routing.priority = 'high';\n routing.slack_alert = true;\n return routing;\n }\n\n if (tier === 'micro') {\n if (intentSignals.includes('has_brand_deals')) {\n routing.flow = 'fast_track_ambassador';\n routing.priority = 'high';\n routing.slack_alert = true;\n return routing;\n }\n\n routing.flow = 'affiliate_partnership';\n routing.priority = 'medium-high';\n return routing;\n }\n\n routing.flow = 'ambassador_program';\n routing.priority = 'medium';\n }\n\n if (!routing.flow) {\n routing.flow = 'standard_newsletter';\n }\n\n return routing;\n}\n\nconst inputData = $input.item.json;\nconst classification = inputData.classification || inputData.output || {};\nconst creatorData = inputData.creator_data || inputData.creatorData || {};\nconst subscriber = inputData.subscriber || {};\nconst routing = determineRouting(classification, creatorData);\n\nreturn {\n json: {\n email: subscriber.email || inputData.email,\n list_id: subscriber.list_id || inputData.list_id,\n subscriber_id: subscriber.subscriber_id || inputData.subscriber_id,\n classification,\n routing,\n timestamp: new Date().toISOString()\n }\n};\n"
},
"typeVersion": 2
},
{
"id": "03076550-9bea-4ecb-ba06-19fa35a5e6eb",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1584,
1456
],
"parameters": {
"color": 4,
"width": 752,
"content": "## Enrich newsletter subscribers with social media data and direct them to personalized partner and ambassador email flows\n**Step by step workflow to enrich subscriber emails with multi social (Instagram, Tiktok, Youtube, Twitter, Onlyfans, Twitch and more) and add a campaign tag using the influencer.club API**. [Full explanation](https://influencers.club/creatorbook/turn-newsletter-subscribers-into-creator-ambassadors/"
},
"typeVersion": 1
},
{
"id": "8ad669b3-7aeb-453b-9b2e-8968523d362f",
"name": "Enrich by Email",
"type": "n8n-nodes-influencersclub.influencersClub",
"position": [
1648,
2112
],
"parameters": {
"email": "={{ $json.email }}"
},
"credentials": {
"influencersClubApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"binaryMode": "separate",
"availableInMCP": false,
"executionOrder": "v1"
},
"versionId": "e317abd7-4ffa-4fc9-9adc-e88d629fb2b0",
"connections": {
"Classificator": {
"main": [
[
{
"node": "Determine Routing",
"type": "main",
"index": 0
}
]
]
},
"Enrich by Email": {
"main": [
[
{
"node": "Classificator",
"type": "main",
"index": 0
}
]
]
},
"Determine Routing": {
"main": [
[
{
"node": "Prepare Tags for Mailchimp",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Classificator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Classificator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Prepare Tags for Mailchimp": {
"main": [
[
{
"node": "Apply Tags to Mailchimp Member",
"type": "main",
"index": 0
}
]
]
},
"Apply Tags to Mailchimp Member": {
"main": [
[]
]
},
"Extract Subscriber Present Data": {
"main": [
[
{
"node": "Enrich by Email",
"type": "main",
"index": 0
}
]
]
},
"Mailchimp On-Subscriber Trigger": {
"main": [
[
{
"node": "Extract Subscriber Present Data",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
influencersClubApimailchimpOAuth2ApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
How it works:
Source: https://n8n.io/workflows/13293/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
How it works:
How it works:
How it works:
How it works:
How it works: