# 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.

[Use template](https://dashboard.fasthook.io/workflow/new?templateKey=webhook-to-cloudflare-kv-expiring-banner&templateName=Show+a+website+banner+until+its+expiry+time)

**Required accounts**

- Cloudflare Workers KV

## Show a website banner until its expiry time

### 1. Trigger · Banner announcement received

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

### 2. Action · Store the announcement until closing time

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

## 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.

## Related integrations

- [Webhook trigger](https://www.fasthook.io/docs/triggers/webhook)
- [Cloudflare Workers KV integrations](https://www.fasthook.io/apps/cloudflare-workers-kv/integrations)
