Templates / Get long-lived Facebook Page access tokens and subscribe Messenger webhook fields via Graph API

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

Ready for 3.0

by Nguyễn Thiệu Toàn (Jay Nguyen) ✓ · 396 views · created 2026-03-13 · Support Chatbot

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 11 nodes and runs manually, when you click “Execute workflow”. It uses only n8n's built-in nodes. It also calls graph.facebook.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Needed Value (Edit Fields (Set)): sets 4 fields: app_id, app_secret, short_user_access_token…
  2. Get long-lived user access token (HTTP Request): calls graph.facebook.com
  3. Get app scoped user id (HTTP Request): calls an HTTP API
  4. Get long-lived page access token (HTTP Request): calls an HTTP API
  5. Split Out: splits a list into separate items
  6. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  7. GET Current Fields (HTTP Request): calls an HTTP API
  8. Merge Fields (Code): runs custom JavaScript code
  9. POST Merged Fields (HTTP Request): calls an HTTP API (POST)
  10. Wait: waits 1 seconds

HTTP calls to: graph.facebook.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (7)

From the author

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…

Excerpt from Nguyễn Thiệu Toàn (Jay Nguyen)'s description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.