Facebook Graph API v20.0 page posts and comments collector
This deterministic n8n workflow reads a Facebook Page ID and post count, then pulls recent feed posts through Facebook Graph API v20.0. A second Graph API step retrieves reverse-chronological comments per post behind one built-in error output flag. Null arrays drop out and surviving comments merge back with parent posts.
- Catalogue ID
- #1058
- Functional nodes
- 10
- Connections
- 10
- Trigger
- manualTrigger
- AI layer
- Deterministic
Business problem solved
Reviewing customer questions and feedback across dozens of Facebook Page posts by hand inside Meta Business Suite slows community reporting. API calls on restricted or comment-disabled posts can also crash unguarded batch runs.
Trigger
A manual trigger sets Page ID and post limit to collect posts and comments on demand.
Connected systems
- Facebook Graph API v20.0
- Split Out and Filter
- Code order alignment
- Self-hosted n8n
Every workflow is deployed on your own server with documentation, a run log and an error queue.
Workflow architecture
- 1. When clicking Test workflow (Trigger) (connects to Set PageID & Number of…)
- 2. Split Out Comments (Service and data) (connects to Select Result Field)
- 3. Filter Out Null Comments (Logic and routing) (connects to Split Out Comments)
- 4. Select Result Field (Service and data)
- 5. Split Out Posts (Service and data) (connects to Facebook : Get Each Post…, Reverse Item to Match…)
- 6. Facebook Graph API : Get… (Service and data) (connects to Split Out Posts)
- 7. Facebook : Get Each Post… (Service and data) (connects to Merge Post & Comments)
- 8. Merge Post & Comments (Logic and routing) (connects to Filter Out Null Comments)
- 9. Reverse Item to Match… (Logic and routing) (connects to Merge Post & Comments)
- 10. Set PageID & Number of… (Service and data) (connects to Facebook Graph API : Get…)
- Trigger
- AI layer
- Logic and routing
- Service and data
Node positions and directed links are generated from the verified catalogue record.
Workflow steps
- 01
Page post feed fetch
Set defines Page ID and post count before Facebook Graph API pulls recent feed items and splits out posts.
- 02
Error-guarded comment retrieval
A second Graph API node retrieves comments in reverse chronological order with built-in continueErrorOutput protection.
- 03
Empty-comment filter and split
Posts lacking comments drop via Filter Out Null Comments before Split Out expands each individual comment.
- 04
Post and comment merge
Code reverses item order for positional alignment and Merge pairs each comment cleanly with its parent post.
Error queue and human approval
Built-in state in the catalogue workflow
The verified catalogue workflow includes one built-in node error flag using continueErrorOutput on the Facebook : Get Each Post Comments node.
Production layer added by ALTAI
During live deployment, ALTAI routes the error output branch to an alert queue, schedules incremental polling, deduplicates comment IDs and writes results to your CRM or sheet.
Facebook page comments collector Frequently asked questions
If a single post lacks permission or blocks comments, continueErrorOutput isolates that item instead of halting the remaining posts.
Production deployments connect Google Sheets, Airtable or PostgreSQL straight after the Select Result Field node.
Yes. Changing Number_of_Latest_Posts in the opening Set node controls batch depth without altering workflow logic.
Related n8n workflows
X and webhook sentiment to Strapi
Polls X every 30 minutes and ingests webhook forms, scores sentiment via Google Cloud Natural Language and saves positive items to Strapi.
X search to Airtable log
Searches X posts for a tracked term, compares Tweet IDs against existing Airtable records and appends only new entries.
X mention alerts to RocketChat
Polls X mentions via cron, deduplicates seen Tweet IDs using workflow static memory and posts unseen mention links to RocketChat.

We write the proposal after we have found the problem together
In a thirty-minute call we listen to how you work and talk through where time and customers are slipping away. If you do not need a digital fix, we will tell you that too.
30 minutes · no preparation needed
The call and the week of discovery are both free.Read the terms