Create ad conversion events for new list contacts
When a contact joins your HubSpot marketing list, LinkedIn gets a conversion event for them, so campaigns can credit the sign-up.
Install it
Set up this Zap for me, read how here: https://zapier.sh/zapier/awesome-zaps/create-ad-conversion-events-for-new-list-contacts/
Paste into Claude, ChatGPT, Cursor or any agent.
- Category
- Marketing · Marketing analytics
- Author
- Zapier
- Source
- zapier/awesome-zaps, folder zaps/create-ad-conversion-events-for-new-list-contacts
Set it up with the CLI
- Add it. Copies the folder into
zaps/create-ad-conversion-events-for-new-list-contacts/. Outside a project, it makes one first.npx zap-pack add awesome-zaps/create-ad-conversion-events-for-new-list-contacts - Fill in the values in
config.ts, and in any other file the list marks. Replace each one as its comment and SKILL.md say. - Deploy it. Asks for any value still left, signs you in to Zapier if you aren't, then publishes it to your account.
npx zap-pack deploy create-ad-conversion-events-for-new-list-contacts - Check it. Its recent runs, with status and errors.
npx zap-pack logs create-ad-conversion-events-for-new-list-contacts
zaps/create-ad-conversion-events-for-new-list-contacts/
- README.mdWhat it does, for people
- SKILL.mdHow an agent sets it up: what to ask you, and how to test it
- config.tsIts settings 3 to fill in
- connections/hubspot.tsThe
hubspotaccount it uses - connections/linkedin-conversions.tsThe
linkedin-conversionsaccount it uses - triggers/new-contact-in-list-resthook.tsWhat starts it:
hubspotnew_contact_in_list_resthook_v31 to fill in - workflow.tsThe code; each
ctx.stepis a step in the Zap
Agents: add --yes to any command so it never prompts. When it needs an answer only the user can give, it stops and names the flag that supplies it.
SKILL.md
View MarkdownWhat it does
- Trigger: HubSpot, New Contact in List (
hubspot,new_contact_in_list_resthook_v3). It fires when a contact is added to the list inHUBSPOT_LIST_ID, and asks HubSpot for the email, first name, last name and company. - Plain code: trims and lowercases the email and skips the run if there is none. It sends name and company only when both first and last name are present, because LinkedIn requires the name pair.
- LinkedIn Conversions: sends one conversion event (
create_conversion_event) for the contact to the ad account and conversion in the settings. The HubSpot contact ID is the event ID, so a retried list add does not create a second event.
The Zap only sends conversion events. It never changes the contact or the list.
Ask the user
Each REPLACE_… value is set per person. Resolve names to IDs with the user's own connections; don't ask them to paste an ID you can look up.
| Setting | Where | What goes there |
|---|---|---|
HUBSPOT_LIST_ID |
config.ts, and list_id in triggers/new-contact-in-list-resthook.ts |
The HubSpot list whose additions create conversion events |
LINKEDIN_ACCOUNT_ID |
config.ts |
The LinkedIn ad account that owns the conversion |
LINKEDIN_CONVERSION_ID |
config.ts |
The Conversions API conversion that receives each event. Create one in Campaign Manager first if the dropdown is empty |
Also ask the user before building: should the Zap run against a HubSpot test portal and a LinkedIn test account first? Use a test or sandbox portal if one exists.
Build it
If you can run shell commands, set it up with zap-pack: run npx zap-pack add awesome-zaps/create-ad-conversion-events-for-new-list-contacts, replace each REPLACE_… value as this file says, then run npx zap-pack deploy create-ad-conversion-events-for-new-list-contacts, which signs the user in to Zapier when it gets there. Otherwise build with Zapier MCP, as the steps below say. No Zapier MCP tools? Read https://docs.zapier.com/mcp/get-started/quickstart.md and follow the page for the app you are running in to get the user connected, then continue with this build.
- Accounts: bind
linkedin-conversionsto the user's LinkedIn connection for the ad account that receives the events. Bindhubspotto the HubSpot connection for the portal that owns the list; the trigger uses it. No other apps need a connection. - Source: publish
workflow.tsandconfig.ts, with eachREPLACE_…replaced by the user's answer.triggers/new-contact-in-list-resthook.tsandconnections/are settings, not code: set the workflow's trigger and connection bindings from them. The trigger file names the app by its slug; for the trigger'sselected_api, callsearch_triggerswith that slug, find the row whosekeyis the trigger'sevent, and use<app_key>@<app_version>from it. - Build guide: load Zapier's build guide with
get_zapier_skill("zapier:build-workflows")and follow it to create, test and publish the workflow. - Fields: inspect each action's fields with the user's connections and sample the trigger before the first test run, and fix any key in
workflow.tsthat doesn't match.
Test it
Run this sample as a draft test run before publishing, with a test contact on a test list:
{
"id": "123456789",
"properties": {
"email": " Test.Person@example.com ",
"firstname": "Test",
"lastname": "Person",
"company": "Example Co"
}
}
Check that one conversion event reached the chosen LinkedIn conversion with the lowercased email, the name fields and event_id 123456789. If run-status tools aren't available, check the result in LinkedIn Campaign Manager directly. Do not run this against a live ad account, and do not use real contacts. The user deletes test data, not the agent: have them remove the test contact from the list.
Notes
- Name and company are sent only when both first and last name are present; otherwise only the email and event ID are sent.
- The HubSpot property names (
firstname,lastname,company) follow HubSpot's standard names. - To send events only for paid-campaign list additions, add a conditional step before the conversion.
- To add UTM tags or campaign metadata to each event, add them to the event before it is sent.
- Keep real list, ad account and conversion IDs out of committed files.