n8n Approval Flow for Auto-Posting WordPress Articles to Facebook: Post, Edit, or Don’t Post

封筒から出たカードに3つのボタン。1つから投稿の吹き出しへ矢印(フラットなイラスト)

When I publish a blog post, n8n (a no-code automation tool) uses AI to write a post for my Facebook page, then emails me to ask, “Is it OK to post this?”

That’s how my blog auto-posts to Facebook: with an approval flow (a setup that only moves forward after a person says OK).

At first, there was only one “Post” button, but now there are three choices: “Post,” “Edit, then post” and “Don’t post.”

Then, the other day, I tried “Edit, then post” to take screenshots for this article, and found out that it had never actually posted anything. ( ゚д゚) What the heck!

I’ll cover everything: how I stumbled while turning the n8n approval flow into three choices, the problem of pending approvals piling up, and why the “edit” path didn’t work and how I fixed it.

What you’ll find in this post
• How to auto-post WordPress articles to Facebook with n8n, “after approval”
• How I turned the approval email into three choices (Post / Edit, then post / Don’t post)
• Pending approvals piling up, and setting them to close automatically after 7 days
• Why “Edit, then post” wasn’t working (one expression in n8n)

A card with three buttons comes out of an envelope; an arrow goes from one button to a post speech bubble (flat illustration)
Sponsored links

Auto-posting WordPress articles to Facebook “after approval” with n8n

How it works now

When I publish an article on WordPress, things happen in this order:

  • WordPress tells n8n, “I just published something”
  • If it’s an English article, it stops here
  • It sends a notification email for X
  • It fetches the article and has Gemini (Google’s AI) write a Facebook post
  • It sends an approval email (with three buttons) and waits until a button is pressed
  • “Post” → posts to Facebook / “Don’t post” → does nothing / “Edit, then post” → I fix it in a separate form, then it posts
The whole “X auto-post” workflow in n8n, from WordPress publishing to Facebook approval and the X notification

In an earlier post, I wrote about how I got Facebook auto-posting to work in the first place (and the rabbit hole of getting a never-expiring token). It’s in Japanese for now.

When a post goes live, two emails arrive together

When an article goes live at 7:30 a.m., two emails arrive at 7:31.

Gmail, one minute after an article went live: the Facebook approval email and the X email arrived together

One is for X. I don’t auto-post to X through its API yet, so when I tap “Click to post to X” in the email, the X app opens with the post text and the article card already filled in. All I have to do is tap “Post.”

The email for X: a “Click to post to X” button, the post text and the article URL
After tapping the button, the X app opens with the post text and article card filled in

The other is the Facebook approval email this post is about.

At first, there was only a “Post” button

Not pressing it was supposed to mean “don’t post,” but…

The first approval email had only a “Post” button, and it said, “If you don’t press it within 24 hours, it will be canceled.” So I assumed not pressing it meant “don’t post.”

But when I looked at n8n’s execution log, I found that this “cancel after 24 hours” wasn’t actually working.

Approval emails I hadn’t pressed from July to September had piled up: nine of them were still “waiting.” ((((;゚Д゚)))))))

I think I didn’t press them because I’d decided, “I don’t need to post this one.” Maybe, once in a while, I was just too busy to look.

But if you’ve decided “don’t post,” it’s better to have a button you can actually press to make that happen, right?

Three choices: Post, Edit, then post, Don’t post

Three buttons in the approval email

So I gave the approval email three buttons:

The top of the Facebook approval email: the post text written by Gemini
The bottom of the approval email: the article URL, article ID and three buttons: “Post as is,” “Edit, then post” and “Don’t post”
  • ✅ Post as is: posts the AI-written text to Facebook as it is
  • ✏️ Edit, then post: opens a form where I fix the text, then posts
  • ❌ Don’t post: does nothing

“Post” and “Don’t post” use a feature of n8n’s Wait node called “On Webhook Call.” n8n creates a unique resume URL for each execution ($execution.resumeUrl), so if you put it behind a button in the email, the paused workflow continues the moment you press it.

The edit form is password-protected

For “Edit, then post,” I set up a separate form with n8n’s Form Trigger (a node that creates forms).

