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#
- Kestra: https://kestra.io
- Kestra Documentation: https://kestra.io/docs
- My Kestra Tutorial 1: https://youtu.be/D4cixQ_Ek4Y?si=phFx71A9Bigxe8kJ
- My Kestra Tutorial 2: https://youtu.be/PJG1-7hMHsE?si=JI_Zd3vejAlPAiil
- My Hugo Tutorial: https://youtu.be/MX4yy1dTVYg?si=3pwfNIGzm5nc_4Tv
- My Cloudflare Workers Tutorial: https://youtu.be/FZMgUSlNp-0?si=wQPZpD5fgR59Dzio
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.