kestra icon
qq icon
Count icon
Return icon
Log icon
QQIncomingWebhook icon
Schedule icon

Daily pipeline digest to a QQ channel

Schedule a daily Tencent QQ digest of Kestra executions with success, failed, warning, and running counts for the watched namespace.

Categories
Business

Send a recurring daily pipeline status digest to a Tencent Cloud IM / QQ team channel using Kestra. This blueprint queries the Kestra API for the prior day's execution counts (SUCCESS, FAILED, WARNING, RUNNING) in a watched namespace, assembles a human-readable summary, and posts it to the configured QQ group or user IDs. It replaces ad hoc morning status checks with a deterministic, backfill-safe digest that arrives on schedule and itself alerts the channel if delivery breaks.

How it works

  1. The daily_morning_digest trigger of type io.kestra.plugin.core.trigger.Schedule fires at 0 8 * * * in Asia/Shanghai.
  2. The reporting window is derived from {{ trigger.date ?? execution.startDate }} (never now()), so backfills and replays report the historically correct day.
  3. Four io.kestra.plugin.kestra.executions.Count tasks (count_success, count_failed, count_warning, count_running) hit the Kestra API for the prior 24h window in the watched_namespace.
  4. build_summary (io.kestra.plugin.core.debug.Return) renders the digest text including the team label, window, counts per state, and a conditional callout when failures occurred.
  5. log_counts (io.kestra.plugin.core.log.Log) surfaces the body in execution logs.
  6. post_digest_to_qq (io.kestra.plugin.tencent.qq.QQIncomingWebhook) posts the message as a TIMTextElem to the digest_recipients.
  7. A flow-level errors block (alert_digest_failure) posts a distinct failure notice to the same QQ group if the digest itself breaks.

What you get

  • A predictable morning status message in QQ with real counts per execution state.
  • A clear action callout when failed executions exist in the window.
  • Backfill-safe windows anchored on the trigger date, not wall-clock time.
  • Retries and timeouts on every remote call (Kestra API and QQ webhook).
  • A self-reporting error path so a broken digest is not silent.

Who it's for

  • Data and analytics teams running pipelines on Kestra who coordinate in Tencent Cloud IM / QQ.
  • Platform and SRE owners who need a daily heartbeat per namespace.
  • Team leads who want one channel message instead of dashboard scraping.

Why orchestrate this with Kestra

Tencent Cloud IM has no native scheduler that knows about your pipeline state, and the Kestra API itself has no built-in chat publisher. Kestra closes that gap declaratively: the Schedule trigger fires the digest, the executions.Count tasks pull live counts from the same engine running your workloads, and pluginDefaults reuse the Kestra and QQ connections across tasks without duplicating secret() calls. You get event triggers, per-task retries and timeouts, full execution lineage in the UI, and a single YAML file under version control, instead of a cron job stitching together two REST clients.

Prerequisites

  • A Tencent Cloud IM / QQ application with the REST API enabled and a valid UserSig signature.
  • The Tencent Cloud IM sendmsg REST endpoint URL for your SDKAppID.
  • One or more QQ group or user identifiers to receive the digest.
  • Kestra API access (base URL plus basic auth credentials) for the executions.Count tasks.

Secrets

  • TENCENT_IM_URL: Tencent Cloud IM REST endpoint, for example the v4/openim/sendmsg URL including your SDKAppID and admin identifier.
  • TENCENT_IM_TOKEN: Tencent Cloud IM authentication token or UserSig signature.
  • KESTRA_API_URL: base URL of the Kestra API the count tasks call (for example http://localhost:8080).
  • KESTRA_API_USERNAME: Kestra API basic auth username.
  • KESTRA_API_PASSWORD: Kestra API basic auth password.

Quick start

  1. Add the TENCENT_IM_URL, TENCENT_IM_TOKEN, KESTRA_API_URL, KESTRA_API_USERNAME, and KESTRA_API_PASSWORD secrets to your Kestra instance.
  2. Set watched_namespace to the namespace whose executions should be counted.
  3. Set digest_recipients to the QQ identifiers of your team channel members.
  4. Adjust the cron and timezone of the daily_morning_digest trigger to your reporting time.
  5. Deploy the flow and wait for the next scheduled run, or trigger it manually to preview the digest.

How to extend

  • Swap the daily cadence for hourly or weekly by changing the cron on daily_morning_digest.
  • Add more executions.Count states (such as KILLED or PAUSED) and include them in the build_summary template.
  • Filter by labels or flow IDs to scope the digest to a specific pipeline group.
  • Replace QQIncomingWebhook with Slack, Teams, or Email tasks to fan out to additional channels.
  • Append a list of the top failing flows by calling executions.Search and templating the results into the message.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.