Connect LinkedIn with Salesforce

Implementation Guide

Overview: Connecting LinkedIn and Salesforce

LinkedIn and Salesforce represent the two most dominant platforms in the B2B demand generation and revenue management lifecycle, yet the data gap between them remains a critical operational inefficiency for enterprise sales and marketing organisations. A prospect engages with a LinkedIn Sponsored Content ad, fills out a Lead Gen Form, and becomes a lead — but without an automated integration, that lead data sits in LinkedIn Campaign Manager while your sales team works exclusively out of Salesforce. The result is delayed follow-up, duplicated manual entry, and loss of attribution context that would otherwise inform campaign optimisation.

The LinkedIn-to-Salesforce integration is more architecturally complex than most CRM integrations because LinkedIn's API ecosystem is highly restricted. Unlike Google or Facebook, LinkedIn does not offer a general-purpose API for all ad account data. The Marketing Developer Platform (MDP) requires application review and approval, and certain endpoints — particularly the Lead Sync API — are only available to LinkedIn Marketing Partners, which includes platforms like HubSpot, Marketo, and Salesforce (via its native LinkedIn integration), and approved ISVs. Direct API access for custom integrations requires either approved MDP access or the use of LinkedIn's official native Salesforce connector.

This guide covers three implementation paths: the native LinkedIn Sales Navigator integration with Salesforce (CRM Sync), the LinkedIn Lead Gen Forms integration via the Marketing API for approved partners or via Zapier/Make for SMB teams, and a custom webhook-based approach using LinkedIn's native webhook support introduced for Lead Gen Forms.

Core Prerequisites

For LinkedIn API access via the Marketing Developer Platform, your application must be approved for the Lead Sync product. To apply, navigate to the LinkedIn Developer Portal, create an application, and request access to the Lead Sync API product. Required OAuth 2.0 scopes include r_lads_leadgen_automation for lead retrieval, rw_ads for campaign read access, and r_organization_social for organisation-level data. The OAuth flow is standard 3-legged OAuth 2.0 with an authorization URL of https://www.linkedin.com/oauth/v2/authorization and a token endpoint of https://www.linkedin.com/oauth/v2/accessToken. Access tokens expire after 60 days; you must implement refresh token rotation using the r_lads_leadgen_automation offline access scope.

For Salesforce, the integration user account requires the following profile permissions and object-level access: Create and Edit on the Lead object, Create and Edit on the Contact object, Read on the Campaign object and Create/Edit on CampaignMember, and the "API Enabled" system permission. If you are using a Connected App for OAuth, configure it under Setup > App Manager, select OAuth 2.0 scopes api (full API access), refresh_token (for persistent connections), and offline_access. The Connected App's consumer key and secret are used in the OAuth client credentials or authorization code flow depending on your implementation.

For the Zapier implementation (appropriate for teams without LinkedIn MDP approval), the LinkedIn Zapier app supports Lead Gen Forms triggers using LinkedIn's native Zapier integration, which uses a separate OAuth approval path managed by Zapier. This requires Admin access to the LinkedIn Campaign Manager account you are connecting.

Top Enterprise Use Cases

The dominant enterprise use case is Lead Gen Form to Salesforce Lead with full attribution. LinkedIn Lead Gen Forms auto-populate prospect data from their LinkedIn profiles — name, email, company, title, LinkedIn profile URL — and remove the landing page friction that inflates bounce rates. By routing these submissions directly into Salesforce as Leads, stamping them with the Campaign ID, Ad ID, and creative name, you enable marketing to close the attribution loop between ad spend and pipeline generated.

The second use case is LinkedIn Sales Navigator CRM Sync for account-based prospecting. Sales Navigator's CRM Sync feature (available on Advanced Plus tier) creates a bidirectional sync between Sales Navigator lists and Salesforce Accounts and Contacts. Sales reps can save leads in Sales Navigator and have them appear in Salesforce automatically, and Salesforce opportunity stage changes can surface as alerts in Sales Navigator, keeping reps contextually aware without switching platforms.

A third use case is engagement-triggered Salesforce activity logging. When a target account prospect engages with your LinkedIn content — watches a video ad, clicks a document ad, or submits a conversation ad — logging that engagement as a Salesforce Activity on the relevant Account or Contact record gives your sales team a social intent signal they can act on during outreach, dramatically increasing call and email relevance.

Step-by-Step Implementation Guide

For teams with LinkedIn MDP Lead Sync API access, implement a polling-based lead retrieval service. The Lead Sync API endpoint for retrieving form responses is: GET https://api.linkedin.com/v2/leadGenerationForms/{formUrn}/responses

The form URN is formatted as urn:li:leadGenerationForm:XXXXXXXX. Retrieve the list of your organisation's forms first via GET https://api.linkedin.com/v2/adFormsV2?q=account&account=urn:li:sponsoredAccount:{accountId}.

