Query icon
Script icon
Process icon
SlackIncomingWebhook icon
Schedule icon

Weekly monday.com Portfolio Digest from One Raw GraphQL Query

Report on your whole monday.com account with Kestra. One raw GraphQL query lists active boards and item counts, Python computes KPIs, Slack gets the digest.

Categories
Business

The dedicated monday.com tasks cover items, boards, and groups one entity at a time, but portfolio questions, how many boards, how much work, where is it piling up, want one shaped query. This blueprint uses io.kestra.plugin.monday.query.Query to send raw GraphQL asking for every active board with its items_count, then a small Python step turns the JSON payload into scalar KPIs that flow straight into a Slack digest.

How it works

  1. portfolio_query (io.kestra.plugin.monday.query.Query) runs the raw GraphQL query boards(limit: 100, state: active) { id name items_count }. The API's data payload is exposed as {{ outputs.portfolio_query.data }}.
  2. summarize (io.kestra.plugin.scripts.python.Script on the io.kestra.plugin.core.runner.Process task runner) receives that payload as JSON through the PORTFOLIO_JSON environment variable, computes the board count, total items, and the busiest board, and emits them with Kestra's ::{"outputs": ...}:: protocol. No third-party packages are needed, so the Process runner is enough.
  3. notify interpolates the four scalars, {{ outputs.summarize.vars.total_boards }}, total_items, top_board_name, and top_board_items, into a Slack message.
  4. The errors block posts a distinct Slack alert when the query or the summary fails.
  5. A disabled-by-default Schedule trigger publishes the digest every Monday at 08:00.

What you get

  • Account-wide numbers from one API round trip instead of a task per board.
  • The full flexibility of monday.com's GraphQL schema, any field the API offers can join the query.
  • KPIs as first-class flow outputs, reusable by downstream tasks or alert thresholds.
  • A weekly Slack digest and a failure alert when it breaks.

Who it's for

  • PMO and operations leads reporting on work distribution across teams.
  • Platform owners watching for boards that balloon past healthy sizes.
  • Anyone who needs monday.com data shaped in ways the entity tasks do not cover.

Why orchestrate this with Kestra

A GraphQL query answers the question once; a report needs it answered every Monday, transformed identically, delivered to the same channel, and flagged when it fails. Kestra provides the schedule, retries on transient API errors, the Python transform with output passing, and an execution history that makes every past digest auditable.

Prerequisites

  • A monday.com account whose token can read the boards you want counted.
  • Python 3 available on the Kestra host, since the summary runs on the Process task runner.
  • A Slack incoming webhook for the digest and failure alerts.

Secrets

  • MONDAY_API_TOKEN: monday.com personal API v2 token, from Profile, Developers, My Access Tokens.
  • SLACK_WEBHOOK_URL: Slack incoming webhook URL.

Quick start

  1. Add the two secrets to your Kestra namespace.
  2. Execute the flow and check the Slack digest lists your board and item totals.
  3. Set disabled: false on the weekly trigger.

How to extend

  • Enrich the GraphQL query with more board fields, for example state, board_folder_id, or subscribers, and extend the Python KPIs accordingly.
  • Raise the limit or add pagination inside the query for accounts with more than 100 boards.
  • Alert on thresholds by wrapping the notification in io.kestra.plugin.core.flow.If, for example when total_items jumps week over week.
  • Land the raw payload in a warehouse by pairing this flow with a database plugin task.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.