API Contract Smoke Test with Slack Alerts
Validate API status codes and response markers on a schedule, save evidence, and alert only on failures.
Fetch your public IP, compare it with the last value in the KV store, and automatically update Cloudflare DNS records on change.
Home labs, VPNs and NAT gateways change their public IP without telling you, and then allow-lists and firewall rules quietly stop matching. This blueprint checks the egress IP, remembers it, and automatically updates your Cloudflare DNS A record the moment it changes, notifying your team via Slack.
get_current_ip (io.kestra.plugin.core.http.Request) asks an IP service for the address your worker's traffic comes from.get_previous_ip (io.kestra.plugin.core.kv.Get) loads the IP saved by the previous run. Missing on the very first run, which is fine.check_ip_change (io.kestra.plugin.core.flow.If) evaluates if the current IP differs from the stored IP.update_cloudflare_dns (PUT request to Cloudflare API), save_new_ip (updates the KV store), and notify_slack.Schedule every hour and a Webhook for on-demand checks.errors block to catch API or network failures.A simple cron script can check an IP, but it cannot remember state between runs, prevent API rate limits by skipping unchanged IPs, or provide a centralized, observable execution history. Kestra supplies the durable KV store for state tracking, declarative YAML for the branching logic, built-in scheduling, and seamless integration with notification plugins.
api.ipify.org and api.cloudflare.com.CF_ZONE_ID: Your Cloudflare Zone ID (found in the domain overview).CF_API_TOKEN: Cloudflare API token with Zone:DNS:Edit permissions.SLACK_WEBHOOK_URL: Slack incoming webhook URL for notifications.domain_name (STRING, default home.example.com): The domain to update.cloudflare_zone_id (STRING): Your Cloudflare Zone ID.cloudflare_api_token (STRING): Cloudflare API token.slack_webhook_url (STRING): Slack webhook URL.CF_ZONE_ID, CF_API_TOKEN, SLACK_WEBHOOK_URL) to your Kestra namespace.hourly_check trigger when you are happy.outputs.get_current_ip.body: 203.0.113.7outputs.get_previous_ip.value: 198.51.100.42@ and www subdomains) in a single run.