The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"name": "ig-token-refresh",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression",
"expression": "0 3 * * *"
}
]
}
},
"id": "trigger",
"name": "Daily @ 03:00 UTC",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
200,
320
]
},
{
"parameters": {
"method": "GET",
"url": "https://graph.instagram.com/refresh_access_token",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "httpHeaderAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "grant_type",
"value": "ig_refresh_token"
}
]
},
"options": {}
},
"id": "refresh",
"name": "Refresh IG token",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
460,
320
],
"credentials": {
"httpHeaderAuth": {
"name": "<your credential>"
}
}
},
{
"parameters": {
"jsCode": "// Log the new token + expiry. n8n credentials are NOT updatable via REST API\n// on most self-hosted instances without admin PAT, so this just emits a log.\n// You can wire a Slack / Email node below to notify you when the expiry is <14d.\n\nconst { access_token, token_type, expires_in } = $json;\nconst expiresInDays = Math.round((expires_in || 0) / 86400);\nreturn {\n json: {\n notice: 'New long-lived IG token issued. Paste it back into the `IG Login - Leo Luis` credential manually.',\n expires_in_days: expiresInDays,\n new_token_preview: (access_token || '').slice(0, 12) + '\u2026',\n },\n};\n"
},
"id": "log",
"name": "Log new token",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
700,
320
]
}
],
"connections": {
"Daily @ 03:00 UTC": {
"main": [
[
{
"node": "Refresh IG token",
"type": "main",
"index": 0
}
]
]
},
"Refresh IG token": {
"main": [
[
{
"node": "Log new token",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"active": false,
"versionId": "refresh-v1",
"triggerCount": 0
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpHeaderAuth
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
ig-token-refresh. Uses httpRequest. Scheduled trigger; 3 nodes.
Source: https://github.com/leoaoluis/heph-dashboard/blob/8f673db7675c0320b893df1b2410673e5ab42f99/n8n-workflows/ig-token-refresh.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o
This workflow is an improvement of this workflow by Greg Brzezinka.
N8N-Workflow-Github-Manager. Uses github, httpRequest, n8n. Scheduled trigger; 38 nodes.
This workflow uses KlickTipp community nodes, available for self-hosted n8n instances only.
This workflow acts as an automated engagement bot. It sends a Direct Message (DM) with a link or resource to any follower who replies to your post with a specific target keyword.