Self-hosted Automation for Git, Webhooks, and more // Kestra #3
Video write-up
This video shows how I built a Kestra automation that turns a Notion "Published" entry into a Hugo markdown post, downloads the thumbnail, and creates a GitLab merge request so my static site (Cloudflare Workers) can publish the new video — all without manual edits to the site. I walk through the webhook trigger, parsing Notion data in Kestra, the Python template script, thumbnail download, and the Docker-based merge-request workflow with glab.
Important Kestra tips
Store parsed webhook fields in
OutputValuesto pass structured variables between tasks.Use the
WorkingDirectoytask to keep a single temporary folder across tasks so the cloned repo and generated files are available for subsequent steps.Use the Files (namespace files) tab in Kestra Web UI to bundle scripts and other files with your flow; access them via includes.
Task runner choices
Process Runner: runs shell/python directly on the Kestra host (faster; relies on host packages). Good for simple scripts when required tools are already installed.
Docker Task Runner: run in a container (isolated, reproducible). I use Docker for the glab CLI step because it simplifies dependencies and authentication.