If icon
Fail icon
Parallel icon
Script icon
Docker icon
SlackIncomingWebhook icon
Webhook icon

Open Graph Card Generator

Turn a title and brand fields into branded 1200x630 Open Graph social-preview cards, rendered in parallel with Python and Pillow - manually or by webhook.

Categories
Getting StartedCore

Every release note, blog post or product page shared on Slack, X or LinkedIn looks better with a proper social-preview image, and making one in a design tool every time is a chore. This blueprint turns a title and a handful of brand fields into a clean 1200x630 Open Graph card - the size every social platform expects - rendered in both a light and a dark variant so you can pick what fits the post.

How it works

  1. Start the flow manually with its inputs, or enable the on_request webhook trigger (io.kestra.plugin.core.trigger.Webhook, disabled by default) and POST JSON with a title and any of subtitle, kicker, footer, accent. Webhook fields override the flow inputs; anything missing falls back to the input defaults.
  2. validate_title (io.kestra.plugin.core.flow.If + io.kestra.plugin.core.execution.Fail) stops the execution with a clear error if the merged title is empty, so a mistyped payload fails loudly instead of producing a blank card.
  3. render_variants (io.kestra.plugin.core.flow.Parallel) runs two io.kestra.plugin.scripts.python.Script tasks at the same time, each in a fresh python:3.13-slim container with Pillow installed. The embedded script draws the card - accent bar, uppercase kicker, auto-wrapping and auto-shrinking title, subtitle, footer and a small dot grid - supersampled at 2x for crisp text, and writes a PNG as a task output file. The Inter font is fetched at runtime with a graceful fallback to bundled fonts, and long titles are truncated to keep the layout intact.
  4. With slack_notify: true, share_to_slack (io.kestra.plugin.core.flow.If + io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts a short announcement to your channel.

What you get

  • light_card and dark_card flow outputs: two 1200x630 PNGs, downloadable from the execution's Outputs tab or usable downstream (attach them to a release flow, upload them to storage, or post them to social).
  • A deterministic, brand-consistent card from a few text fields - no design tool, no external rendering service.
  • A webhook endpoint (once enabled) that any CI job, CMS or scheduled flow can call with just a title.

Who it's for

  • Developer advocates and open-source maintainers who want every release or changelog shared with a branded preview image.
  • Marketing and docs teams automating social cards for blog posts, podcast episodes or events.
  • Anyone who wants a small, readable example of parallel containerized script tasks in Kestra.

Prerequisites

  • None for a manual run - the default inputs render a sample card out of the box.
  • For the webhook: a namespace secret OG_WEBHOOK_KEY holding a random string; the trigger stays disabled until you turn it on.
  • For Slack announcements: a Slack incoming webhook stored as the SLACK_WEBHOOK_URL secret, and slack_notify set to true.

Secrets

  • OG_WEBHOOK_KEY - protects the webhook trigger URL (only needed when the trigger is enabled).
  • SLACK_WEBHOOK_URL - Slack incoming webhook URL (only needed when slack_notify is true).

Failure paths

  • Empty title (input or webhook payload): the execution fails fast on validate_title with an explicit message.
  • Bad accent color or unknown theme: the render script exits non-zero and the task fails with the reason in its logs.
  • Font download unavailable: the script falls back to bundled fonts and still produces a card.
See How

New to Kestra?

Use blueprints to kickstart your first workflows.