GetPostAnalytics icon
SlackIncomingWebhook icon
Schedule icon

LinkedIn Post Performance Digest to Slack

Track LinkedIn post reactions with Kestra. Fetch analytics for a list of activity URNs and send a weekly Slack digest with post and reaction totals.

Categories
Business

Stop checking LinkedIn post stats by hand. This blueprint runs io.kestra.plugin.linkedin.GetPostAnalytics against a list of activity URNs, one API sweep across every post the team published, and posts the headline numbers to Slack. The task returns per-post reaction details in its posts output and two ready-to-report scalars, totalPosts and totalReactions, which flow straight into the notification.

How it works

  1. The activity_urns input holds the list of LinkedIn activity URNs to track, so the same flow covers one post or fifty without edits.
  2. fetch_analytics (io.kestra.plugin.linkedin.GetPostAnalytics) authenticates with a Bearer access token from {{ secret('LINKEDIN_ACCESS_TOKEN') }} and fetches reactions for every URN. Outputs include posts (per-post reaction data), totalPosts, and totalReactions.
  3. notify posts the two scalar totals to Slack; the per-post array stays available on the execution for downstream tasks.
  4. The errors block sends a distinct Slack alert when the fetch fails, naming the flow and execution.
  5. A disabled-by-default Schedule trigger runs the digest every Monday at 08:00.

What you get

  • One scheduled sweep across all tracked posts instead of a per-post manual check.
  • totalPosts and totalReactions as scalar outputs, safe to interpolate into a JSON Slack payload.
  • Per-post reaction data in the posts output for downstream reshaping or warehousing.
  • A failure alert so an expired token never silently stops the reporting.

Who it's for

  • Social media managers who report weekly engagement numbers to marketing leadership.
  • Marketing analytics teams standardizing LinkedIn metrics collection.
  • Content teams comparing how different posts perform over the same window.

Why orchestrate this with Kestra

The LinkedIn API answers one request at a time, but a weekly report needs a schedule, credential handling, an execution history, and a place to send the numbers. Kestra provides all of that around a single task declaration, the access token stays in a secret, the totals land in Slack, and every run is auditable.

Prerequisites

  • A LinkedIn Developer application with access to the Community Management API.
  • A valid OAuth2 access token with permission to read reactions on the tracked posts.
  • A Slack incoming webhook for the digest 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. Replace the default activity_urns values with URNs of your own posts.
  3. Execute the flow and check the Slack message reports the post and reaction totals.
  4. Set disabled: false on the weekly trigger.

How to extend

  • Pair with the LinkedIn token refresh blueprint to exchange a refresh token for a fresh access token before each run.
  • Feed the posts output into a Python task to reshape per-post rows for a warehouse, as shown in the LinkedIn analytics to warehouse blueprint.
  • Add a second GetPostAnalytics task with a different URN list to compare campaigns side by side.
  • Route the digest to a different channel per audience by adding another notification task.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.