New to Kestra?
Use blueprints to kickstart your first workflows.
Automate a weekly LinkedIn report with Kestra. Fetch post reactions, compute average engagement in Python, and send the digest to Discord on Fridays.
A weekly social report should write itself. This blueprint fetches reaction analytics for the week's LinkedIn posts with io.kestra.plugin.linkedin.GetPostAnalytics, passes the totalPosts and totalReactions scalars into a small Python step that computes the average reactions per post, and sends the digest to Discord every Friday afternoon. Raw totals say how loud the week was, the average says whether the content actually got better.
fetch_analytics (io.kestra.plugin.linkedin.GetPostAnalytics) pulls reaction data for every URN in the activity_urns input and exposes totalPosts and totalReactions as scalar outputs alongside the per-post posts array.compute_stats (io.kestra.plugin.scripts.python.Script on the Process task runner) receives the two totals as environment variables, computes the average reactions per post, and emits avg_reactions through Kestra's ::outputs:: protocol, making it available as {{ outputs.compute_stats.vars.avg_reactions }}.send_report posts the three scalars, posts, reactions, and average, to Discord in one line.errors block sends a distinct Discord alert when any step fails, so Friday never ends without either the report or the reason it is missing.Schedule trigger runs the report every Friday at 16:00.The report is three concerns glued together, an authenticated API call, a computation, and a notification. Kestra keeps each one a separate, replaceable task, moves the values between them as typed outputs, runs the chain on a schedule, and records every week's numbers in the execution history.
LINKEDIN_ACCESS_TOKEN: OAuth2 access token sent as Bearer auth for LinkedIn REST API calls.DISCORD_WEBHOOK_URL: Discord incoming webhook URL.activity_urns values with the URNs of this week's posts.disabled: false on the weekly trigger.io.kestra.plugin.core.kv.Set and add week-over-week deltas to the digest.posts array for warehouse loading, as shown in the LinkedIn analytics to warehouse blueprint.