Blaze Automates
Build Log · Pinterest Autopilot

Pinterest Autopilot V4: What I Fixed, What I Broke, and the API Key I Had to Rotate

By Blaze Automates · Automated content workflows

Pinterest Autopilot started as a simple pin-generation loop in V3 and turned into something closer to a real system by V4, multi-board posting, a dual-schedule setup running both in the cloud and on a local machine, and a packaged product with a full guide. It also gave me one of the more uncomfortable moments I've had building any of these tools, which felt more worth writing about than the feature list.

The moment I found a live key sitting in a file I'd already shared

While working through V4, I opened the shared workflow file and found hardcoded, live API keys for both Gemini and Groq sitting in plain text inside it, not in a `.env` file, not in a credentials store, just pasted directly into the JSON. This is the kind of mistake that's easy to make when you're moving fast between local testing and building the "shareable" version of a workflow, and easy to miss because the workflow still runs fine either way.

I rotated both keys immediately, generated new ones, updated every place that referenced them, and revoked the old ones so anything that had seen that file couldn't use them. Nothing came of it that I know of, but that's the point: you don't usually find out a key leaked until it's already been used against you. The fix that actually matters isn't "don't make the mistake." It's building the workflow so the mistake can't happen quietly. That's what became the Config node.

If you're building shareable n8n workflows: grep your exported JSON for anything that looks like a key before you send it to anyone, not just before selling it, every time. It's a two-second check that a hardcoded credential doesn't announce itself.

What V4 actually added over V3

Multi-board posting

V3 only posted to a single board at a time. Fine for testing, not fine for a real content calendar. V4 added board_index modulo-2 cycling, splitting posts evenly across boards instead of dumping everything into one, which is closer to how an actual account should behave.

A Performance tab

Every pin now logs its result to a dedicated Performance tab in the Google Sheet, instead of just trusting that a run "probably worked," there's a record of what actually posted, which made debugging every other issue on this list faster.

One Config node instead of scattered credentials

This is the node that grew directly out of the key-leak scare. Every credential and URL now lives in a single node instead of being scattered across whichever node happened to need it: Groq, Cloudflare, the render server, ImgBB, the Make.com webhook, the Sheet ID, the Slack webhook. If this workflow ever gets shared again, there's exactly one place to check, and exactly one place to swap in new keys.

Two schedules sharing one State tab

V4 split into a Railway instance running overnight and a local NSSM-managed instance running during the day, both reading and writing the same State tab, on schedules designed not to overlap. Getting this right meant making sure neither instance would grab a pin the other had already claimed, which is a smaller version of the idempotency problem I'd eventually solve properly in V5.

Packaged as an actual product

Workflow JSON, a PDF setup guide, a product spreadsheet template, and a README, the same packaging pattern as everything else I ship, so a buyer isn't left guessing how to wire it up themselves.

Bugs inherited from V3, fixed here

Two problems followed V4 over from V3 and got fixed properly this round:

New bugs V4 introduced, and fixed

What I knew about and left broken

One issue made it into production on purpose, unfixed: if image generation or the Puppeteer render server failed, the workflow would silently fall back to a stored emergency image and post it anyway, no alert, no log entry calling it out. I knew about this in V4 and shipped anyway, because the alternative was blocking every post on a render server that mostly worked. That silent-fallback problem didn't get fixed until V5, alongside a proper idempotency system. That's a separate post.

I've gotten real, specific feedback from the n8n community on things like idempotency and generation/delivery separation since shipping this, feedback that shaped V5 directly. If you're running a similar posting pipeline and have hit the same class of problems, I'd genuinely like to compare notes.

Product: Pinterest Autopilot, workflow JSON, setup guide, and product spreadsheet template, on Gumroad.

More posts: back to the Blaze Automates blog for other build logs, including Context Auto-Maintainer and Figma Drift Watcher.