The response payload for a lead form submission contains:

{
  "elements": [
    {
      "id": "urn:li:leadFormResponse:12345678",
      "submittedAt": 1718400000000,
      "leadGenerationForm": "urn:li:leadGenerationForm:98765432",
      "fieldValues": [
        { "questionId": "urn:li:leadFormQuestion:firstName", "answer": "Sarah" },
        { "questionId": "urn:li:leadFormQuestion:lastName", "answer": "Mitchell" },
        { "questionId": "urn:li:leadFormQuestion:emailAddress", "answer": "[email protected]" },
        { "questionId": "urn:li:leadFormQuestion:company", "answer": "Acme Corporation" },
        { "questionId": "urn:li:leadFormQuestion:title", "answer": "VP of Engineering" }
      ],
      "campaign": "urn:li:sponsoredCampaign:445566778"
    }
  ]
}

Parse this response and construct a Salesforce Lead record using the Salesforce REST API. The Lead creation endpoint is POST https://{instance}.salesforce.com/services/data/v58.0/sobjects/Lead/. The request body:

{
  "FirstName": "Sarah",
  "LastName": "Mitchell",
  "Email": "[email protected]",
  "Company": "Acme Corporation",
  "Title": "VP of Engineering",
  "LeadSource": "LinkedIn",
  "LinkedIn_Campaign_ID__c": "445566778",
  "LinkedIn_Form_URN__c": "urn:li:leadGenerationForm:98765432",
  "Status": "Open - Not Contacted"
}

Note the custom fields LinkedIn_Campaign_ID__c and LinkedIn_Form_URN__c — these must be created in Salesforce as custom Lead fields before the integration runs. These fields preserve the attribution chain and enable Campaign ROI reports in Salesforce.

Before creating the Lead, implement a duplicate check using Salesforce's duplicate management rules or by querying the Lead and Contact objects for the email address: GET /services/data/v58.0/query?q=SELECT+Id,+IsConverted+FROM+Lead+WHERE+Email+=+'[email protected]'. If a matching unconverted Lead exists, update it rather than creating a duplicate. If a converted Lead (which implies a Contact exists) is found, create the submission as an Activity on the existing Contact rather than a new Lead.

For the Make (Integromat) implementation, build a scenario using the LinkedIn "Watch Lead Gen Form Responses" module paired with the Salesforce "Create Record" module. In the LinkedIn module, authenticate with your Campaign Manager account and select the target ad account and form. Set the polling interval to 15 minutes. In the Salesforce module, map the LinkedIn response fields to the corresponding Salesforce Lead fields. Add a Salesforce "Search Records" module before the create step to check for existing records by email, and use a Router to branch between "Create Lead" and "Update Lead" paths based on whether a match is found.

For webhook-based real-time delivery (LinkedIn's newer feature for Lead Gen Forms), configure a webhook destination in LinkedIn Campaign Manager under Account Assets > Lead Sync. LinkedIn will POST to your specified HTTPS endpoint immediately when a form is submitted. Your endpoint must respond with HTTP 200 within 5 seconds. The payload structure mirrors the polling API response above. Validate the incoming request by verifying the X-LinkedIn-Signature header against an HMAC-SHA256 hash of the raw request body using your webhook secret.

Common Pitfalls & Troubleshooting

A 403 Forbidden from the LinkedIn API when calling Lead Sync endpoints with a valid access token almost always means your application has not been approved for the Lead Sync API product on the LinkedIn Developer Portal, or the authenticated user does not have Admin access to the ad account referenced in the request. Check both the application product approvals and the user's Campaign Manager role.

A 401 Unauthorized with error code EXPIRED_ACCESS_TOKEN means your 60-day LinkedIn OAuth token has expired. Unlike most OAuth providers that offer short-lived tokens with continuous refresh, LinkedIn's MDP tokens have a fixed 60-day window. Implement a scheduled token refresh job that runs every 50 days using your refresh token before expiry. Store token expiry timestamps alongside credentials in your secret manager.

Salesforce returns a 400 error with REQUIRED_FIELD_MISSING when your Lead payload omits fields that your Salesforce org's validation rules require. Lead validation rules vary by Salesforce org configuration — common required fields beyond the API defaults include Phone, State, and custom fields marked required in your object configuration. Query your org's field metadata to discover required fields: GET /services/data/v58.0/sobjects/Lead/describe/.

The most common data quality issue is email address capitalisation inconsistency causing false duplicate misses. LinkedIn returns email addresses in the casing the user entered at signup. Normalise all email values to lowercase before duplicate checking in Salesforce, as SOQL queries are case-insensitive for string comparisons but your application-layer deduplication logic may not be.