Lifestyle Hikers Content Distribution Automation

This repo now supports a single source-of-truth flow for announcing hikes and blog posts from the CMS.

Architecture

Sveltia/Decap CMS
  -> GitHub commit to main
  -> Content Distribution Webhook GitHub Action
  -> scripts/build_content_distribution_payload.rb
  -> n8n webhook
  -> Telegram and Brevo

Hikes live in _data/events.yml. Blog posts live in _posts/.

The website does not render the new automation fields. Existing homepage hike cards and blog pages should continue to behave the same way.

Live n8n Workflows

The live webhook distributor is:

It reuses proven pieces from these existing workflows:

The older workflows are preserved so they can be compared or rolled back if needed.

Required GitHub Secrets

Set these in the GitHub repository settings:

Optional GitHub repository variable:

CMS Fields

Hikes have these optional automation fields:

Blog posts have these optional automation fields:

Publishing A Hike Announcement

  1. Open the CMS.
  2. Edit Upcoming Hikes.
  3. Fill in the normal hike details.
  4. Add a flyer and registration link if available.
  5. Set Distribution Status to Ready.
  6. Leave Send to Telegram on.
  7. Leave Send to Brevo on if the email should go out.
  8. Publish the CMS change.

The GitHub Action will only build payloads for hikes where distribution_status: ready.

Publishing A Blog Telegram Announcement

  1. Open the CMS.
  2. Create or edit a blog post.
  3. Add the title, slug, date, description, image, and body.
  4. Set Distribution Status to Ready.
  5. Leave Send to Telegram on.
  6. Leave Send to Brevo off unless blog email delivery has been explicitly configured in n8n.
  7. Publish the CMS change.

The GitHub Action only builds blog payloads for changed blog posts where distribution_status: ready.

Dry Run

Dry run mode builds payloads without sending to n8n.

Use one of these:

Local dry-run examples:

ruby scripts/build_content_distribution_payload.rb --root . --changed-files "_data/events.yml"
ruby scripts/build_content_distribution_payload.rb --root . --changed-files "_posts/2026-02-15-kwame-falls-first-hike-2026.md"

n8n Webhook Contract

n8n should:

Recommended log fields:

Telegram Behavior

For hikes:

New Lifestyle Hikers Adventure



Date: 
Time: 
Location: 
Difficulty: 
Distance: 
Spots: 



Register:

For blogs:

New Lifestyle Hikers Blog Post





Read here:

Current live behavior uses Telegram sendMessage. If a flyer or image exists, the image URL is included in the message text.

A later upgrade can switch this to Telegram sendPhoto after testing against a private Telegram test channel.

Brevo Behavior

For hikes, Brevo email should include:

Use test-recipient mode before sending to the live list.

Duplicate Protection

The GitHub Action may rerun, and CMS edits may happen more than once. n8n must treat announcement_id as the idempotency key.

If the same announcement_id has already succeeded, n8n should skip sending and return a safe success response.

Troubleshooting

If nothing sends:

If Telegram fails:

If Brevo fails: