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": "Sync User Data",
"nodes": [
{
"parameters": {
"path": "sync-user",
"httpMethod": "POST",
"responseMode": "responseNode",
"options": {}
},
"id": "webhook-sync-user",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"url": "={{ $json.body.protocol || 'http' }}://{{ $json.body.serverIP }}:{{ $json.body.serverPort }}/{{ $json.body.randompath || 'panel' }}/panel/api/inbounds/getClientTraffics",
"authentication": "none",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Cookie",
"value": "={{ $json.body.sessionCookie }}"
}
]
},
"options": {
"response": {
"response": {
"responseFormat": "json",
"fullResponse": false
}
}
}
},
"id": "get-client-data",
"name": "Get Client Data from 3x-ui",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
450,
300
]
},
{
"parameters": {
"jsCode": "// \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 webhook \u0438 3x-ui\nconst webhookData = $input.item.json.body;\nconst xuiData = $('Get Client Data from 3x-ui').item.json;\n\n// \u041d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0430 \u043f\u043e email \u0438\u043b\u0438 UUID\nlet clientData = null;\nif (xuiData && Array.isArray(xuiData)) {\n clientData = xuiData.find(c => \n c.email === webhookData.email || \n c.id === webhookData.uuid\n );\n} else if (xuiData && xuiData.id) {\n clientData = xuiData;\n}\n\n// \u0424\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\nconst userData = {\n id: webhookData.userId,\n email: webhookData.email || clientData?.email || '',\n uuid: webhookData.uuid || clientData?.id || '',\n name: clientData?.email?.split('@')[0]?.replace(/_/g, ' ') || webhookData.email?.split('@')[0] || 'User',\n vpnUuid: clientData?.id || webhookData.uuid || '',\n plan: clientData?.plan || 'free',\n expiresAt: clientData?.expiryTime > 0 ? new Date(clientData.expiryTime).toISOString() : null,\n devices: clientData?.limitIp || 1,\n status: clientData?.enable !== false ? 'active' : 'inactive',\n // \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0438\u0437 3x-ui\n totalGB: clientData?.totalGB || 0,\n up: clientData?.up || 0,\n down: clientData?.down || 0,\n};\n\nreturn {\n json: {\n success: true,\n user: userData\n }\n};"
},
"id": "format-user-data",
"name": "Format User Data",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
650,
300
]
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ $json }}",
"options": {}
},
"id": "respond",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1,
"position": [
850,
300
]
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Get Client Data from 3x-ui",
"type": "main",
"index": 0
}
]
]
},
"Get Client Data from 3x-ui": {
"main": [
[
{
"node": "Format User Data",
"type": "main",
"index": 0
}
]
]
},
"Format User Data": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1"
},
"staticData": null,
"tags": [],
"triggerCount": 0,
"updatedAt": "2024-01-01T00:00:00.000Z",
"versionId": "1"
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Sync User Data. Uses httpRequest. Webhook trigger; 4 nodes.
Source: https://github.com/vlad4endev/VPN/blob/484e0b6a95ad6bbcd1e92ff8d211a17d6f69d1dd/n8n-workflows/sync-user.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.
This n8n template provides enterprise-level version control for your workflows using GitHub integration. Stop losing hours to broken workflows and manual exports – get proper commit history, visual di
This flow creates dummy files for every item added in your *Arrs (Radarr/Sonarr) with the tag .
This workflow acts as a central API gateway for all technical indicator agents in the Binance Spot Market Quant AI system. It listens for incoming webhook requests and dynamically routes them to the c
Sign PDF documents with legally-compliant digital signatures using X.509 certificates. Supports multiple PAdES signature levels (B, T, LT, LTA) with optional visible stamps.
📡 This workflow serves as the central Alpha Vantage API fetcher for Tesla trading indicators, delivering cleaned 20-point JSON outputs for three timeframes: , , and . It is required by the following a