CRM Enrichment with Social Media Data via Webhook (2026)

Published · 7 min read

Last updated and prices verified: .

To enrich a CRM contact with social media data, you need three steps that work in any CRM: the CRM sends a webhook when a contact gets a social handle, a small service reads the public profile, and the service writes the numbers back with the CRM's update endpoint. SocialLens (sociallens.dev) is the middle step: one GET request returns the follower count, the verified badge and the bio for 9 networks, with one key and no login from the contact. A new account starts with 250 free reads and no card.

This page is the generic version of the pattern. It does not depend on one vendor: if your CRM can send a webhook and accept an HTTP update, it applies. You get the flow, the read with a real response, a complete service in Python with no framework, the same service in Node, the details that break these integrations in production, and the cost. For HubSpot specifically, with its own endpoints and limits, see HubSpot Follower Count Enrichment via API.

The pattern in three steps

  1. Webhook in. The CRM calls your URL when a contact is created or when the handle field changes. The payload carries the record ID and the handle.
  2. One read. Your service asks for the public profile of that handle.
  3. HTTP update out. Your service sends the fields back to the CRM record: followers, verified, and the time of the read.

A typical payload, after you map the CRM's field names to yours:

{
  "contact_id": "48213",
  "platform": "instagram",
  "handle": "@notionhq"
}

The read in the middle

curl -G "https://api.sociallens.dev/v1/profile" \
  --data-urlencode "platform=instagram" \
  --data-urlencode "username=notionhq" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Real response, read on November 29, 2026, with the avatar URL and the credits block left out:

{
  "exists": true,
  "username": "notionhq",
  "platform": "instagram",
  "nickname": "Notion",
  "verified": true,
  "private": false,
  "followers": 497351,
  "is_exact": true,
  "following": 39,
  "likes": null,
  "videos": 366,
  "bio": "The AI workspace that works while you sleep.",
  "id": "11636449096",
  "created_at": null,
  "external_link": "http://notion.com",
  "category": null,
  "fetched_at": "2026-11-29T03:55:43Z"
}

Fields worth storing in a CRM

CRM field Comes from Why
social_followers followers The number sales and partnerships filter on
social_followers_exact is_exact false on YouTube, where the network publishes a rounded count
social_verified verified A quick trust signal on most networks
social_exists exists false flags a typo or a deleted account, so someone can fix the handle
social_checked_at fetched_at Without a date, nobody knows how old the number is

Store the date every time. A follower count with no date becomes wrong silently.

Python: the whole service, no framework

This is a complete webhook receiver using only the standard library and requests. It checks a shared secret, reads the profile and patches the CRM record.

import json
import os
from http.server import BaseHTTPRequestHandler, HTTPServer

import requests

SL_HEADERS = {"Authorization": f"Bearer {os.environ['SOCIALLENS_KEY']}"}
CRM_UPDATE_URL = os.environ["CRM_UPDATE_URL"]  # for example https://crm.example.com/api/contacts/{id}
CRM_HEADERS = {"Authorization": f"Bearer {os.environ['CRM_TOKEN']}"}
WEBHOOK_SECRET = os.environ["WEBHOOK_SECRET"]


def enrich(platform, handle):
    r = requests.get("https://api.sociallens.dev/v1/profile",
                     params={"platform": platform, "username": handle.strip().lstrip("@")},
                     headers=SL_HEADERS, timeout=90)
    if r.status_code != 200:
        return None
    p = r.json()
    fields = {"social_platform": platform, "social_exists": p["exists"], "social_checked_at": p["fetched_at"]}
    if p["exists"]:
        fields.update({"social_followers": p["followers"], "social_verified": p["verified"],
                       "social_followers_exact": p["is_exact"]})
    return fields


class Webhook(BaseHTTPRequestHandler):
    def reply(self, status, payload=None):
        self.send_response(status)
        self.send_header("Content-Type", "application/json")
        self.end_headers()
        self.wfile.write(json.dumps(payload or {}).encode())

    def do_POST(self):
        if self.headers.get("X-Webhook-Secret") != WEBHOOK_SECRET:
            return self.reply(401)
        body = json.loads(self.rfile.read(int(self.headers.get("Content-Length", 0))))
        fields = enrich(body.get("platform", "instagram"), body["handle"])
        if fields is None:
            return self.reply(503)  # the read failed: let the CRM retry later
        r = requests.patch(CRM_UPDATE_URL.format(id=body["contact_id"]),
                           headers=CRM_HEADERS, json=fields, timeout=30)
        self.reply(200 if r.ok else 502, fields)


