LinkedIn Ads ACTION
Send Conversion Event
Sends a conversion event to LinkedIn Ads. See the documentation
- Action
- Writes data
- OAuth
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's LinkedIn Ads account once, then configure and run Send Conversion Event from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "linkedin_ads-send-conversion-event",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
linkedin_ads: { authProvisionId: "apn_xxxxxxx" },
adAccountId: "Ad Account Id",
conversionId: "Conversion ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "linkedin_ads-send-conversion-event",
"configured_props": {
"linkedin_ads": { "authProvisionId": "apn_xxxxxxx" },
"adAccountId": "Ad Account Id",
"conversionId": "Conversion ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "linkedin_ads",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "linkedin_ads-send-conversion-event",
arguments: {
adAccountId: "Ad Account Id",
conversionId: "Conversion ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
adAccountId Ad Account Id | string | Sponsored ad account id to match results by Required Dynamic |
conversionId Conversion ID | string | The ID of the conversion event. Required Dynamic |
conversionHappenedAt Conversion Happened At | string | Epoch timestamp in milliseconds at which the conversion event happened. Note: If your source records conversion timestamp in seconds, please insert 000 at the end to transform it to milliseconds. Eg. 1590739275000. Required |
email Email | string | Email address of the contact associated with the conversion event which needs to be in SHA256 format, a HEX encoded string with a maximum length of 64 characters. Eg. test@example.com. Required |
firstName First Name | string | The first name of the contact to match the conversion. Required |
lastName Last Name | string | The last name of the contact to match the conversion. Required |
conversionValueCurrencyCode Conversion Value Currency Code | string | The currency code of the conversion value in ISO format. Eg. USD. Required |
conversionValueAmount Conversion Value Amount | string | The value of the conversion in decimal string. If you set this field, you must also set in the Conversion Value Currency Code field. Eg. 100.05. Required |
companyName Company Name | string | A plain text string representing the company of the contact to match. Optional |
title Title | string | A plain text string representing the title name of the contact to match. Eg. Software Engineer. Optional |
countryCode Country Code | string | An ISO standardized two letter country code representing the country of the contact to match. Eg. US. Optional |
eventId Event ID | string | The unique id generated by advertisers to indicate each event. This field is used for deduplication. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- linkedin_ads-send-conversion-event
- Version
- 0.0.8
- App
- LinkedIn Ads
- Authentication
- OAuth
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