Oktopost and Clay Integration Guide

Turn social engagement into actionable Marketing Automation Platform (MAP) contacts when leads do not yet have an email address in Oktopost. This guide walks through pulling social leads from Oktopost into Clay, enriching them with work email and firmographic data, cross-checking your MAP for duplicates, and routing only net-new leads to a Master Enrichment Table ready for MAP entry.

Prerequisites

  • Oktopost account with API access
  • Clay account on a paid plan (required for enrichment columns)
  • Access to your MAP or CRM for the final sync step

Configuration of the MAP sync itself is not covered in this guide. This guide covers everything up to and including the Master Enrichment Table, the handoff point to your MAP.

How the Workflow Fits Together

Stage What Happens
1. Pull from Oktopost All social leads are pulled from Oktopost into a Clay Staging Table, including those without an email address. These are people who have engaged with your social content.
2. Enrich in Clay Clay uses third-party providers to find a work email, job title, company, and other firmographic data for each lead.
3. Cross-check your MAP Clay checks whether each enriched lead already exists in your MAP. Only net-new leads proceed.
4. Master Enrichment Table Confirmed net-new leads with enriched data land in a Master Enrichment Table, ready for MAP entry.
5. MAP / CRM sync (your step) You push enriched leads from the Master Enrichment Table into your MAP as new social-sourced contacts. This step is outside the scope of this guide.

Authentication

All Oktopost API requests use HTTP Basic Authentication. Your username is your Account ID and your password is your API Key. Find both in Oktopost under Settings > My Profile > API.

EU data centre: If your Oktopost account is hosted on the EU data centre, use https://eu-api.oktopost.com/v2 as the base URL for all API calls instead of https://api.oktopost.com/v2.

Authentication in Clay

Clay does not auto-encode Basic Auth credentials. You must Base64-encode them manually and pass the result as an Authorization header.

  1. Go to base64encode.org
  2. Enter your credentials in the format: AccountId:APIKEY
  3. Click Encode and copy the result
  4. In Clay's header field, enter: Basic <your-encoded-string>

Rate Limits

Limit Value
Daily limit 50,000 API calls per user, resets at midnight UTC
Burst rate 60 calls per second; 120 calls per 5-second window
If burst exceeded Access blocked for 15 minutes

Part 1 — Staging Table: Pulling Leads from Oktopost

1.1 Set Up the HTTP API Source in Clay

In Clay: Actions > View all sources > Import data from an HTTP API

Clay requires a saved account with your authentication headers before the source can run. In the source setup panel, click Select account > + Add account, add your Authorization and Content-Type headers as key-value pairs, and save.

Field Value
Method GET
Endpoint https://api.oktopost.com/v2/lead
Results path Items

Headers (saved in account)

Key Value
Authorization Basic <your-base64-encoded-credentials>
Content-Type application/json

Query Parameters

Parameter Value and Notes
_count 100 — records per page (valid options: 25, 50, 100; default is 25)
_page 0 — zero-indexed; increment for each additional page import
all_leads true — required to include all social leads, not just those with a confirmed email address

Why all_leads=true is essential: By default, the /v2/lead endpoint returns only leads with a confirmed email address. Setting all_leads=true returns all leads, including those captured through social engagement who do not yet have an email in Oktopost. These are the leads Clay will enrich to find emails. Without this parameter, a large portion of your social audience will be invisible to the workflow.

Why Items is the Results Path: The /v2/lead response wraps all records in an Items array. Setting the Results Path to Items tells Clay to treat each element as a separate row.

Limitation: Clay's HTTP API Source does not support automatic pagination — it retrieves only a single page per import. With _count=100, you get up to 100 leads per source. If your Oktopost account has more leads, create additional source imports with _page=1, _page=2, and so on, each pointing to the same table. Clay's Auto-dedupe setting (Part 1.5) prevents duplicate rows across pages.

1.2 Map Columns from the API Response

The /v2/lead list response returns lead data at the top level of each Items entry. Map these fields by clicking each column header > Edit Column > type / to select the source field.

