New to Kestra?
Use blueprints to kickstart your first workflows.
Land LinkedIn post analytics in your warehouse with Kestra. Fetch reactions, reshape to newline-delimited JSON, and get a Discord note per export.
Social metrics belong next to the rest of the marketing data, not in screenshots. This blueprint fetches reaction analytics for a list of LinkedIn posts with io.kestra.plugin.linkedin.GetPostAnalytics, then a small Python task reshapes the posts output into a newline-delimited JSON file, one record per post, stamped with the fetch time. The JSONL lands in Kestra's internal storage as an output file, the format every warehouse loader ingests without ceremony, and Discord gets a note with the record and reaction counts.
fetch_analytics (io.kestra.plugin.linkedin.GetPostAnalytics) pulls reaction data for every URN in the activity_urns input. Outputs include the per-post posts array plus the totalPosts and totalReactions scalars.reshape (io.kestra.plugin.scripts.python.Script on the Process task runner) receives the array through inputFiles as posts.json, writes one JSON object per line to analytics.jsonl with a _fetched_at timestamp on each record, and emits the record count through Kestra's output protocol.{{ outputs.reshape.outputFiles['analytics.jsonl'] }} for any downstream loader.notify posts the scalar counts to Discord, and the errors block sends a distinct alert when the fetch or reshape fails.Schedule trigger refreshes the export daily at 05:00._fetched_at stamp on every record, so repeated loads become a history of engagement over time.An export like this needs credentials, a schedule, somewhere durable to put the file, and a signal when it breaks. Kestra provides all four, and the output file URI makes the handoff to a loader a one-line reference instead of a shared filesystem.
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 URNs of your own posts.analytics.jsonl from the execution's Outputs tab, and check one JSON object per post.disabled: false on the daily trigger.io.kestra.plugin.jdbc.duckdb.Query using read_json_auto over the output file, as shown in the dlt and DuckDB blueprints in this catalog.