Skip to main content

Self-hosted Automation for Git, Webhooks, and more // Kestra #3

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.

References
#

Notes
#

Important Kestra tips
#

  • Use the Webhook trigger key/secret in the URL path: https:///api/hooks/flows///
  • Store parsed webhook fields in OutputValues to pass structured variables between tasks.
  • Use the WorkingDirectoy task 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.
Christian Lempa
Author
Christian Lempa
IT & Tech Nerd | DevOps and Automation FanBoy