Column Name Type API Field Purpose
LeadId Text Id Unique lead ID — deduplication key
FirstName Text FirstName Contact first name
LastName Text LastName Contact last name
Email Text Email Email if already known in Oktopost — may be empty
Phone Text Phone Phone number if available
IsTracked Text IsTracked Whether Oktopost is actively tracking this lead

1.3 LinkedIn Profile Column (Formula)

The Profiles array in each lead record contains social network URLs. The order is not fixed. Use this formula to scan up to five entries and return the first LinkedIn URL found.

In Clay: Click the column header > Edit Column > click the cog icon > select Formula, then paste:

{{Profiles}}?.[0]?.Network == "LinkedIn" ? {{Profiles}}?.[0]?.Url :
{{Profiles}}?.[1]?.Network == "LinkedIn" ? {{Profiles}}?.[1]?.Url :
{{Profiles}}?.[2]?.Network == "LinkedIn" ? {{Profiles}}?.[2]?.Url :
{{Profiles}}?.[3]?.Network == "LinkedIn" ? {{Profiles}}?.[3]?.Url :
{{Profiles}}?.[4]?.Network == "LinkedIn" ? {{Profiles}}?.[4]?.Url : ""

Tip: Replace LinkedIn with Twitter, Facebook, Instagram, or YouTube to create additional network profile columns using the same logic. These URLs are the primary input for Clay enrichment providers.

1.4 Already Synced to MAP Column (Formula)

The RemoteLeads array in each lead record indicates whether the lead is already linked to a connected Oktopost integration. An empty array means the lead has not been synced. Use this as an initial filter before the full MAP lookup:

{{RemoteLeads}}?.length > 0 ? "true" : "false"

This flag is reliable only when your MAP is connected to Oktopost via a native integration (HubSpot, Eloqua, Marketo, and others). It is used as a first gate — leads marked true are skipped early. The MAP Lookup in Part 3 provides the definitive check for all other leads.

1.5 Staging Table Settings

Open Table Settings: click the cog icon in the bottom right of the table.

Setting Value and Purpose
Auto-update ON — refreshes rows when lead data changes in Oktopost
Auto-dedupe ON — prevents duplicate rows when running multiple page imports
Dedupe via column LeadId — enforces one row per Oktopost lead across all page sources

Part 2 — Clay Enrichment

This is the core value step. Clay uses the LinkedIn profile URL and other available data to find work email addresses and firmographic details for each lead. The specific enrichment providers and waterfall logic are configured by you, but the following points are essential for this workflow.

  • Email is the prerequisite for MAP entry. A lead cannot be created in most MAPs without an email address. The enrichment step is what converts social leads without emails into actionable MAP contacts.
  • Run enrichment before the MAP cross-check. Only attempt to route a lead to the MAP after Clay has found an email. Add a condition to the MAP routing column: Only run if Email is not empty.
  • LinkedIn URL is the most reliable enrichment key. The LinkedIn profile URL extracted in Part 1.3 is what most Clay enrichment providers use to look up a person. Ensure this column is populated before running enrichment.
  • Leads without an email after enrichment should not proceed. If Clay cannot find an email for a lead, that lead should remain in the staging table. The Only run if condition on the MAP Lookup column (Part 3) enforces this.

Tip: Clay's waterfall enrichment, which tries multiple providers in sequence and stops when an email is found, is the most credit-efficient approach for this use case. Configure it as a single enrichment column rather than calling providers individually.

Part 3 — MAP Cross-Check and Routing

Once a lead has been enriched and has a confirmed email, this step checks whether they already exist in your MAP. Only net-new leads proceed to the Master Enrichment Table.

The Oktopost /v2/lead endpoint does not currently support filtering by lead status. This cross-check compensates for that. The Oktopost product team is working on adding status filter support — when it ships, this step will serve as a safety net rather than the primary filter.

3a MAP Lookup Column

Add a lookup column that queries your Master Enrichment Table to confirm whether the lead already exists there.

In Clay: Click Add enrichment > search for Lookup Single Row in Other Table

