Sync new Salesforce leads to a known campaign

CRMMarketing

What it does

When a lead is created in Salesforce, this automation searches for an existing campaign by name. If found, the lead is added as a campaign member; if not, the job stops and logs an error.

Who it's for

Sales operations teams who want new leads automatically enrolled in a specific campaign without manual data entry.

Apps used

How teams use this

Enroll leads in a product launch campaign

New leads created in Salesforce are automatically added to a product launch campaign. The team sees all leads in one place without manually updating the campaign roster.

Route leads to different campaigns by source

Modify this automation to check the lead source and add the lead to different campaigns based on where it came from. Only leads matching the source condition are enrolled.

Sync leads to a regional campaign

Change the campaign name to target a regional or vertical-specific campaign instead of a single global one. The same flow applies to any campaign in Salesforce.

How it works

  1. Monitor for new leads in Salesforce. Detect when a lead is created in Salesforce. Set the Since parameter to control how far back in time to retrieve new leads.
  2. Search for the campaign by name. Search Salesforce for an existing campaign using the campaign name you specify. The search returns the campaign ID if it exists.
  3. Add lead to campaign. If the campaign ID is found in Salesforce, create a campaign member record to enroll the new lead in that campaign immediately.
  4. Stop and log error. If the campaign ID is not found in Salesforce, stop the job and log an error so someone can investigate the missing campaign.