Templates / Automated Zalo OA token management with OAuth and webhook integration

Automated Zalo OA token management with OAuth and webhook integration

Ready for 3.0

by Le Nguyen ✓ · 1,132 views · created 2025-09-17 · Engineering, 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-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 9 nodes and runs when an HTTP POST request hits its webhook URL (plus 2 other triggers). It uses only n8n's built-in nodes. It also calls oauth.zaloapp.com over HTTP.

How it runs

Trigger: When an HTTP POST request hits its webhook URL (plus 2 other triggers).

  1. Clean Zalo Static Data (Code): runs custom JavaScript code
  2. Set Refresh Token and App ID (Edit Fields (Set)): sets 3 fields: refresh_token, app_id, secret_key
  3. Load Access Token (Code): runs custom JavaScript code
  4. Load to Static Data (Code): runs custom JavaScript code
  5. Refresh Token (Zalo v4) (HTTP Request): calls oauth.zaloapp.com (POST)
  6. Store to SD & Pass token (Code): runs custom JavaScript code

HTTP calls to: oauth.zaloapp.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.

Check at runtime on n8n 3.0
  • Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Informational: a static scan can't see the data, so test these on your own instance. Status above is unchanged.

Nodes used (5)

From the author

Description (How it works) This workflow keeps your Zalo Official Account access token valid and easy to reuse across other flows—no external server required. High-level steps 1. Scheduled refresh runs on an interval to renew the access token before it…

Excerpt from Le 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.