DiscordIncomingWebhook icon
CommentTrigger icon

React to New LinkedIn Comments with Discord Alerts

Get alerted on new LinkedIn comments with Kestra. A polling trigger watches your posts and sends comment text and author details to Discord.

Categories
Business

The first hour of a LinkedIn thread decides its reach, and a reply from the author keeps it alive. This blueprint uses io.kestra.plugin.linkedin.CommentTrigger to poll a list of post URNs every 15 minutes and start an execution the moment new comments appear. The trigger exposes the newest comment's text, author URN, post URN, comment ID, and creation time as scalar outputs, plus newCommentsCount and the full allNewComments array, and the flow pushes the scalars into a Discord alert.

How it works

  1. on_new_comment (io.kestra.plugin.linkedin.CommentTrigger) polls the posts listed in postUrns on a PT15M interval using the access token from {{ secret('LINKEDIN_ACCESS_TOKEN') }}.
  2. When new comments are found, one execution starts with the trigger outputs populated, commentText, actorUrn, postUrn, commentUrn, commentId, createdTime, newCommentsCount, and allNewComments.
  3. alert_team posts the scalar comment fields to Discord, the commentText value is passed through the json filter so quotes and newlines in the comment never break the payload.
  4. The errors block sends a distinct Discord alert if the flow itself fails.
  5. The trigger ships disabled: true so the blueprint is safe to import, enable it once the URNs and secrets are set.

What you get

  • An alert in Discord minutes after someone comments, instead of a notification lost in the LinkedIn app.
  • The comment text and author URN directly in the message, enough context to decide who replies.
  • newCommentsCount and allNewComments for handling bursts where several comments arrive in one poll.
  • Deduplicated polling handled by the trigger, each comment fires once.

Who it's for

  • Social media managers who treat reply speed as a growth lever.
  • Founder-led marketing teams where the author wants to answer every comment personally.
  • Community teams watching a small set of high-stakes launch posts.

Why orchestrate this with Kestra

Polling an API on an interval, remembering which comments were already seen, and fanning the result into a chat tool is undifferentiated plumbing. The trigger handles the polling and state, Kestra handles the schedule, secrets, execution history, and failure alerting, and the whole reactor is a few lines of YAML.

Prerequisites

  • A LinkedIn Developer application with access to read comments on the monitored posts.
  • A valid OAuth2 access token.
  • A Discord incoming webhook for the alerts.

Secrets

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

Quick start

  1. Add the two secrets to your Kestra namespace.
  2. Replace the postUrns value with the URNs of the posts you want to watch.
  3. Set disabled: false on the on_new_comment trigger and comment on one of the posts to test the alert.

How to extend

  • Iterate over {{ trigger.allNewComments }} with io.kestra.plugin.core.flow.ForEach to process every comment in a burst individually.
  • Route alerts by post, one Discord channel per campaign, by running one flow per URN list.
  • Add a drafting step that suggests a reply from the comment text before the alert goes out.
  • Shorten the interval during launch days and lengthen it during quiet weeks.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.