View as Markdown
LinkedIn Ads icon

LinkedIn Ads ACTION

Create A Report

Queries the Analytics Finder to get analytics for the specified entity i.e company, account, campaign. See the docs here
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's LinkedIn Ads account once, then configure and run Create A Report 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-create-report",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    linkedin_ads: { authProvisionId: "apn_xxxxxxx" },
    adAccountId: "Ad Account Id",
    pivot: "Pivot",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create A Report inputs
Property Type Description
adAccountId Ad Account Id string
Sponsored ad account id to match results by
Required Dynamic
pivot Pivot string

Pivot of results, by which each report data point is grouped. The following enum values are supported:

  • COMPANY - Group results by advertiser's company.
  • ACCOUNT - Group results by account.
  • SHARE - Group results by sponsored share.
  • CAMPAIGN - Group results by campaign.
  • CREATIVE - Group results by creative.
  • CAMPAIGN_GROUP - Group results by campaign group.
  • CONVERSION - Group results by conversion.
  • CONVERSATION_NODE - The element row in the conversation will be the information for each individual node of the conversation tree.
  • CONVERSATION_NODE_OPTION_INDEX - Used actionClicks are deaggregated and reported at the Node Button level. The second value of the pivot_values will be the index of the button in the node.
  • SERVING_LOCATION - Group results by serving location, onsite or offsite.
  • CARD_INDEX - Group results by the index of where a card appears in a carousel ad creative. Metrics are based on the index of the card at the time when the user's action (impression, click, etc.) happened on the creative (Carousel creatives only).
  • MEMBER_COMPANY_SIZE - Group results by member company size.
  • MEMBER_INDUSTRY - Group results by member industry.
  • MEMBER_SENIORITY - Group results by member seniority.
  • MEMBER_JOB_TITLE - Group results by member job title.
  • MEMBER_JOB_FUNCTION - Group results by member job function.
  • MEMBER_COUNTRY_V2 - Group results by member country.
  • MEMBER_REGION_V2 - Group results by member region.
  • MEMBER_COMPANY - Group results by member company.
Required
timeGranularity Time Granularity string

Time granularity of results. Valid enum values:

  • ALL - Results grouped into a single result across the entire time range of the report.
  • DAILY - Results grouped by day.
  • MONTHLY - Results grouped by month.
  • YEARLY - Results grouped by year.
Required
dateRangeStart Date Range Start string
Represents the inclusive start time range of the analytics. If unset, it indicates an open range up to the end time. Should be in the ISO 8601 format, e.g. 2022-12-27.
Required
dateRangeEnd Date Range End string
Represents the inclusive end time range of the analytics. Must be after start time if it's present. If unset, it indicates an open range from start time to everything after. Should be in the ISO 8601 format, e.g. 2022-12-27.
Optional
shares Shares string[]
An Array of Share URN. Required unless another facet is provided.
Optional
campaigns Campaigns string[]
An Array of Sponsored Campaign URN. Required unless another facet is provided.
Optional
creatives Creatives string[]
An Array of Sponsored Creative URN. Required unless another facet is provided.
Optional
campaignGroups Campaign Groups string[]
An Array of Campaign Group URN. Required unless another facet is provided.
Optional
accounts Accounts string[]
An Array of Account URN. Required unless another facet is provided.
Optional Dynamic

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-create-report
Version
0.0.8
App
LinkedIn Ads
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes