Marketing

Obtain long-lived Facebook access tokens for accounts and pages

5 nodes 160 84 Automatic trigger
Download

Workflow Description

Automate the retrieval of long-lived Facebook access tokens for user accounts and pages through the Facebook Graph API, storing token data and expiration details for seamless integration management and account security.

How it works

  1. 1.Initiate the workflow manually when a new access token is required
  2. 2.Send an HTTP request to the Facebook API endpoint to exchange short-lived tokens for long-lived ones
  3. 3.Store the returned token and expiration date in workflow variables for reference
  4. 4.Document the token details in a persistent note for audit and future token refresh cycles

Use cases

  • Secure and standardize access tokens used across multiple automations and integrations
  • Manage token lifecycle and proactively refresh tokens before expiration
  • Maintain a single stable token credential for use across different workflows and applications

Requirements

  • Active Facebook account with page or account administration permissions
  • Facebook App ID and App Secret credentials from the Developer Console
  • A short-lived access token obtained from Facebook's token generation tools

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger HTTP Request Note Set

Details

Trigger Automatic trigger
Nodes 5
Apps 4
Views 160
Downloads 84

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (5)

When clicking ‘Test workflow’

Manual Trigger

#1

Get Long Lived FB User Token

HTTP Request

#2

Get Long Lived FB Page Token

HTTP Request

#3

Sticky Note

Sticky Note

#4

Set Parameter

Set

#5