New to Kestra?
Use blueprints to kickstart your first workflows.
Get yesterday's Fastly traffic in Slack every morning with Kestra. Pull day-bucketed stats and post requests, hits, and errors for the service.
Edge traffic is where problems show up first, and where nobody looks until something breaks. This blueprint puts the numbers in front of the team every morning: io.kestra.plugin.fastly.stats.Stats pulls yesterday's window for one service with day-level bucketing, and Slack gets the three numbers that summarize edge health, requests served, cache hits, and errors. The full stats payload, with every field Fastly reports for the day, stays attached to the execution for anyone who wants to dig deeper.
daily_stats (io.kestra.plugin.fastly.stats.Stats) queries the service with from set to yesterday and to set to today, computed from the schedule date with a fallback to the execution start for manual runs, and by: day so the window collapses into a single datapoint.data output is keyed by service ID, holding a list with one entry per day bucket. The Slack payload extracts the requests, hits, and errors scalars from the single bucket with jq, keeping the JSON payload scalar-only.notify posts the digest with the report date and a pointer to the execution for the full payload.errors block sends a distinct alert when the stats call fails, so a missing digest never goes unnoticed.Schedule trigger delivers the digest at 07:00.The Fastly console has these numbers, behind a login, for whoever remembers to look. Kestra turns them into a push: a scheduled flow with retries, a scalar-safe notification, an execution history that doubles as a day-by-day archive of the raw stats, and an error path that makes a broken report as loud as a bad number. Adding a second service or a second channel is a copy of one task, not a new report to maintain.
FASTLY_API_TOKEN: Fastly API token with stats read access.SLACK_WEBHOOK_URL: Slack incoming webhook URL.service_id and check the Slack digest against the Fastly console for the same day.disabled: false on the daily trigger.io.kestra.plugin.fastly.stats.AggregateStats for an account-wide digest.io.kestra.plugin.core.flow.If that escalates the message when errors exceed a limit, as the error spike trigger blueprint does in real time.