
Built an n8n pipeline that writes, designs, and posts my Instagram photos + carousels (not reels) | setup and gotchas inside
I kept falling off Instagram because the grind isn't posting, it's the daily what-do-I-post-plus-make-the-graphic-plus-write-the-caption. So I moved that loop into n8n. Two workflows.
First one writes the content. A Basic LLM Chain node generates post drafts - hook, caption, hashtags, carousel slide text - into a Google Sheet marked ready-to-review. I fix what's clumsy and flip the good ones to approved. Nothing posts without approval.
Second one posts. On a schedule it grabs the top approved row, a rule picks one of a few branded HTML/CSS templates, a Code node fills it with the row's text, HTMLCSStoImage renders it to a PNG, and it goes up via the Instagram Graph API - single or carousel. Then it marks the row posted so nothing double-fires. Free tiers, no Canva.
Gotchas:
- No trending audio via the API. It's app-only. So this does images and carousels, not reels.
- HTMLCSStoImage free tier is 50 images/month, and each carousel slide is a separate render. Budget by slides.
- HTML-to-image needs a browser engine. HCTI hides it behind an API; self-hosting means adding Chromium (Puppeteer/browserless). But too much work
- Content publishing is two steps (create container, then publish). Carousels are create-each-item, then carousel container, then publish. That branch took the most debugging.
- Use the long-lived token. The short one dies in an hour.
Not set-and-forget. AI drafts, I approve, it handles the design and posting. Fine by me.
Workflows (gist): https://gist.github.com/abhishek-geek/4d5e36e11641a1b428eb7ddae3044d5c
Full walkthrough: https://youtu.be/C_8Bl1qACis