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": "TG104",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-940,
260
],
"id": "88ed0666-565d-4fba-9ae4-d3038e9ec260",
"name": "When clicking \u2018Test workflow\u2019"
},
{
"parameters": {
"mode": "raw",
"jsonOutput": "{\n \"baseURL\": \"http://oloogyojxglp.ap-northeast-1.clawcloudrun.com\",\n \"\u4e82\u6578\": true,\n \"\u4e0b\u6ce8\u5340\u7d50\u679c\": [1,2,3],\n \"\u4e00\u822c\u7d50\u679c(0:\u7121,1:\u91d1\u7403)\": [0,0,0],\n \"EX\u7d50\u679c(0:\u7121,2:\u96fb\u7403)\": [0,0,0],\n \"\u8d0f\u5206\": 0,\n \"JP\u8d0f\u5206\": 0,\n \"Ex\u4e0b\u6ce8\": 0,\n \"\u5e78\u904b\u8f2a\u76e4\u985e\u5225 (0:\u7121,1:\u4e00\u822c\u8f49\u8f2a,2:EX\u8d85\u8d85\u8d85\u5927\u8f49\u8f2a)\": 0,\n \"\u5e78\u904b\u8f49\u8f2a\u7d22\u5f15 (0:\u7121,12:MAX)\": 0,\n \"\u5e78\u904b\u8f49\u8f2a\u500d\u7387\": 0\n}\n",
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-600,
260
],
"id": "fd7a7b86-8580-424c-b032-5542e1c4ec1b",
"name": "\u8cc7\u6599\u5b9a\u7fa9"
},
{
"parameters": {
"amount": 1
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-300,
460
],
"id": "96b7841a-c9c1-44e2-8719-f32c3fecfe30",
"name": "Wait"
},
{
"parameters": {
"amount": 0
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
320,
860
],
"id": "c347059e-642b-4b24-8f4b-0083715968d2",
"name": "Wait1"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "8f6c4669-eeed-458d-a847-d5b4a3d0b02f",
"leftValue": "1",
"rightValue": "1",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
-800,
460
],
"id": "bbbca984-615f-4026-ae3f-d8a6e94df3a6",
"name": "WhileLoop"
},
{
"parameters": {
"content": "## \u72c0\u614b\u6a5f\u7bc0\u9ede",
"height": 260,
"width": 260,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-780,
-160
],
"id": "0236f739-5b0c-46c8-a5f1-e5996b442211",
"name": "Sticky Note",
"disabled": true
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 1\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-700,
-80
],
"id": "d389627c-87c0-4461-a7a8-e0844f4963c6",
"name": "NODE_GAMESTATUS"
},
{
"parameters": {
"content": "## \u72c0\u614b\u6a5f\u7bc0\u9ede",
"height": 260,
"width": 260,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-440,
-160
],
"id": "6f035fd7-335b-4552-8894-22b559ccb157",
"name": "Sticky Note1",
"disabled": true
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 1\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-360,
-80
],
"id": "21b12588-7667-48ac-abad-3448b8281c85",
"name": "NODE_GAMESTATUS1"
},
{
"parameters": {},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
180,
200
],
"id": "ea089cbe-2b42-4259-bb06-f6404edd1016",
"name": "Wait2"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 2,\n \"SvrTime\": 0,\n \"NextTime\": 5\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
40,
200
],
"id": "374d8cd4-a75e-4979-bd1c-f125d913b06e",
"name": "GAMESTATUS(2)"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 1\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-460,
460
],
"id": "84d4ceac-da28-4d96-b673-58d5146df92c",
"name": "GAMESTATUS(1)"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 3\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
40,
420
],
"id": "645c7869-53d6-495a-926b-1cd9c56029e8",
"name": "GAMESTATUS(3)"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 4\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
180,
420
],
"id": "63cfdba9-dc31-4390-8206-f27a19c7f567",
"name": "GAMESTATUS(4)"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 5\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
180,
640
],
"id": "e5e6914b-0bc1-487c-87a5-7a142f9d4aca",
"name": "GAMESTATUS(5)"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"Cmd\": \"C_GS_PPF_RECKON_RESULT_CMD\",\n \"TotalBet\": 1,\n \"TotalWin\": {{ $('RES').item.json['\u8d0f\u5206'] }},\n \"JpWin\": {{ $('RES').item.json['JP\u8d0f\u5206'] }},\n \"Credit\": 100000,\n \"BetType\": [{{ $('RES').item.json[\"\u4e0b\u6ce8\u5340\u7d50\u679c\"] }}],\n \"Bonus\": [{{ $('RES').item.json['\u4e00\u822c\u7d50\u679c(0:\u7121,1:\u91d1\u7403)'] }}],\n \"ExBonus\": [{{ $('RES').item.json['EX\u7d50\u679c(0:\u7121,2:\u96fb\u7403)'] }}]\n} ",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
320,
640
],
"id": "570e2e40-3505-4937-9f0c-9c72ebc95691",
"name": "\u6d3e\u5f69\u7d50\u679c"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"Cmd\": \"GS_C_PPF_RES_CMD\",\n \"BetType\": [{{ $('RES').item.json[\"\u4e0b\u6ce8\u5340\u7d50\u679c\"] }}],\n \"Bonus\": [{{ $('RES').item.json['\u4e00\u822c\u7d50\u679c(0:\u7121,1:\u91d1\u7403)'] }}],\n \"ExBonus\": [{{ $('RES').item.json['EX\u7d50\u679c(0:\u7121,2:\u96fb\u7403)'] }}],\n \"LuckyWheelType\": {{ $('RES').item.json['\u5e78\u904b\u8f2a\u76e4\u985e\u5225 (0:\u7121,1:\u4e00\u822c\u8f49\u8f2a,2:EX\u8d85\u8d85\u8d85\u5927\u8f49\u8f2a)'] }},\n \"LuckyWheelIdx\": {{ $('RES').item.json['\u5e78\u904b\u8f49\u8f2a\u7d22\u5f15 (0:\u7121,12:MAX)'] }},\n \"LuckyWheelOdds\": {{ $('RES').item.json['\u5e78\u904b\u8f49\u8f2a\u500d\u7387'] }}\n} ",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
320,
420
],
"id": "27707fdf-b4ee-4687-8912-f74b02346dfe",
"name": "\u904a\u6232\u7d50\u679c"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 6\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
180,
860
],
"id": "43768758-4527-42cf-9be7-a7da01462886",
"name": "GAMESTATUS(6)"
},
{
"parameters": {
"amount": 3
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
320,
1100
],
"id": "65206858-fac8-4a3b-a87f-f0d41dce8d50",
"name": "Wait3"
},
{
"parameters": {
"method": "POST",
"url": "={{ $('\u8cc7\u6599\u5b9a\u7fa9').item.json.baseURL }}/api/",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"Cmd\": \"GS_C_PPF_GAMESTATUS_CMD\",\n \"Status\": 7\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
180,
1100
],
"id": "42cc22d6-6e6d-4b36-896e-5a3d27aac5ce",
"name": "GAMESTATUS(7)"
},
{
"parameters": {
"amount": 3
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
480,
640
],
"id": "7a95260a-5e6a-4869-8e23-58e06a0cf5d1",
"name": "Wait4"
},
{
"parameters": {
"amount": 3
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
480,
420
],
"id": "344d7bf4-f6e9-4951-8fbd-9b63002ba2a8",
"name": "Wait5"
},
{
"parameters": {
"jsCode": "const \u4e82\u6578 = $('\u8cc7\u6599\u5b9a\u7fa9').item.json['\u4e82\u6578']\nif (!\u4e82\u6578) return $('\u8cc7\u6599\u5b9a\u7fa9').item.json \n// \u7403\u7d50\u679c\u7684\u4e82\u6578\nconst betResults = Array.from({ length: 3 }, () => Math.floor(Math.random() * 6) + 1);\n$('\u8cc7\u6599\u5b9a\u7fa9').item.json['\u4e0b\u6ce8\u5340\u7d50\u679c'] = betResults\n// 20%\u6a5f\u7387\u91d1\u7403\nconst isGoldenBall = Math.random() < 0.2 ? 1 : 0;\n$('\u8cc7\u6599\u5b9a\u7fa9').item.json['\u4e00\u822c\u7d50\u679c(0:\u7121,1:\u91d1\u7403)'][2] = isGoldenBall\n// 50%\u96fb\u7403(2) 50%\u96fb\u7403(3)\nconst exBallCount = Math.random() < 0.5 ? 2 : 3;\nif ( exBallCount === 2 )\n $('\u8cc7\u6599\u5b9a\u7fa9').item.json['EX\u7d50\u679c(0:\u7121,2:\u96fb\u7403)'] = [0,2,2]\nelse \n $('\u8cc7\u6599\u5b9a\u7fa9').item.json['EX\u7d50\u679c(0:\u7121,2:\u96fb\u7403)'] = [2,2,2]\nreturn $('\u8cc7\u6599\u5b9a\u7fa9').item.json"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-460,
260
],
"id": "0c591084-bf29-4738-adee-4785823f1d0d",
"name": "RND"
},
{
"parameters": {
"jsCode": "return $('RND').item.json"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-320,
260
],
"id": "e55a0a2b-13a5-42df-9986-6ba03f0f3a73",
"name": "RES"
}
],
"connections": {
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "\u8cc7\u6599\u5b9a\u7fa9",
"type": "main",
"index": 0
}
]
]
},
"\u8cc7\u6599\u5b9a\u7fa9": {
"main": [
[
{
"node": "RND",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "GAMESTATUS(2)",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "GAMESTATUS(7)",
"type": "main",
"index": 0
}
]
]
},
"WhileLoop": {
"main": [
[
{
"node": "\u8cc7\u6599\u5b9a\u7fa9",
"type": "main",
"index": 0
}
]
]
},
"Wait2": {
"main": [
[
{
"node": "GAMESTATUS(3)",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(2)": {
"main": [
[
{
"node": "Wait2",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(1)": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(3)": {
"main": [
[
{
"node": "GAMESTATUS(4)",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(4)": {
"main": [
[
{
"node": "\u904a\u6232\u7d50\u679c",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(5)": {
"main": [
[
{
"node": "\u6d3e\u5f69\u7d50\u679c",
"type": "main",
"index": 0
}
]
]
},
"\u6d3e\u5f69\u7d50\u679c": {
"main": [
[
{
"node": "Wait4",
"type": "main",
"index": 0
}
]
]
},
"\u904a\u6232\u7d50\u679c": {
"main": [
[
{
"node": "Wait5",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(6)": {
"main": [
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait3": {
"main": [
[
{
"node": "WhileLoop",
"type": "main",
"index": 0
}
]
]
},
"GAMESTATUS(7)": {
"main": [
[
{
"node": "Wait3",
"type": "main",
"index": 0
}
]
]
},
"Wait4": {
"main": [
[
{
"node": "GAMESTATUS(6)",
"type": "main",
"index": 0
}
]
]
},
"Wait5": {
"main": [
[
{
"node": "GAMESTATUS(5)",
"type": "main",
"index": 0
}
]
]
},
"RND": {
"main": [
[
{
"node": "RES",
"type": "main",
"index": 0
}
]
]
},
"RES": {
"main": [
[
{
"node": "GAMESTATUS(1)",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "d3b85517-64b6-450f-9ed0-bdd3a5c1691f",
"id": "nLp6zOZUjDoKR4Nh",
"tags": []
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
TG104. Uses httpRequest. Event-driven trigger; 24 nodes.
Source: https://github.com/Xhinmin/FakeServer-Websocket-Proto-Golang/blob/d447fd0f3cb53af2b9b4ba6f09bf3913b2556694/n8n/workflow/TG104.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 workflow allows you to import any workflow from a file or another n8n instance and map the credentials easily. A multi-form setup guides you through the entire process At the beginning you have t
[n8n] Advanced URL Parsing and Shortening Workflow - Switchy.io Integration. Uses splitInBatches, stickyNote, httpRequest, html. Event-driven trigger; 56 nodes.
[](https://youtu.be/c7yCZhmMjtI)
This automation organizes your n8n workflows files into categorizes (Active, Template, Done, Archived) and uploads them directly to a categorized Google Drive folders. It is designed to help users man
Create Animated Stories using GPT-4o-mini, Midjourney, Kling and Creatomate API. Uses httpRequest. Event-driven trigger; 51 nodes.