Published At: December 28, 2025
Reading Time: 2 minutes
Author: Prajwol Shrestha
I kept doing the same thing over and over:
an email arrives → copy the subject → download attachments → convert attachments to images → post to Facebook.
After the third or fourth time, I stopped and automated it with n8n.
Now, whenever a new email lands in a specific mailbox, it automatically becomes a Facebook post — attachments included.
This post is a quick breakdown of what I built, why I made certain choices, and what actually worked for me.

High-level view of the email → Facebook automation workflow
I initially tried using n8n’s Gmail Trigger because it felt like the more “native” option.
In practice, it wasn’t reliable enough for my use case:
For an automation that posts publicly, missing even one email isn’t acceptable.
I switched to IMAP for a few practical reasons:
It’s simple, reliable, and kept the workflow firing every time — exactly what I needed.
Facebook doesn’t let you upload multiple images directly in a single post.
Instead, you have to:
media_fbidsHere's what that looks like in n8n:
Step 1: Loop through attachments
Step 2: Upload as unpublished
/{page-id}/photosPOSTpublished: false and pass the attachment URLEach upload returns a media_fbid — save these.
Step 3: Create the final post
/{page-id}/feedmedia_fbids you collectedOnce I understood this flow, the rest was straightforward.
n8n treats email attachments as binary data. I had to use the Convert to File node before uploading to Facebook, otherwise the API rejected them
Make sure your app has pages_manage_posts and pages_read_engagement permissions, or uploads will fail.
This isn’t a flashy automation — but it quietly saves time and removes friction.
If you’re already using n8n and dealing with repetitive posting, this kind of workflow is absolutely worth building.
Sometimes the best automations are the ones you don’t even notice anymore.
#n8n
#automation
#workflow