GetPostAnalytics icon
SlackIncomingWebhook icon
Webhook icon

LinkedIn Campaign Launch Tracker with Baseline Snapshots

Capture t0 LinkedIn analytics for every campaign post with Kestra. A webhook triggers a baseline reaction snapshot and posts it to Slack.

Categories
Business

Lift is meaningless without a baseline. This blueprint gives every LinkedIn campaign post a t0 measurement, the moment the publishing workflow goes live, it calls a Kestra webhook with the post's activity URN, io.kestra.plugin.linkedin.GetPostAnalytics captures the first reaction snapshot, and Slack records the starting numbers. Every later report can now express performance as growth since launch rather than a raw count with no context.

How it works

  1. post_published (io.kestra.plugin.core.trigger.Webhook) exposes a URL keyed by linkedin_campaign_launch. The publishing workflow calls it with a JSON body such as {"activity_urn": "urn:li:activity:..."}.
  2. baseline_snapshot (io.kestra.plugin.linkedin.GetPostAnalytics) resolves the URN from {{ trigger.body.activity_urn }}, falling back to the activity_urn input for manual test runs, and fetches the reaction data. Outputs include posts, totalPosts, and totalReactions.
  3. notify posts the tracked URN and the scalar t0 totals to Slack, timestamped by the execution itself.
  4. The errors block sends a distinct Slack alert when the snapshot fails, so no campaign starts untracked.

What you get

  • A baseline snapshot for every campaign post, captured automatically at publish time.
  • A Slack record of when tracking started and what the counters said at t0.
  • The same flow usable manually, the input fallback means you can backfill a post published before the webhook existed.
  • Per-post reaction details in the posts output for any downstream storage step.

Who it's for

  • Marketing analytics teams measuring campaign lift instead of raw vanity counts.
  • Growth teams wiring LinkedIn publishing tools into their measurement stack.
  • Agencies proving post performance to clients from a defined starting point.

Why orchestrate this with Kestra

The snapshot has to happen at an unpredictable moment, whenever marketing hits publish. A webhook trigger turns that event into an execution, secrets keep the token out of the payload, and the execution history becomes the audit log of every campaign launch.

Prerequisites

  • A LinkedIn Developer application and a valid OAuth2 access token with permission to read reactions.
  • A publishing workflow or tool that can send an HTTP request when a post goes live.
  • A Slack incoming webhook for the snapshot log and failure alerts.

Secrets

  • LINKEDIN_ACCESS_TOKEN: OAuth2 access token sent as Bearer auth for LinkedIn REST API calls.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL.

Quick start

  1. Add the two secrets to your Kestra namespace.
  2. Execute the flow manually with a real activity URN to verify the Slack baseline message.
  3. Point your publishing workflow at the webhook URL, /api/v1/executions/webhook/company.team/linkedin-campaign-launch-tracker/linkedin_campaign_launch, with the URN in the body.

How to extend

  • Schedule the LinkedIn post performance digest blueprint on the same URNs to measure growth against this baseline.
  • Persist each snapshot with io.kestra.plugin.core.kv.Set keyed by URN so later runs can compute lift in the flow itself.
  • Send several URNs in the webhook body and pass the list straight to activityUrns for multi-post campaigns.
  • Add the campaign name to the webhook body and interpolate it into the Slack message.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.