This form can be opened from outside, so I added Basic authentication (it asks for a username and password when you open it).

Stumble #1: I set the form’s URL, but it wouldn’t open

This is where I stumbled once.

If you set the form’s “path” (the last part of the URL) yourself, it should open at that URL. That’s what I thought, so I put it in the email link, but no matter how many times I opened it: “Problem loading form.”

At first I thought, “Maybe it’s about when it gets activated?” and stopped and restarted the workflow, but nothing changed. (;´Д`A

In the end, with the Form Trigger version in my setup (version 2.5), the path I set wasn’t being used, and the URL was an automatically generated ID. I fixed it by changing the email link to that URL.

Stumble #2: the form was empty

The next thing that bothered me was that the edit form opened completely empty.

That meant copying the article ID, article URL and post text from the email every time, pasting them into the form, and then editing.

I found out that n8n forms can open with values already filled in if you add them to the end of the URL.

But there were three small traps here, too:

  • It only works with the production URL (the test URL ignores it; this was in n8n’s official docs, too)
  • Japanese text and symbols must be percent-encoded (converted into something like %E3%81%82) or they won’t go in
  • The names you add to the URL must match the Field Name (an alphanumeric name like article_id), not the label shown on screen, such as “Article ID”

Now, when I press the button, the form opens with the article ID, article URL and post text already filled in. ♪( ´▽`)

The edit form, with the article ID, article URL and post text already filled in

Pending approvals piled up → I made them close automatically after 7 days

Before I knew it, 14 more

