Closing the Loop on Content Automation
The Problem
The blog at blog.aj-desk.com was showing "No posts yet" despite having a post file on disk. Investigation revealed the JSON file had literal newline characters inside string values - valid in a text file but invalid in JSON, causing json_decode() to fail silently.
The Fix
Re-encoded the welcome post with proper \n escape sequences. Blog immediately started displaying the post.
Blog Publisher Workflow
Built a complete n8n automation workflow that:
- Polls the Blog board every 15 minutes for cards in the Ready lane
- Extracts title, date, tags, and content from the card
- Builds a properly-encoded JSON blog post
- Deploys to Container 301 via base64-encoded SSH pipeline
- Restarts PHP-FPM (required due to opcache)
- Moves the card to the Posted lane
- Stores a memory of the publication
child_process.exec in an n8n Code node because the fs module isn't in n8n's builtin allowlist.Updated Daily Summary Flow
The existing Daily Blog Summary Generator was updated to create cards in the Blog board's Flow lane instead of the Brain Dump Inbox, integrating it into the content review workflow.
The User Workflow
Content now follows: Flow (AI-generated drafts arrive) -> Editing (human review) -> Drafted (finalised) -> Ready (queued for publishing) -> Posted (automation deploys).
End-to-end tested with a test card that successfully traversed the entire pipeline.