Webhook logo
Cloudflare Workers KV logo

Workflow template

Show a website banner until its expiry time

Receive announcement text and its expiry through a private webhook. The website reads one KV key and the banner expires automatically.

How it works

Show a website banner until its expiry time

1 Trigger · 1 Action
Webhook1 · Trigger

Banner announcement received

Receive a JSON submission from your existing form backend at this Workflow's private webhook URL.

Cloudflare Workers KV2 · Action

Store the announcement until closing time

Write text or binary data under one key. Optionally attach JSON metadata or set an expiration time.

Before activation

Set up your workflow

  1. Connect the announcement webhook

    Copy the private webhook URL from the trigger. Send a JSON object with message and expires_at. Use a Unix timestamp in seconds at least a minute in the future.

  2. Choose the banner key

    Connect KV, select the website namespace and choose a key such as site:banner. Keep the text mapped to message and the absolute expiration mapped to expires_at.

  3. Render the message on the site

    Have the website read the selected key and render it as plain text. Hide the banner when the key is absent. Allow for propagation when checking a recently changed value.

  4. Verify automatic removal

    Send a short-lived test message. Confirm the value appears, then read the key again after expiration and verify the banner disappears.

Explore connected apps