đź’¬ Get long-lived Facebook Page access tokens and subscribe Messenger webhook fields via Graph API

⚡ 397 views · 💬 Support Chatbots

💡 Pro Tip — If you’ve run into Facebook’s Graph API permission restrictions, ScraperNode is a community node that scrapes pages, groups, posts, and comments directly — no app review needed.

View All Scrapers

Description

Get Long-Lived Facebook Page Access Token and Subscribe Messenger Webhook Fields

This n8n template automates two critical one-time setup steps required before any Facebook automation can go live: it exchanges a short-lived User Access Token for a long-lived one (~60 days), retrieves Page Access Tokens for all connected Facebook Pages, and subscribes each Page to the webhook fields your app needs — all in a single manual run.

If you’re building a Messenger chatbot or automating comment replies on Facebook Pages, run this utility workflow once as part of your initial setup.

How it works

How to use

  1. Get credentials: Retrieve your App ID and App Secret from Meta for Developers.
  2. Generate a short-lived token: Use Graph API Explorer with pages_manage_metadata and pages_show_list permissions.
  3. Fill in Needed Value: Enter all four config fields. Set field_to_add based on your use case (e.g., messages,messaging_postbacks for Messenger chatbots, or add feed for comment automation).
  4. Run manually: Click “Execute Workflow”. The output of Get long-lived page access token contains the Page Access Token — copy it into your chatbot workflows.

Requirements

Customizing this workflow


Related workflows by the same author:


About the Author

Created by: Nguyễn Thiệu Toàn (Jay Nguyen) - n8n Verified Creator Email: me@nguyenthieutoan.com Website: nguyenthieutoan.com Company: GenStaff (CEO/Founder) (genstaff.net) Socials (Facebook / X / LinkedIn): @nguyenthieutoan More templates: n8n.io/creators/nguyenthieutoan

đź”— Nodes Used

HTTP Request

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup