Automating Multi‑Platform Content Publishing – Fixing the Metadata Sync Bug in content‑automation
Automating Multi‑Platform Content Publishing – Fixing the Metadata Sync Bug in content‑automation TL;DR: I patched the content‑automation pipeline so that Bluesky, Dev.to and Substack posts stay in sync by correcting the metadata JSON and fixing a property‑assignment bug in lib/properties.js . The changes prevent stale URIs and missing devto_url fields, keeping the automated publishing flow…
On 2026-11-28, the automated content‑automation pipeline began publishing posts to Bluesky, but the accompanying metadata file still contained empty devto_url fields and stale URLs for Bluesky. This resulted in two major issues: stale Bluesky URIs remaining after new posts and missing devto_url fields breaking shared links in newsletters.
The root cause was a property‑assignment bug in lib/properties.js, where a constant named CUNRP was incorrectly assigned to the wrong collection, causing the script to pick the wrong metadata file during generation. To fix this, I stripped out dead constants and replaced the faulty mapping with an explicit enum. I also centralized platform payload generation in scripts/generatePayloads.js, ensuring every platform file reflected the latest metadata.
Finally, I updated metadata.json with the correct devto_url and mirrored that change for other sections. With these changes, the pipeline now reliably publishes content across Bluesky, Dev.to, and Substack without stale URIs or missing URL fields.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to