Setting Value
Table to Search Your Master Enrichment Table
Target Column The column in that table storing the Oktopost LeadId
Filter Operator Equals
Row Value Type / and select LeadId from this table
Only run if {{Already Synced to MAP}} == "false" AND {{Email}} is not empty
Run immediately ON

Record Found — lead already exists, do not re-send. No Record Found — lead is net-new, proceed.

3b Send to Master Enrichment Table

In Clay: Click Add enrichment > search for Send Table Data > select Send Row

Select the following fields and map each to the corresponding column in the Master Enrichment Table:

  • LeadId
  • FirstName
  • LastName
  • Email (enriched)
  • LinkedInProfile
  • Any additional Clay enrichment columns (company, job title, and others)
Setting Value
Update existing rows on re-run ON
Only run if {{Already Synced to MAP}} == "false" AND {{MAP Lookup}} == "No Record Found" AND {{Email}} is not empty
Run immediately ON

Tip: The triple condition — Already Synced to MAP, MAP Lookup, and Email not empty — ensures only enriched, confirmed, net-new leads are routed. It prevents empty contacts, duplicates, and leads that bypassed the native integration sync from reaching the MAP.

Part 4 — Master Enrichment Table Settings

The Master Enrichment Table is the customer-owned table that holds enriched, confirmed, net-new leads ready for MAP creation.

Setting Value and Purpose
Auto-dedupe ON — prevents duplicate contacts
Deduplication key LeadId — enforces uniqueness
Auto-update rows ON — allows Clay enrichment to refresh data on re-run

Part 5 — MAP / CRM Handoff (Your Step)

Once a lead exists in the Master Enrichment Table and has been enriched, you control how it flows into marketing automation. Common approaches:

  • Push to HubSpot, Marketo, Eloqua, Pardot, or Dynamics via Clay's native connectors
  • Use a Clay HTTP API export column to call the MAP's API directly
  • Use Make or n8n to watch the Master Enrichment Table and trigger MAP workflows

The MAP/CRM sync is owned and maintained by you. Oktopost can advise on approach but does not configure or support the MAP directly.

API Quick Reference

Oktopost Endpoints Used in This Workflow

Endpoint Description
GET /v2/lead Lists all leads. Parameters: _page (default 0), _count (default 25; max 100), all_leads (set true to include leads without email). Returns Items array with Id, FirstName, LastName, Email, Phone, IsTracked, Profiles[], RemoteLeads[].
GET /v2/lead/{id} Returns a single lead by Id, wrapped in a Lead object. Available for individual lookups.
GET /v2/webhook-log/{id} View execution history for a webhook — useful for debugging delivery failures.

Base URLs

Data Centre Base URL
US (default) https://api.oktopost.com/v2
EU https://eu-api.oktopost.com/v2

API Response — List Leads Structure

{
  "Result": true,
  "Items": [
    {
      "Id": "0ld000000000001",
      "FirstName": "John",
      "LastName": "Doe",
      "Email": "john@example.com",
      "Phone": null,
      "IsTracked": true,
      "Profiles": [
        { "Network": "Instagram", "Url": "https://instagram.com/..." },
        { "Network": "Twitter",   "Url": "https://twitter.com/..."  }
      ],
      "RemoteLeads": [
        { "IntegrationType": "hubspot", "IntegrationID": "...", ... }
      ]
    }
  ]
}

Known Constraints and Status

Constraint Current Status and Recommendation
/v2/lead: no status filter parameter On the Oktopost product roadmap. Until available, use the RemoteLeads array check plus MAP lookup column to gate net-new routing.
Clay HTTP API Source: no auto-pagination Known Clay limitation. Set _count=100 and create one source import per page. Auto-dedupe on LeadId prevents duplicates across pages.
Oktopost API rate limit 50,000 calls/day per user; 60/second burst; 120 per 5-second window; 15-minute block if exceeded. Configure rate limiting in Clay enrichment columns for large batches.
Was this article helpful?
0 out of 0 found this helpful