Templates / Automated meta token renewal system with Graph API and data storage

Automated meta token renewal system with Graph API and data storage

Ready for 3.0

by Geoffroy ✓ · 457 views · created 2025-10-14 · DevOps

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 9 nodes and runs on a schedule (every 10 days at 21:00) (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls graph.facebook.com over HTTP.

How it runs

Trigger: On a schedule (every 10 days at 21:00) (plus 1 other trigger).

  1. Get token expiration date (Data table): get
  2. Needs renewal? (If): checks a condition and branches into true / false
  3. Carry ID & Token (Edit Fields (Set)): sets 2 fields: record_id, current_token
  4. User Exchange (HTTP Request): calls graph.facebook.com (POST)
  5. Compute new expiry (Edit Fields (Set)): sets 3 fields: token, expired_at, record_id
  6. Update Record (Data table): update

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

Meta long-lived user tokens typically expire after ~60 days. If a token expires, any workflows that rely on it start failing. Manual renewal is easy to forget and time consuming. This template monitors the token you store in an n8n Data Table and refreshes it…

Excerpt from Geoffroy'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.