See llms.txt for all machine-readable content.

Back to Templates

Track Facebook page engagement with Facebook Graph API and Google Sheets

Created by

Created by: Dr. Firas || drfiras
Dr. Firas

Last update

Last update 6 hours ago

Categories

Share


Quick overview

This workflow runs manually or daily to pull your Facebook Page’s most recent posts, calculate per-post likes, comments, and shares via the Facebook Graph API, and append or update each post’s engagement metrics in a Google Sheets spreadsheet.

How it works

  1. Runs manually or on an optional daily schedule.
  2. Reads configuration values (Graph API version, number of posts to check, and delay between posts) and fetches Facebook Page details.
  3. Retrieves the Page feed and splits the response into individual posts.
  4. For each post, fetches comment totals, reaction totals, and share counts from the Facebook Graph API.
  5. Combines the three engagement metrics into a single record per post (including the post ID and message).
  6. Appends or updates the corresponding row in Google Sheets and waits briefly before processing the next post to reduce rate-limit risk.

Setup

  1. Add a Facebook Graph API credential in n8n with a Page access token that can read the Page feed and engagement.
  2. Add a Google Sheets OAuth2 credential.
  3. In the Google Sheets step, select the target spreadsheet and sheet tab, and ensure it has columns for post ID, post text, likes, comments, and shares.
  4. Update the Configuration values (max posts, Graph API version, and pause duration) to match your needs and API limits.
  5. If using scheduled tracking, enable the schedule trigger and set the run time for your timezone.

Additional info

Track Facebook page engagement to Google Sheets

📥 Open full documentation on Notion

Need help customizing?

Contact me for consulting and support : Linkedin

MY NEW YOUTUBE CHANNEL

👉 Subscribe to my new YouTube channel. Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.

The AI Doctor