New to Kestra?
Use blueprints to kickstart your first workflows.
Check a Fivetran connector's sync and freshness status on a schedule, trigger nothing in Fivetran, and alert Slack on failure, staleness, or pause.
A paused or quietly failing Fivetran connector looks identical to a healthy one from the outside: the dashboards built on top of it just keep showing yesterday's numbers until someone notices. This blueprint turns a scheduled, non-blocking status read into a Day 2 data-pipeline health gate: io.kestra.plugin.fivetran.connectors.Status reports the connector's sync state, setup state, pause state, and Fivetran's own freshness calculation without triggering, pausing, or resuming anything, a single jq query classifies the combination, and the result routes to a quiet log, an informational Slack note, or a Slack page depending on severity.
check_connector_status (io.kestra.plugin.fivetran.connectors.Status) reads connector_id's state from the Fivetran API: syncState, setupState, paused, hasFailed, succeededAt, failedAt, and fresh (Fivetran's own freshness verdict, computed from the connector's syncFrequency plus freshness_buffer). wait: false makes this a single non-blocking read instead of letting the task poll internally until fresh, since this flow's own Schedule trigger provides the recurring cadence instead. allowFailure: true keeps an API or connector lookup failure from aborting the flow outright.classify_connector_health (io.kestra.plugin.core.debug.Return) first guards for a missing connectors output (UNREACHABLE), then pulls the single requested connector's state with a jq query and classifies it: an active sync failure (hasFailed) or a setupState other than connected becomes CRITICAL regardless of pause state, since a broken connector matters more than whether someone paused it on purpose; a paused connector or one Fivetran itself reports as not fresh becomes WARNING; otherwise HEALTHY.route_by_connector_health (io.kestra.plugin.core.flow.Switch) branches on that classification: HEALTHY logs a quiet confirmation; WARNING posts an informational Slack note; CRITICAL and UNREACHABLE each page Slack; a defaults fallback logs the raw value for any classification outside the four known cases.log_audit_result (io.kestra.plugin.core.log.Log) writes one audit line per run, independent of which Switch branch fired, carrying the full raw state (sync state, setup state, paused, fresh, hasFailed, succeededAt, failedAt) so the check's own history stays queryable even if Slack delivery fails.errors block pages Slack separately if the flow fails outright, so a broken sentinel is never mistaken for a healthy connector.connector_freshness_schedule trigger checks every 6 hours and ships disabled: true, with an explicit inputs: override for freshness_buffer so the scheduled run's tolerance is pinned regardless of this flow's own defaults.status output (HEALTHY / WARNING / CRITICAL / UNREACHABLE) other flows can gate on.Fivetran can email on sync failures, but that email lives outside your orchestration layer and says nothing about a connector someone paused and forgot about. Kestra's scheduled, non-blocking Status check folds sync failure, setup health, pause state, and freshness into one typed classification, with the schedule, the check, and the Slack call all captured as one auditable execution history instead of an inbox rule.
connector_id.FIVETRAN_API_KEY, FIVETRAN_API_SECRET: Fivetran API credentials, paired for HTTP Basic authentication.SLACK_WEBHOOK: Slack incoming webhook used for every alert branch and the flow-failure alert.In Kestra OSS (no Enterprise secrets backend), secrets are supplied as environment variables prefixed SECRET_, base64-encoded, and read back in flows with {{ secret('NAME') }}, for example SECRET_SLACK_WEBHOOK=$(echo -n 'https://hooks.slack.com/services/<placeholder>' | base64). This keeps credentials out of the flow YAML but, per Kestra's own documentation, offers no encryption at rest or access control beyond the host environment; use the Enterprise secrets backend for stronger guarantees.
connector_id without a paid plan.docker network ls for Kestra's network and attach that gateway container to it:
docker network connect YOUR_KESTRA_NETWORK <container_name>
Avoid host port 8080 for any such local proxy since Kestra's own UI already uses it.FIVETRAN_API_KEY, FIVETRAN_API_SECRET, and SLACK_WEBHOOK as secrets, set connector_id to a real connector, and run the flow once manually to confirm status reads HEALTHY.status reads WARNING.connector_freshness_schedule once pointed at a real connector.connectorIds and change the jq query from to_entries[0].value to iterate every entry, reporting the worst classification across a whole connector fleet in one run.CRITICAL branch into a ticketing system with the connector's failedAt timestamp attached for faster triage.status into a KV store and alert only on state transitions instead of every run.wait: true with a short maxDuration instead of false if a specific execution should actively wait for freshness rather than just sampling it.connector_id: the Fivetran connector to check (type STRING).freshness_buffer: ISO-8601 duration added on top of the connector's own sync frequency before it is considered stale (type STRING, default PT30M).status: one of HEALTHY, WARNING, CRITICAL, UNREACHABLE.{{ outputs.classify_connector_health.value }}, also exposed as the flow output {{ outputs.status }}.fresh reflects Fivetran's own calculation from syncFrequency plus freshness_buffer; a connector with a long sync interval (e.g. a 24-hour schedule) can look WARNING for most of a normal day if the buffer is set too tight. Tune freshness_buffer against the connector's real schedule before enabling the schedule trigger.wait: false is deliberate: setting it to true turns this single scheduled probe into a task that can block for up to maxDuration (default one hour) waiting for freshness, which defeats the point of a lightweight recurring check.