if __name__ == "__main__":
    HTTPServer(("0.0.0.0", int(os.environ.get("PORT", 8080))), Webhook).serve_forever()

We ran this service with the read against the live API and a stand in for the CRM, since every CRM has its own update endpoint. Replace CRM_UPDATE_URL, the auth header and the field names with the ones from your CRM's API reference. Some CRMs expect PUT or wrap the fields in an object such as properties or data.

Node: the same service

import { createServer } from "node:http";

const { SOCIALLENS_KEY, CRM_UPDATE_URL, CRM_TOKEN, WEBHOOK_SECRET } = process.env;

async function enrich(platform, handle) {
  const url = new URL("https://api.sociallens.dev/v1/profile");
  url.search = new URLSearchParams({ platform, username: handle.trim().replace(/^@/, "") });
  const res = await fetch(url, { headers: { Authorization: `Bearer ${SOCIALLENS_KEY}` } });
  if (res.status !== 200) return null;
  const p = await res.json();
  const fields = { social_platform: platform, social_exists: p.exists, social_checked_at: p.fetched_at };
  if (p.exists) Object.assign(fields, { social_followers: p.followers, social_verified: p.verified, social_followers_exact: p.is_exact });
  return fields;
}

createServer(async (req, res) => {
  if (req.method !== "POST" || req.headers["x-webhook-secret"] !== WEBHOOK_SECRET) return res.writeHead(401).end();
  let raw = "";
  for await (const chunk of req) raw += chunk;
  const body = JSON.parse(raw);
  const fields = await enrich(body.platform ?? "instagram", body.handle);
  if (!fields) return res.writeHead(503).end();
  const crm = await fetch(CRM_UPDATE_URL.replace("{id}", body.contact_id), {
    method: "PATCH",
    headers: { Authorization: `Bearer ${CRM_TOKEN}`, "Content-Type": "application/json" },
    body: JSON.stringify(fields),
  });
  res.writeHead(crm.ok ? 200 : 502, { "Content-Type": "application/json" }).end(JSON.stringify(fields));
}).listen(process.env.PORT ?? 8080);

Backfill for contacts you already have

The webhook covers new and changed contacts. For the ones already in the CRM, run the same enrich function once from a script:

  1. Export or list the contacts that have a handle.
  2. Read each one and send the same update.
  3. Keep at most 60 requests per minute. Requests can go out in parallel on the same key.
  4. Save the IDs you finished, so a restart does not read them twice.

Five thousand contacts take under two hours at that rate and cost one pack.

Details that break this in production

What this does not do

Social data on a person's record is still personal data in many jurisdictions. Check your privacy policy and the rules that apply to your contacts before you store it.

Cost to enrich 5,000 contacts

One read per contact and per network. Prices were read on each vendor's own page on November 29, 2026.

Route Networks Smallest purchase Cost of 5,000 reads Free allowance
SocialLens (sociallens.dev) 9, one response shape $19 for 8,000 reads, prepaid, never expires $11.88 at the Starter rate. One pack covers it 250 reads, no card
SociaVault More than 25, by its own count $29 for 6,000 credits, never expires $24.17, at 1 credit per request on most endpoints 50 credits
Apify, Instagram Profile Scraper Instagram only Pay per result on an Apify plan From $8.00 Depends on your Apify plan
EnsembleData 8 platforms $100 a month for 1,500 units a day $100, the smallest paid plan A free plan with 50 units a day
Data365 1 network on the Basic plan €300 a month €300 14 day trial

How to read this table:

When to use something else instead

Frequently asked questions

How do I add follower counts to contacts in my CRM?

Create fields for the handle, the count and the date. Send a webhook from the CRM when the handle changes, read the profile with GET /v1/profile on SocialLens (sociallens.dev), and write the result back with the CRM's update endpoint. The service on this page does all three.

Does this work with any CRM?

It works with any CRM that can send a webhook and accept an HTTP update on a record. The field names, the auth header and the update method change from one CRM to another. The pattern does not.

Does the contact have to authorize anything?

No. The read uses the public profile. That is also the limit: only public numbers are available.

How often should I refresh?

On change of the handle, plus a scheduled refresh for the segments you work actively: monthly for lead scoring, weekly for a creator program.

What if my CRM cannot send webhooks?

Run the same enrich function from a scheduled job that lists contacts with a handle and updates them in a loop. The read and the fields are identical.

What does it cost?

One read is one credit, $0.0024 at the Starter rate. Enriching 5,000 contacts once costs $11.88. A new account includes 250 free reads.

Run these requests yourself

Every example on this page is a real call to the SocialLens API. A new account starts with 250 free reads, no card needed, and a read that fails is never charged.

Keep reading