A while after switching to three choices, I was reviewing n8n and found 14 more pending approvals piled up. (ノД`)

There were two causes:

  • The Wait node was set to keep waiting for a button press with no time limit
  • “Edit, then post” posts through a separate flow (one that starts from the form), so the “waiting” on the approval email side never ended

That was it.

I gave the Wait node a 7-day limit

So I turned on the Wait node’s “Limit Wait Time” and made it automatically go to “Don’t post” after 7 days.

n8n’s Wait node: it waits 7 days for approval and closes automatically after that

Now, whether I forget to press a button or post through the edit form, it cleans itself up after a week.

While I was at it: emails were coming for English posts too

Oh, by the way, I also found out then that emails were being sent when I published English versions too.

On top of that, there were times when the Japanese and English versions ran almost at the same moment (1.5 seconds apart), overwrote each other’s saved post text, and ended up trying to post an empty message to Facebook, which caused an error.

Now English versions are stopped right at the entrance.

While taking screenshots, I found “Edit, then post” wasn’t working

On my phone (Xiaomi), I couldn’t paste the password

This happened the other day (11/4) while I was taking screenshots for this article.

When I open the approval email on my phone and tap “Edit, then post,” the Basic authentication password screen comes up first.

The sign-in screen (Basic authentication) that appeared after tapping “Edit, then post” on my phone

My password is in Keeper, a password manager, so I open Keeper, copy the password and come back.

Then, well, not exactly an error, but I couldn’t paste it, so I couldn’t edit from my phone. (;´Д`A

With the iPhone I used before, the same password screen worked fine, so it was never a problem. But on my current Xiaomi 17T Pro (Android), for some reason I can’t paste passwords into the Basic authentication screen. I guess I’ll edit from my PC.

Tapping “Post” always shows one line of English

On my phone, I tapped “Post as is.”

When I do, I always get this screen:

The screen with just one line of English that appeared after tapping “Post as is”

{“message”:“Workflow was started”}. Just one line of English.

It had been posted to Facebook properly (this is how it looks on my Facebook page).

The post automatically published on my Facebook page

I sent the edit form from my PC: “Form Submitted”

I took the screenshots of the edit form on my PC. I left the content as it was, pressed submit, and got “Form Submitted.”

The “Form Submitted” screen after sending the edit form (before the fix)

So I thought it was probably working, but…

Three paths from an envelope; only the orange one breaks off halfway (flat illustration)

The execution log showed it had stopped with an error

When I had Claude (my AI assistant) look at n8n’s execution log:

  • The one I sent with “Post as is” from my phone → was posted to Facebook properly
  • The one I sent from the edit form on my PC → hit an error at the final “post to Facebook” step

That was the situation. Text sent from the edit form had never been posted to Facebook. ( ゚д゚)

Here’s the error:

Node 'Load FB Data' hasn't been executed

This time I hadn’t changed anything and just sent it as is, so there was no harm done (and no double post). But it meant that even when I really did edit and send something, it wouldn’t get posted.

The cause: the Facebook posting node was only looking at one of the paths

The cause was the way one single thing was written inside the node that posts to Facebook (Post to Facebook).

This node read the post text from a node called “Load FB Data,” by name.

{{ $('Load FB Data').item.json.message }}

The “Post as is” path goes through Load FB Data (the node that pulls out the saved post text) before posting to Facebook, so it works.

But the “Edit, then post” path comes straight from the form to the Facebook posting node, without going through Load FB Data. So it tried to read from a node that never ran, and errored out with “that node hasn’t been executed.”

In short, at a node where two paths meet, it was reading by name from a node that exists on only one of the paths.

The fix: read the value from the previous node

Both paths were already passing the data in the same shape (post text = message, article URL = link) right before the Facebook posting node.

So I stopped specifying a node by name and changed it to read the value that came from the previous node.

{{ $json.message }}
{{ $json.link }}

That way, it works no matter which path the data comes from.

While I was at it, I changed the English screens to Japanese

At the same time, I fixed a few other things that had been bugging me:

  • The screen after pressing “Post” or “Don’t post”: one line of English → a Japanese page saying “✅ Received” (I wrote the page content in the Wait node’s “Response Data”)
  • The edit form’s description: it still said “copy … from the email and paste it” (even though the values now come pre-filled, the description was out of date) → changed to “It’s already filled in. Just fix what you want to change, then submit”
  • The text after submitting the form: “Your response has been recorded” → “Sent. It will be posted to Facebook in a few seconds”

Had the “edit” path ever worked before?

I was curious, so I had Claude check all the remaining execution logs (from 10/22 on).

In that period there were five approvals, and four were “Post as is.” All of them were posted properly. The only one sent from the edit form was on 11/4, when I took the screenshots. For anything earlier, there were no logs left, so I couldn’t tell.

Well, as long as it works from now on, I guess that’s fine.

Checking that it was fixed

The morning after the fix, at 7:30 a.m., my Xiaomi 17T Pro review went live.

The approval email arrived at 7:31, so this time I chose “Edit, then post” on my PC → opened the form and submitted it.

The edit form after the fix, being submitted with the article ID, article URL and post text filled in

When I submitted it, the text I had changed to Japanese the day before,

The screen after submitting, after the fix: “Sent. It will be posted to Facebook in a few seconds.” shown in Japanese

“Sent. It will be posted to Facebook in a few seconds. You can close this page.” showed up just as I’d written it.

When Claude checked n8n’s execution log, all three steps succeeded: “Facebook post edit form” → “Format edited post data” → “Post to Facebook.” Facebook returned a post ID too, so the step that had stopped on 11/4 went through this time.

The orange path now runs all the way from the envelope, through a document, to the speech bubble (flat illustration)

Summary: the path you use least is the one you won’t notice is broken

  • In an n8n approval flow, the Wait node’s “On Webhook Call” lets a button in an email resume the workflow
  • With three choices (Post / Edit, then post / Don’t post), you can properly choose “Don’t post” too
  • Pending approvals pile up if you leave them, so give the Wait node a time limit (7 days)
  • To pre-fill a form: production URL, percent-encoding and Field Name
  • At a node where two paths meet, read the previous value ($json) instead of a node name

The button I use most is probably “Post as is.” If the text looks good, I post it as is, and only edit when I want to change something.

That’s exactly why I never noticed the rarely used “edit” path was broken. Whenever you rebuild something, you have to test the path you use least, too. o(`ω´ )o

Oh, by the way, the security holes I found from having n8n exposed to the outside (like the whole of n8n being visible from outside) are a long story, so I’m writing about them in a separate post (I’ll add a link here once it’s published).

NO IMAGE

References

☕ Enjoyed this post?

I'm a Japanese blogger who spent 8 years relearning English from scratch.
If this post helped you, a coffee would mean a lot — thank you for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *