{
  "name": "Identify creators in Salesforce loyalty contacts with Influencers Club, GPT-4o-mini and SendGrid",
  "nodes": [
    {
      "id": "d50c8ee8-ba01-4308-9c1a-3d019792b637",
      "name": "Sticky Note - Header",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2640,
        12480
      ],
      "parameters": {
        "width": 920,
        "height": 600,
        "content": "## 🎯 Discover Creators Among Loyalty Program Customers and Activate Tiered Ambassador Programs\n\n\n### Setup steps\n\n**Required accounts:**\n- Salesforce (with loyalty_tier custom field)\n- influencers.clu"
      }
    },
    {
      "id": "e9301f6b-8818-4968-ba58-657c77aae2ac",
      "name": "Sticky Note - Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8656,
        12576
      ],
      "parameters": {
        "width": 680,
        "height": 376,
        "content": "**📋 SALESFORCE SETUP CHECKLIST**\n\nCreate these custom fields on the Contact object before running:\n\n✅ **Creator Info:** Is_Creator__c, Creator_Tier__c, Creator_Niche__c, Creator_Subcategory__c, Primar"
      }
    },
    {
      "id": "43b79df3-0e3c-4473-b108-53ecf2b610a2",
      "name": "Route Logic",
      "type": "n8n-nodes-base.code",
      "position": [
        5648,
        12896
      ]
    },
    {
      "id": "f4a3ee4d-d3db-481f-8230-7b699fef4125",
      "name": "Activation",
      "type": "n8n-nodes-base.code",
      "position": [
        7120,
        12784
      ]
    },
    {
      "id": "2c4a726b-9cde-45a5-9515-56f177b89a4f",
      "name": "Switch",
      "type": "n8n-nodes-base.switch",
      "position": [
        7568,
        12752
      ]
    },
    {
      "id": "e98ac0b7-2b1a-4e9e-a51f-3a02c5a93f24",
      "name": "Send Email",
      "type": "n8n-nodes-base.sendGrid",
      "position": [
        8368,
        12784
      ]
    },
    {
      "id": "940a3172-5e7b-45fd-8529-6a2e873c8504",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3616,
        12608
      ],
      "parameters": {
        "width": 360,
        "height": 452,
        "content": "## STEP 1: Trigger on Contact Created\n\nMonitors Salesforce for newly created contacts and fires immediately. Captures contact ID, email, name, loyalty tier, and other relevant fields for downstream pr"
      }
    },
    {
      "id": "a86fa5c7-d242-4a47-91d1-6064133876b8",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4000,
        12608
      ],
      "parameters": {
        "width": 376,
        "height": 452,
        "content": "## STEP 2: Extract Contact Details\n\nMaps Salesforce contact fields to a clean data object including email address (required for enrichment), name, loyalty tier, lifetime value, and signup date. Provid"
      }
    },
    {
      "id": "c9293338-e009-4aac-b81a-65b42d0cc939",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6976,
        12576
      ],
      "parameters": {
        "width": 400,
        "height": 372,
        "content": "## STEP 8: Ambassador Activation \n\nAssigns creators to tiered programs based on engagement, brand fit, and value: Elite (macro/mid, 5%+ engagement, 15% commission), Core (micro/mid, 4%+ engagement, 12"
      }
    },
    {
      "id": "be21edf0-7f1b-42cb-b476-6c03cf13caad",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7440,
        12576
      ],
      "parameters": {
        "width": 360,
        "height": 404,
        "content": "## STEP 9: Route by Tier\n\nSwitch node routes by ambassador tier: Elite (0) → Manual review. Core (1) → Automated monitoring. Rising (2) → Full automation. Standard/None (3) → Pure automation. Each pat"
      }
    },
    {
      "id": "e82add4c-577a-46c5-8c94-048723869327",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7840,
        12560
      ],
      "parameters": {
        "width": 344,
        "height": 468,
        "content": "## STEP 10: Update Salesforce CRM\n\nWrites 20+ custom fields to the Salesforce Contact record: creator classification (tier, niche, platform), social metrics (followers, engagement, username), partners"
      }
    },
    {
      "id": "12ccba62-8802-47a3-866a-14b3e21b0ad9",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8240,
        12560
      ],
      "parameters": {
        "width": 360,
        "height": 404,
        "content": "## STEP 11: Send Personalized Email\n\nDelivers AI-generated, tier-appropriate email via SendGrid. Uses real person as sender (not marketing@) for higher open rates. Includes personalized subject, recog"
      }
    },
    {
      "id": "22f42ff9-5672-46f8-9eb1-427584a1c50a",
      "name": "Merge2",
      "type": "n8n-nodes-base.merge",
      "position": [
        6784,
        12672
      ]
    },
    {
      "id": "c84702e4-1bb1-420f-bb25-f6d89d218d4d",
      "name": "Sticky Note14",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4864,
        12048
      ],
      "parameters": {
        "width": 508,
        "height": 1184,
        "content": "##  STEP 5: AI Creator Classification Agent\n\n**What happens here:**\nAI agent analyzes enriched social data and classifies the creator across 8 dimensions for partnership intelligence.\n\n**Classificatio"
      }
    },
    {
      "id": "1ca2ce20-c288-4aee-9f8f-4a44c48f6ad6",
      "name": "Sticky Note15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5456,
        12064
      ],
      "parameters": {
        "width": 500,
        "height": 1168,
        "content": "##  STEP 6: Intelligent Routing Logic\n\n**4 Routing Strategies:**\n\n**Route 1: Ambassador Program**\n- Criteria: Micro/Mid/Macro tier\n- Perks: Discount codes, monthly products, commissions, featured plac"
      }
    },
    {
      "id": "27a7de65-760b-454f-a946-804189c34501",
      "name": "Sticky Note16",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6016,
        12064
      ],
      "parameters": {
        "width": 668,
        "height": 1156,
        "content": "##  STEP 7: AI-Powered Message Personalization\n\n**Generated content:**\n\n1. **Email Subject:** Contextual, references achievements, avoids marketing language (40-60 chars)\n\n2. **Email Body:** Recogniti"
      }
    },
    {
      "id": "478078a4-c4dc-4d70-9db1-b58862c4335a",
      "name": "Step 2 Header1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4416,
        12480
      ],
      "parameters": {
        "width": 376,
        "height": 590,
        "content": "##  STEP 3: Enrich Creator Profile\n\n**API Call to influencers.club**\n- Uses `/public/v1/creators/enrich/email/`\n- Input: Creator email from Salesforce contact\n- Output: Complete main-platform profile\n"
      }
    },
    {
      "id": "8243b04c-1869-49cd-bb44-8b7764d20b33",
      "name": "OpenAI Classifier Model4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        4896,
        13104
      ]
    },
    {
      "id": "3235e9dc-f0dc-459d-ae89-ddbc6b76e9f5",
      "name": "Classification Output Parser4",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        5264,
        13104
      ]
    },
    {
      "id": "98c5a6f8-474b-47d9-8f26-e3d4e245832e",
      "name": "AI Creator Classification Agent4",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        5008,
        12896
      ]
    },
    {
      "id": "e11d12e7-7918-4f0e-9f5b-c78909fd8170",
      "name": "Classification Output Parser5",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        6496,
        13088
      ]
    },
    {
      "id": "12232300-d95d-4c1f-83a1-29741aa73c33",
      "name": "AI Creator Classification Agent5",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        6240,
        12880
      ]
    },
    {
      "id": "82f1c5f3-e712-4d98-9cbc-de2cae13b96c",
      "name": "OpenAI Classifier Model5",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        6112,
        13088
      ]
    },
    {
      "id": "1678c299-8137-44a7-9a36-f1fce067b33f",
      "name": "Extract Data Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        4144,
        12896
      ]
    },
    {
      "id": "a3725467-64c9-4172-9737-bb72659eb252",
      "name": "Salesforce Trigger",
      "type": "n8n-nodes-base.salesforceTrigger",
      "position": [
        3776,
        12896
      ]
    },
    {
      "id": "0ff1e88d-b4b7-4873-8fd6-bde5bf406149",
      "name": "Update a contact",
      "type": "n8n-nodes-base.salesforce",
      "position": [
        7952,
        12848
      ]
    },
    {
      "id": "86c4ad7a-6b5c-4160-b4d6-f39861ba35ac",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5536,
        11520
      ],
      "parameters": {
        "width": 752,
        "height": null,
        "content": "## Find and activate creators inside your loyalty program\n**Step by step workflow to enrich loyalty programme customers emails on Salesforce with multi social (Instagram, Tiktok, Youtube, Twitter, Onl"
      }
    },
    {
      "id": "f7c02ff5-f991-47f5-a2d4-b51364cb2c5d",
      "name": "Enrich by Email",
      "type": "n8n-nodes-influencersclub.influencersClub",
      "position": [
        4560,
        12896
      ]
    }
  ],
  "connections": {
    "Merge2": {
      "main": [
        [
          {
            "node": "Activation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch": {
      "main": [
        [
          {
            "node": "Update a contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update a contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update a contact",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Update a contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Activation": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Logic": {
      "main": [
        [
          {
            "node": "AI Creator Classification Agent5",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich by Email": {
      "main": [
        [
          {
            "node": "AI Creator Classification Agent4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update a contact": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Salesforce Trigger": {
      "main": [
        [
          {
            "node": "Extract Data Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Data Fields": {
      "main": [
        [
          {
            "node": "Enrich by Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Classifier Model4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Creator Classification Agent4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Classifier Model5": {
      "ai_languageModel": [
        [
          {
            "node": "AI Creator Classification Agent5",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Classification Output Parser4": {
      "ai_outputParser": [
        [
          {
            "node": "AI Creator Classification Agent4",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Classification Output Parser5": {
      "ai_outputParser": [
        [
          {
            "node": "AI Creator Classification Agent5",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Creator Classification Agent4": {
      "main": [
        [
          {
            "node": "Route Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Creator Classification Agent5": {
      "main": [
        [
          {
            "node": "Merge2",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}