{
  "name": "Vet Instagram, TikTok and YouTube influencers by engagement rate and brand fit with SocialTap and OpenAI",
  "nodes": [
    {
      "parameters": {
        "content": "## Vet a list of creators before you reach out\n\nPaste handles or profile links. For each creator you get followers, engagement rate (mean and median), views per post and posting cadence from their recent posts, plus an AI read on brand fit and risks. The shortlist is saved and shown best fit first.\n\n### How it works\n1. The form takes creators (one per line), a default platform for bare handles, what you sell and a minimum follower count.\n2. A profile link picks its own platform: Instagram, TikTok or YouTube.\n3. SocialTap's engagement operation reads each creator's profile and recent posts and computes the rates.\n4. OpenAI rates brand fit from their bio and captions, with risks.\n5. Rows go to the **Creator shortlist** data table, and the form shows them ranked.\n\nThe rates come from each creator's recent public posts. Private accounts can't be vetted.\n\n### Setup\n- Install the community node **n8n-nodes-socialtap** (Settings → Community nodes → Install). Tested with n8n 2.49.8 and n8n-nodes-socialtap 1.621.43. Until n8n verifies it, it runs on self-hosted n8n. [Install guide](https://socialtap.dev/docs/integrations/#n8n)\n- Add a **SocialTap API** credential: [create a free account](https://socialtap.dev/signup/?ref=n8n-creator-vetting) and paste its API key. Each operation shows its price, and failed requests are free.\n- Add an **OpenAI** credential to the model node.\n- Open the form's URL and paste your list.\n\n### Customization\n- Change what counts as a good fit in **Rate the fit**.\n- Add Instagram's similar accounts operation to grow the list from your best match.\n\n![The workflow](https://socialtap.dev/n8n/vet-creators.svg)",
        "height": 900,
        "width": 600
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -640,
        0
      ],
      "id": "09021505-f28d-4426-9c66-6355c04979f8",
      "name": "Overview"
    },
    {
      "parameters": {
        "formTitle": "Vet creators",
        "formDescription": "Engagement and brand fit for a list of Instagram, TikTok and YouTube creators.",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Creators",
              "fieldType": "textarea",
              "placeholder": "One handle or profile link per line",
              "requiredField": true
            },
            {
              "fieldLabel": "Platform for bare handles",
              "fieldType": "dropdown",
              "requiredField": true,
              "fieldOptions": {
                "values": [
                  {
                    "option": "Instagram"
                  },
                  {
                    "option": "TikTok"
                  },
                  {
                    "option": "YouTube"
                  }
                ]
              }
            },
            {
              "fieldLabel": "What you sell",
              "fieldType": "textarea",
              "placeholder": "Plant-based protein powder for runners",
              "requiredField": true
            },
            {
              "fieldLabel": "Minimum followers",
              "fieldType": "number",
              "placeholder": "10000"
            }
          ]
        },
        "responseMode": "lastNode",
        "options": {
          "path": "vet-creators",
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.3,
      "position": [
        0,
        340
      ],
      "id": "fe0067e0-6b73-4531-8749-2f3d5b0f9e74",
      "name": "Paste creators",
      "webhookId": "0bf0a947-a8b0-4f7a-ba04-5581b8510b1d"
    },
    {
      "parameters": {
        "resource": "table",
        "operation": "create",
        "tableName": "Creator shortlist",
        "columns": {
          "column": [
            {
              "name": "vetted_at",
              "type": "string"
            },
            {
              "name": "platform",
              "type": "string"
            },
            {
              "name": "username",
              "type": "string"
            },
            {
              "name": "url",
              "type": "string"
            },
            {
              "name": "followers",
              "type": "number"
            },
            {
              "name": "engagement_rate",
              "type": "number"
            },
            {
              "name": "median_engagement_rate",
              "type": "number"
            },
            {
              "name": "views_per_post",
              "type": "number"
            },
            {
              "name": "posts_per_week",
              "type": "number"
            },
            {
              "name": "fit",
              "type": "number"
            },
            {
              "name": "audience",
              "type": "string"
            },
            {
              "name": "risks",
              "type": "string"
            },
            {
              "name": "verdict",
              "type": "string"
            }
          ]
        },
        "options": {
          "createIfNotExists": true
        }
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        240,
        340
      ],
      "id": "e4e7fc70-13ae-4ba9-b606-be087f2d7f64",
      "name": "Create table",
      "executeOnce": true
    },
    {
      "parameters": {
        "jsCode": "// Each line: a profile link names its platform; a bare handle takes the form's platform. At most 50.\nconst form = $('Paste creators').first().json;\nconst fallback = String(form['Platform for bare handles'] || 'Instagram').toLowerCase();\nconst hosts = { 'instagram.com': 'instagram', 'instagr.am': 'instagram', 'tiktok.com': 'tiktok', 'youtube.com': 'youtube', 'youtu.be': 'youtube' };\nconst seen = new Set();\nconst out = [];\nfor (const raw of String(form['Creators']).split(/[\\n,]/)) {\n  const line = raw.trim();\n  if (!line) continue;\n  const host = line.replace(/^[a-z]+:\\/\\//i, '').split(/[\\/?#]/)[0].toLowerCase().replace(/^(www|m)\\./, '');\n  const platform = hosts[host] ?? fallback;\n  const handle = hosts[host] ? line : line.replace(/^@/, '');\n  if (seen.has(platform + ':' + handle.toLowerCase())) continue;\n  seen.add(platform + ':' + handle.toLowerCase());\n  out.push({ json: { platform, handle } });\n}\nreturn out.slice(0, 50);"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        460,
        340
      ],
      "id": "2b8c9515-9191-44b5-8584-930a24cf017f",
      "name": "One item per creator"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "f9459a3c-91df-4a2c-8fda-d5f920648907",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "instagram",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Instagram"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "76dfd649-cddc-4156-a5c5-338bac9abaa6",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "tiktok",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "TikTok"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "0d0fbe80-1e3e-4e28-86b1-3c9d744e7e20",
                    "leftValue": "={{ $json.platform }}",
                    "rightValue": "youtube",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "YouTube"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        680,
        340
      ],
      "id": "67928f42-a59d-47bb-aee1-374ad5f15c39",
      "name": "By platform"
    },
    {
      "parameters": {
        "content": "## 1. Measure engagement\nProfile, recent posts and engagement rates per creator. A creator that fails is reported.",
        "height": 720,
        "width": 300,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        880,
        -20
      ],
      "id": "6524dc76-429a-451d-bfba-a77f2e2b4157",
      "name": "Measure"
    },
    {
      "parameters": {
        "resource": "instagram",
        "operation": "instagram.engagement",
        "handle": "={{ $json.handle }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        960,
        160
      ],
      "id": "e480a8ee-9593-4256-a438-d72a4f242049",
      "name": "Instagram engagement",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "tiktok",
        "operation": "tiktok.engagement",
        "handle": "={{ $json.handle }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        960,
        360
      ],
      "id": "b007b7f7-8e82-4453-af51-c0e0a0346824",
      "name": "TikTok engagement",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "resource": "youtube",
        "operation": "youtube.engagement",
        "handle": "={{ $json.handle }}"
      },
      "type": "n8n-nodes-socialtap.socialTap",
      "typeVersion": 1,
      "position": [
        960,
        560
      ],
      "id": "6d2e99c6-745f-449b-862e-c379c9d40da4",
      "name": "YouTube engagement",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "numberInputs": 3
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        1240,
        360
      ],
      "id": "c22e6311-055b-41de-9929-3477867ff4f5",
      "name": "All creators"
    },
    {
      "parameters": {
        "jsCode": "// The numbers that matter per creator, recent captions for the model, and the failures with their reason.\nconst min = Number($('Paste creators').first().json['Minimum followers']) || 0;\nconst pct = (x) => (x == null ? null : Math.round(x * 10000) / 100);\nconst out = [];\n$input.all().forEach(({ json: e }, i) => {\n  const asked = $('One item per creator').itemMatching(i)?.json ?? {};\n  if (!e.profile) {\n    out.push({ json: { platform: asked.platform, username: asked.handle, failed: e.error || 'not found' } });\n    return;\n  }\n  const p = e.profile;\n  const followers = p.metrics?.follower_count ?? null;\n  if (followers != null && followers < min) {\n    out.push({ json: { platform: p.platform, username: p.username, failed: 'below the minimum, with ' + followers.toLocaleString('en-US') + ' followers' } });\n    return;\n  }\n  out.push({ json: {\n    platform: p.platform,\n    username: p.username,\n    url: p.url,\n    bio: (p.bio ?? '').slice(0, 500),\n    followers,\n    engagement_rate: pct(e.metrics?.engagement_rate),\n    median_engagement_rate: pct(e.metrics?.median_engagement_rate),\n    views_per_post: e.metrics?.views_per_post == null ? null : Math.round(e.metrics.views_per_post),\n    posts_per_week: e.metrics?.posts_per_week == null ? null : Math.round(e.metrics.posts_per_week * 10) / 10,\n    captions: (e.posts ?? []).slice(0, 12).map((x) => (x.post?.text || x.post?.title || '').slice(0, 300)).filter(Boolean),\n  } });\n});\nreturn out;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        1460,
        360
      ],
      "id": "9246f54f-cfcc-4452-b2c1-f3a8b013092a",
      "name": "Key numbers"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "not-failed",
              "leftValue": "={{ $json.failed }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "empty",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1680,
        360
      ],
      "id": "2503e2fc-d826-4c60-8af7-ac5a6480f4ed",
      "name": "Vetted?"
    },
    {
      "parameters": {
        "content": "## 2. Rate the fit\nOpenAI reads the bio and recent captions: fit from 1 to 10, the audience, risks and a one-line verdict.",
        "height": 560,
        "width": 440,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1880,
        120
      ],
      "id": "778f8695-0089-4f46-a1ed-d882457da6ca",
      "name": "Fit"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=We sell: {{ $('Paste creators').first().json['What you sell'] }}\n\nCreator: @{{ $json.username }} on {{ $json.platform }}, {{ $json.followers }} followers\nEngagement rate: {{ $json.engagement_rate }}% (median {{ $json.median_engagement_rate }}%), {{ $json.posts_per_week }} posts a week\nBio: {{ $json.bio }}\nRecent captions:\n{{ $json.captions.map((c) => '- ' + c).join('\\n') }}",
        "hasOutputParser": true,
        "messages": {
          "messageValues": [
            {
              "message": "You vet creators for brand partnerships. From the bio and recent captions only:\nfit: 1 to 10, how well their content and audience match what we sell\naudience: who seems to follow them, in a few words\nrisks: anything a brand should check (competitor deals, controversial topics, mostly reposts, off-topic content), or \"none seen\"\nverdict: one sentence, reach out or skip and why\nNever guess numbers the input doesn't give."
            }
          ]
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.7,
      "position": [
        1960,
        300
      ],
      "id": "b53d0197-3991-45c3-a9dc-124768aad872",
      "name": "Rate the fit"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {
          "temperature": 0.4
        }
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        1940,
        520
      ],
      "id": "7d16031d-4afd-40a6-a006-076ea6b78bb5",
      "name": "OpenAI"
    },
    {
      "parameters": {
        "jsonSchemaExample": "{\n  \"fit\": 8,\n  \"audience\": \"Runners training for their first marathon\",\n  \"risks\": \"none seen\",\n  \"verdict\": \"Reach out: every week covers fueling for long runs.\"\n}"
      },
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "typeVersion": 1.3,
      "position": [
        2140,
        520
      ],
      "id": "5159a214-edd2-451e-b33a-942ff7833aeb",
      "name": "Fit format"
    },
    {
      "parameters": {
        "content": "## 3. Save and show\nRows go to the Creator shortlist data table; the form shows them best fit first, with failures listed.",
        "height": 420,
        "width": 1100,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2380,
        120
      ],
      "id": "11b44361-4540-448a-b289-bd704ab16455",
      "name": "Save"
    },
    {
      "parameters": {
        "jsCode": "// One row per vetted creator: the numbers and the model's answer.\nconst creators = $('Vetted?').all();\nconst vetted_at = $now.toISO();\nreturn $input.all().map((item, i) => {\n  const { bio, captions, ...c } = creators[i].json;\n  const o = item.json.output ?? {};\n  return { json: { vetted_at, ...c, fit: Number(o.fit) || null, audience: o.audience ?? '', risks: o.risks ?? '', verdict: o.verdict ?? '' } };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        2440,
        300
      ],
      "id": "e664dd11-8e89-4792-a86f-190e58d39a83",
      "name": "Rows"
    },
    {
      "parameters": {
        "resource": "row",
        "operation": "insert",
        "dataTableId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('Create table').first().json.id }}"
        },
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.dataTable",
      "typeVersion": 1.1,
      "position": [
        2660,
        300
      ],
      "id": "98c5f70a-eb4f-4acd-bd13-83b627a14a22",
      "name": "Save to data table"
    },
    {
      "parameters": {
        "jsCode": "// The page the form shows: a table best fit first, then what failed.\nconst esc = (s) => String(s ?? '').replace(/[&<>\"]/g, (c) => ({ '&': '&amp;', '<': '&lt;', '>': '&gt;', '\"': '&quot;' })[c]);\nconst num = (x, suffix = '') => (x == null ? '–' : Number(x).toLocaleString('en-US') + suffix);\nconst rows = $('Rows').isExecuted ? $('Rows').all().map((i) => i.json).sort((a, b) => (b.fit ?? 0) - (a.fit ?? 0)) : [];\nconst failed = $('Key numbers').all().map((i) => i.json).filter((c) => c.failed);\nconst td = 'style=\"padding:6px;border-bottom:1px solid #ddd;text-align:left;vertical-align:top\"';\nconst table = rows.length ? '<table style=\"border-collapse:collapse;font-size:13px\"><tr><th ' + td + '>Creator</th><th ' + td + '>Followers</th><th ' + td + '>Engagement (median)</th><th ' + td + '>Views/post</th><th ' + td + '>Posts/week</th><th ' + td + '>Fit</th><th ' + td + '>Verdict</th></tr>'\n  + rows.map((r) => '<tr><td ' + td + '><a href=\"' + esc(r.url) + '\">@' + esc(r.username) + '</a><br><small>' + esc(r.platform) + '</small></td><td ' + td + '>' + num(r.followers)\n  + '</td><td ' + td + '>' + num(r.engagement_rate, '%') + ' (' + num(r.median_engagement_rate, '%') + ')</td><td ' + td + '>' + num(r.views_per_post) + '</td><td ' + td + '>' + num(r.posts_per_week)\n  + '</td><td ' + td + '><b>' + num(r.fit) + '</b></td><td ' + td + '>' + esc(r.verdict) + '<br><small>Audience: ' + esc(r.audience) + '. Risks: ' + esc(r.risks) + '</small></td></tr>').join('') + '</table>'\n  : '<p>No creator could be vetted.</p>';\nconst fails = failed.length ? '<h3>Not vetted</h3><ul>' + failed.map((c) => '<li>' + esc(c.platform) + ' @' + esc(c.username) + ': ' + esc(c.failed) + '</li>').join('') + '</ul>' : '';\nreturn [{ json: { html: '<h2>' + rows.length + ' creator' + (rows.length === 1 ? '' : 's') + ' vetted</h2><p>Also saved to the Creator shortlist data table.</p>' + table + fails } }];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        3100,
        360
      ],
      "id": "826474b3-57d6-4c7c-b2a1-65bea03af184",
      "name": "Results page",
      "executeOnce": true
    },
    {
      "parameters": {
        "operation": "completion",
        "respondWith": "showText",
        "responseText": "={{ $json.html }}"
      },
      "type": "n8n-nodes-base.form",
      "typeVersion": 1,
      "position": [
        3320,
        360
      ],
      "id": "d94ada88-e7e7-4345-bd46-a15183b48b5e",
      "name": "Show the shortlist",
      "webhookId": "f0c43476-c73d-4cfa-b8c6-a7c7f0de98ef"
    },
    {
      "parameters": {
        "numberInputs": 2
      },
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.2,
      "position": [
        2880,
        360
      ],
      "id": "44901228-dfe4-4c89-bce4-da09dc4b3f9d",
      "name": "Done"
    }
  ],
  "pinData": {},
  "connections": {
    "OpenAI": {
      "ai_languageModel": [
        [
          {
            "node": "Rate the fit",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fit format": {
      "ai_outputParser": [
        [
          {
            "node": "Rate the fit",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Paste creators": {
      "main": [
        [
          {
            "node": "Create table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create table": {
      "main": [
        [
          {
            "node": "One item per creator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "One item per creator": {
      "main": [
        [
          {
            "node": "By platform",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "By platform": {
      "main": [
        [
          {
            "node": "Instagram engagement",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "TikTok engagement",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "YouTube engagement",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Instagram engagement": {
      "main": [
        [
          {
            "node": "All creators",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "TikTok engagement": {
      "main": [
        [
          {
            "node": "All creators",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "YouTube engagement": {
      "main": [
        [
          {
            "node": "All creators",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "All creators": {
      "main": [
        [
          {
            "node": "Key numbers",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Key numbers": {
      "main": [
        [
          {
            "node": "Vetted?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vetted?": {
      "main": [
        [
          {
            "node": "Rate the fit",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Done",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Rate the fit": {
      "main": [
        [
          {
            "node": "Rows",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rows": {
      "main": [
        [
          {
            "node": "Save to data table",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to data table": {
      "main": [
        [
          {
            "node": "Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Done": {
      "main": [
        [
          {
            "node": "Results page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Results page": {
      "main": [
        [
          {
            "node": "Show the shortlist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}