@blucca/n8n-check 0.0.0-stage → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +10 -0
- package/LICENSE +21 -0
- package/README.md +323 -2
- package/bin/n8n-check.mjs +62 -0
- package/examples/agregado-enrichment/README.md +68 -0
- package/examples/agregado-enrichment/n8n-synthetic +11 -0
- package/examples/agregado-enrichment/observed-results.json +806 -0
- package/examples/agregado-enrichment/prepare.mjs +39 -0
- package/examples/identity-projection/README.md +39 -0
- package/examples/identity-projection/case.json +33 -0
- package/examples/identity-projection/observed-results.json +117 -0
- package/examples/identity-projection/workflow.json +71 -0
- package/examples/identity-projection/wrong-id.json +71 -0
- package/examples/morsof-invoice-history/README.md +77 -0
- package/examples/morsof-invoice-history/UPSTREAM-LICENSE +21 -0
- package/examples/morsof-invoice-history/n8n-datatable.cjs +28 -0
- package/examples/morsof-invoice-history/observed-results.json +113 -0
- package/examples/morsof-invoice-history/prepare.mjs +57 -0
- package/examples/morsof-invoice-history/replay.mjs +35 -0
- package/examples/morsof-invoice-history/run.sh +19 -0
- package/examples/object-body/broken.json +74 -0
- package/examples/object-body/case.json +81 -0
- package/examples/object-body/fixed.json +74 -0
- package/examples/object-body/observed-results.json +449 -0
- package/examples/object-body/retry-case.json +112 -0
- package/examples/object-body/retry.json +77 -0
- package/examples/propfind-body/README.md +75 -0
- package/examples/propfind-body/case.json +51 -0
- package/examples/propfind-body/no-body-control.json +96 -0
- package/examples/propfind-body/observed-results.json +307 -0
- package/examples/propfind-body/workflow.json +96 -0
- package/examples/raw-response/README.md +71 -0
- package/examples/raw-response/file-case.json +54 -0
- package/examples/raw-response/json-body.json +58 -0
- package/examples/raw-response/json-case.json +52 -0
- package/examples/raw-response/observed-results.json +383 -0
- package/examples/raw-response/raw-file.json +88 -0
- package/examples/raw-response/raw-json.json +58 -0
- package/examples/raw-response/raw-text.json +58 -0
- package/examples/raw-response/text-case.json +50 -0
- package/examples/retry-isolation/README.md +71 -0
- package/examples/retry-isolation/direct-case.json +112 -0
- package/examples/retry-isolation/direct.json +101 -0
- package/examples/retry-isolation/editor-template.json +168 -0
- package/examples/retry-isolation/http-batching-case.json +112 -0
- package/examples/retry-isolation/http-batching.json +107 -0
- package/examples/retry-isolation/loop-case.json +117 -0
- package/examples/retry-isolation/loop.json +133 -0
- package/examples/retry-isolation/observed-results.json +155 -0
- package/examples/silent-filter/README.md +57 -0
- package/examples/silent-filter/broken.json +96 -0
- package/examples/silent-filter/case.json +120 -0
- package/examples/silent-filter/fixed.json +96 -0
- package/examples/silent-filter/observed-results.json +273 -0
- package/examples/stop-after/README.md +66 -0
- package/examples/stop-after/broken.json +134 -0
- package/examples/stop-after/case.json +34 -0
- package/examples/stop-after/fixed.json +134 -0
- package/examples/stop-after/observed-results.json +162 -0
- package/examples/vapi-tool-contract/README.md +67 -0
- package/examples/vapi-tool-contract/backend-503.case.json +113 -0
- package/examples/vapi-tool-contract/empty-orders.case.json +113 -0
- package/examples/vapi-tool-contract/observed-results.json +234 -0
- package/examples/vapi-tool-contract/success.case.json +118 -0
- package/examples/vapi-tool-contract/workflow.json +143 -0
- package/examples/vapi-tool-contract/wrong-id.json +143 -0
- package/examples/version-matrix/README.md +65 -0
- package/examples/version-matrix/observed-results.json +307 -0
- package/examples/version-matrix/upgrade-check.yml +32 -0
- package/package.json +41 -4
- package/src/action.mjs +108 -0
- package/src/case-draft.mjs +163 -0
- package/src/local-bundle.mjs +154 -0
- package/src/mock.mjs +72 -0
- package/src/report.mjs +73 -0
- package/src/runner.mjs +111 -0
- package/src/version.mjs +3 -0
- package/src/workflow.mjs +140 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "retryOneHttpItem",
|
|
3
|
+
"name": "Retry One HTTP Item at a Time",
|
|
4
|
+
"description": "Process two synthetic HTTP operations sequentially, with a bounded retry for each input item and a combined done output.",
|
|
5
|
+
"active": false,
|
|
6
|
+
"nodes": [
|
|
7
|
+
{
|
|
8
|
+
"id": "start",
|
|
9
|
+
"name": "Start",
|
|
10
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
11
|
+
"typeVersion": 1,
|
|
12
|
+
"position": [
|
|
13
|
+
-400,
|
|
14
|
+
0
|
|
15
|
+
],
|
|
16
|
+
"parameters": {}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "fixture",
|
|
20
|
+
"name": "Fixture",
|
|
21
|
+
"type": "n8n-nodes-base.code",
|
|
22
|
+
"typeVersion": 2,
|
|
23
|
+
"position": [
|
|
24
|
+
-200,
|
|
25
|
+
0
|
|
26
|
+
],
|
|
27
|
+
"parameters": {
|
|
28
|
+
"jsCode": "return [\n {\n \"shortId\": 42,\n \"styling\": {\n \"color\": \"#112233\",\n \"fontSize\": 31\n }\n },\n {\n \"shortId\": 43,\n \"styling\": {\n \"color\": \"#aabbcc\",\n \"fontSize\": 47\n }\n }\n].map(json => ({ json }));"
|
|
29
|
+
},
|
|
30
|
+
"notes": "Two synthetic inputs with distinct IDs and styling. Replace with your source items after validating the test service."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "render",
|
|
34
|
+
"name": "Render",
|
|
35
|
+
"type": "n8n-nodes-base.httpRequest",
|
|
36
|
+
"typeVersion": 4.2,
|
|
37
|
+
"position": [
|
|
38
|
+
220,
|
|
39
|
+
180
|
|
40
|
+
],
|
|
41
|
+
"parameters": {
|
|
42
|
+
"method": "POST",
|
|
43
|
+
"url": "=https://api.example.com/renders/{{ $json.shortId }}",
|
|
44
|
+
"sendBody": true,
|
|
45
|
+
"specifyBody": "json",
|
|
46
|
+
"jsonBody": "={{ { shortId: $json.shortId, renderOptions: $json.styling } }}",
|
|
47
|
+
"options": {
|
|
48
|
+
"timeout": 10000
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"retryOnFail": true,
|
|
52
|
+
"maxTries": 2,
|
|
53
|
+
"waitBetweenTries": 1000,
|
|
54
|
+
"notes": "Replace the api.example.com placeholder with your test endpoint. Each node execution receives one item; two total attempts are allowed."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "done",
|
|
58
|
+
"name": "Done",
|
|
59
|
+
"type": "n8n-nodes-base.noOp",
|
|
60
|
+
"typeVersion": 1,
|
|
61
|
+
"position": [
|
|
62
|
+
220,
|
|
63
|
+
-100
|
|
64
|
+
],
|
|
65
|
+
"parameters": {}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"id": "loop",
|
|
69
|
+
"name": "Loop Over Items",
|
|
70
|
+
"type": "n8n-nodes-base.splitInBatches",
|
|
71
|
+
"typeVersion": 3,
|
|
72
|
+
"position": [
|
|
73
|
+
0,
|
|
74
|
+
0
|
|
75
|
+
],
|
|
76
|
+
"parameters": {
|
|
77
|
+
"batchSize": 1,
|
|
78
|
+
"options": {}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"id": "setup-note",
|
|
83
|
+
"name": "Import and configure",
|
|
84
|
+
"type": "n8n-nodes-base.stickyNote",
|
|
85
|
+
"typeVersion": 1,
|
|
86
|
+
"position": [
|
|
87
|
+
-590,
|
|
88
|
+
-720
|
|
89
|
+
],
|
|
90
|
+
"parameters": {
|
|
91
|
+
"content": "## Retry one HTTP item at a time\n**Loop Over Items → Batch Size = 1** gives each HTTP node execution one input item. The retry budget applies to that item.\n\n### Run in the editor\n1. Import this JSON with **Import from File**.\n2. Open **Render** and replace `https://api.example.com` with your test service base URL, keeping `/renders/{{ $json.shortId }}`. Configure your test service credentials in that node as needed.\n3. Click **Execute workflow**. **Fixture** supplies two synthetic operations, 42 and 43, each with its own nested styling object.\n4. Inspect **Done** for the two completed HTTP response items.\n\nThe loop output goes to Render; Render connects back to Loop Over Items; the done output goes to Done. Keep **Reset** off for this fixed input list.\n\n**Tested:** n8n 2.41.7, HTTP Request v4.2, Loop Over Items v3; 2026-10-06.",
|
|
92
|
+
"width": 715,
|
|
93
|
+
"height": 600
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"id": "checks-note",
|
|
98
|
+
"name": "Expected requests and adaptation",
|
|
99
|
+
"type": "n8n-nodes-base.stickyNote",
|
|
100
|
+
"typeVersion": 1,
|
|
101
|
+
"position": [
|
|
102
|
+
160,
|
|
103
|
+
-720
|
|
104
|
+
],
|
|
105
|
+
"parameters": {
|
|
106
|
+
"content": "## Verify the retry boundary\nFor a reproducible test, configure your test service as follows:\n- `POST /renders/42`: first response **503**, then **200** with `{\"id\":\"render-42\"}`.\n- `POST /renders/43`: always **200** with `{\"id\":\"render-43\"}`.\n\n**Observed:** 42→503, 42→200, 43→200. Done receives `render-42` and `render-43`. Both request attempts for 42 retain its complete JSON body.\n\nRender uses **Max Tries = 2**, **Wait Between Tries = 1000 ms**, and a **10-second timeout**. A second failure stops this workflow. HTTP Request's built-in batching paces items inside a node execution; the outer loop defines this per-item retry boundary.\n\nFor real writes, reuse a stable business operation key across retries and use the destination's durable idempotency contract to recover an accepted write whose response is lost.\n\nOptional [n8n-check fixture and request traces](https://github.com/blucca/n8n-check/tree/v0.1.1/examples/retry-isolation) provide a local mock and JSON/JUnit checks for this pattern. The editor workflow uses standard n8n nodes.",
|
|
107
|
+
"width": 735,
|
|
108
|
+
"height": 600
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
"connections": {
|
|
113
|
+
"Start": {
|
|
114
|
+
"main": [
|
|
115
|
+
[
|
|
116
|
+
{
|
|
117
|
+
"node": "Fixture",
|
|
118
|
+
"type": "main",
|
|
119
|
+
"index": 0
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
"Fixture": {
|
|
125
|
+
"main": [
|
|
126
|
+
[
|
|
127
|
+
{
|
|
128
|
+
"node": "Loop Over Items",
|
|
129
|
+
"type": "main",
|
|
130
|
+
"index": 0
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
]
|
|
134
|
+
},
|
|
135
|
+
"Render": {
|
|
136
|
+
"main": [
|
|
137
|
+
[
|
|
138
|
+
{
|
|
139
|
+
"node": "Loop Over Items",
|
|
140
|
+
"type": "main",
|
|
141
|
+
"index": 0
|
|
142
|
+
}
|
|
143
|
+
]
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"Loop Over Items": {
|
|
147
|
+
"main": [
|
|
148
|
+
[
|
|
149
|
+
{
|
|
150
|
+
"node": "Done",
|
|
151
|
+
"type": "main",
|
|
152
|
+
"index": 0
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
{
|
|
157
|
+
"node": "Render",
|
|
158
|
+
"type": "main",
|
|
159
|
+
"index": 0
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"settings": {
|
|
166
|
+
"executionOrder": "v1"
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"name": "HTTP batching 1 with node retry",
|
|
4
|
+
"input": {
|
|
5
|
+
"node": "Fixture",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"shortId": 42,
|
|
9
|
+
"styling": {
|
|
10
|
+
"color": "#112233",
|
|
11
|
+
"fontSize": 31
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"shortId": 43,
|
|
16
|
+
"styling": {
|
|
17
|
+
"color": "#aabbcc",
|
|
18
|
+
"fontSize": 47
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"mocks": [
|
|
24
|
+
{
|
|
25
|
+
"node": "Render",
|
|
26
|
+
"url": "/renders/{{ $json.shortId }}",
|
|
27
|
+
"routes": [
|
|
28
|
+
{
|
|
29
|
+
"method": "POST",
|
|
30
|
+
"path": "/renders/42",
|
|
31
|
+
"responses": [
|
|
32
|
+
{
|
|
33
|
+
"status": 503,
|
|
34
|
+
"json": {
|
|
35
|
+
"error": "temporary fixture failure"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"status": 200,
|
|
40
|
+
"json": {
|
|
41
|
+
"id": "render-42"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"expect": {
|
|
46
|
+
"count": 2,
|
|
47
|
+
"bodies": [
|
|
48
|
+
{
|
|
49
|
+
"shortId": 42,
|
|
50
|
+
"renderOptions": {
|
|
51
|
+
"color": "#112233",
|
|
52
|
+
"fontSize": 31
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"shortId": 42,
|
|
57
|
+
"renderOptions": {
|
|
58
|
+
"color": "#112233",
|
|
59
|
+
"fontSize": 31
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"method": "POST",
|
|
67
|
+
"path": "/renders/43",
|
|
68
|
+
"responses": [
|
|
69
|
+
{
|
|
70
|
+
"status": 200,
|
|
71
|
+
"json": {
|
|
72
|
+
"id": "render-43"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"expect": {
|
|
77
|
+
"count": 2,
|
|
78
|
+
"bodies": [
|
|
79
|
+
{
|
|
80
|
+
"shortId": 43,
|
|
81
|
+
"renderOptions": {
|
|
82
|
+
"color": "#aabbcc",
|
|
83
|
+
"fontSize": 47
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"shortId": 43,
|
|
88
|
+
"renderOptions": {
|
|
89
|
+
"color": "#aabbcc",
|
|
90
|
+
"fontSize": 47
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"assertions": [
|
|
100
|
+
{
|
|
101
|
+
"node": "Done",
|
|
102
|
+
"equals": [
|
|
103
|
+
{
|
|
104
|
+
"id": "render-42"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "render-43"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "HTTP batching 1 with node retry",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "start",
|
|
6
|
+
"name": "Start",
|
|
7
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
8
|
+
"typeVersion": 1,
|
|
9
|
+
"position": [
|
|
10
|
+
-400,
|
|
11
|
+
0
|
|
12
|
+
],
|
|
13
|
+
"parameters": {}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "fixture",
|
|
17
|
+
"name": "Fixture",
|
|
18
|
+
"type": "n8n-nodes-base.code",
|
|
19
|
+
"typeVersion": 2,
|
|
20
|
+
"position": [
|
|
21
|
+
-200,
|
|
22
|
+
0
|
|
23
|
+
],
|
|
24
|
+
"parameters": {
|
|
25
|
+
"jsCode": "return [\n {\n \"shortId\": 42,\n \"styling\": {\n \"color\": \"#112233\",\n \"fontSize\": 31\n }\n },\n {\n \"shortId\": 43,\n \"styling\": {\n \"color\": \"#aabbcc\",\n \"fontSize\": 47\n }\n }\n].map(json => ({ json }));"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "render",
|
|
30
|
+
"name": "Render",
|
|
31
|
+
"type": "n8n-nodes-base.httpRequest",
|
|
32
|
+
"typeVersion": 4.2,
|
|
33
|
+
"position": [
|
|
34
|
+
0,
|
|
35
|
+
0
|
|
36
|
+
],
|
|
37
|
+
"parameters": {
|
|
38
|
+
"method": "POST",
|
|
39
|
+
"url": "=https://api.example.com/renders/{{ $json.shortId }}",
|
|
40
|
+
"sendBody": true,
|
|
41
|
+
"specifyBody": "json",
|
|
42
|
+
"jsonBody": "={{ { shortId: $json.shortId, renderOptions: $json.styling } }}",
|
|
43
|
+
"options": {
|
|
44
|
+
"timeout": 10000,
|
|
45
|
+
"batching": {
|
|
46
|
+
"batch": {
|
|
47
|
+
"batchSize": 1,
|
|
48
|
+
"batchInterval": 1000
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"retryOnFail": true,
|
|
54
|
+
"maxTries": 2,
|
|
55
|
+
"waitBetweenTries": 1000
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"id": "done",
|
|
59
|
+
"name": "Done",
|
|
60
|
+
"type": "n8n-nodes-base.noOp",
|
|
61
|
+
"typeVersion": 1,
|
|
62
|
+
"position": [
|
|
63
|
+
420,
|
|
64
|
+
0
|
|
65
|
+
],
|
|
66
|
+
"parameters": {}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"connections": {
|
|
70
|
+
"Start": {
|
|
71
|
+
"main": [
|
|
72
|
+
[
|
|
73
|
+
{
|
|
74
|
+
"node": "Fixture",
|
|
75
|
+
"type": "main",
|
|
76
|
+
"index": 0
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
"Fixture": {
|
|
82
|
+
"main": [
|
|
83
|
+
[
|
|
84
|
+
{
|
|
85
|
+
"node": "Render",
|
|
86
|
+
"type": "main",
|
|
87
|
+
"index": 0
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
"Render": {
|
|
93
|
+
"main": [
|
|
94
|
+
[
|
|
95
|
+
{
|
|
96
|
+
"node": "Done",
|
|
97
|
+
"type": "main",
|
|
98
|
+
"index": 0
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"settings": {
|
|
105
|
+
"executionOrder": "v1"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"name": "Loop batch size 1 with HTTP retry",
|
|
4
|
+
"input": {
|
|
5
|
+
"node": "Fixture",
|
|
6
|
+
"items": [
|
|
7
|
+
{
|
|
8
|
+
"shortId": 42,
|
|
9
|
+
"styling": {
|
|
10
|
+
"color": "#112233",
|
|
11
|
+
"fontSize": 31
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"shortId": 43,
|
|
16
|
+
"styling": {
|
|
17
|
+
"color": "#aabbcc",
|
|
18
|
+
"fontSize": 47
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
"mocks": [
|
|
24
|
+
{
|
|
25
|
+
"node": "Render",
|
|
26
|
+
"url": "/renders/{{ $json.shortId }}",
|
|
27
|
+
"routes": [
|
|
28
|
+
{
|
|
29
|
+
"method": "POST",
|
|
30
|
+
"path": "/renders/42",
|
|
31
|
+
"responses": [
|
|
32
|
+
{
|
|
33
|
+
"status": 503,
|
|
34
|
+
"json": {
|
|
35
|
+
"error": "temporary fixture failure"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"status": 200,
|
|
40
|
+
"json": {
|
|
41
|
+
"id": "render-42"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"expect": {
|
|
46
|
+
"count": 2,
|
|
47
|
+
"bodies": [
|
|
48
|
+
{
|
|
49
|
+
"shortId": 42,
|
|
50
|
+
"renderOptions": {
|
|
51
|
+
"color": "#112233",
|
|
52
|
+
"fontSize": 31
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"shortId": 42,
|
|
57
|
+
"renderOptions": {
|
|
58
|
+
"color": "#112233",
|
|
59
|
+
"fontSize": 31
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"method": "POST",
|
|
67
|
+
"path": "/renders/43",
|
|
68
|
+
"responses": [
|
|
69
|
+
{
|
|
70
|
+
"status": 200,
|
|
71
|
+
"json": {
|
|
72
|
+
"id": "render-43"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"expect": {
|
|
77
|
+
"count": 1,
|
|
78
|
+
"bodies": [
|
|
79
|
+
{
|
|
80
|
+
"shortId": 43,
|
|
81
|
+
"renderOptions": {
|
|
82
|
+
"color": "#aabbcc",
|
|
83
|
+
"fontSize": 47
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"assertions": [
|
|
93
|
+
{
|
|
94
|
+
"node": "Done",
|
|
95
|
+
"equals": [
|
|
96
|
+
{
|
|
97
|
+
"id": "render-42"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"id": "render-43"
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"node": "Loop Over Items",
|
|
106
|
+
"output": 0,
|
|
107
|
+
"equals": [
|
|
108
|
+
{
|
|
109
|
+
"id": "render-42"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "render-43"
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Loop batch size 1 with HTTP retry",
|
|
3
|
+
"nodes": [
|
|
4
|
+
{
|
|
5
|
+
"id": "start",
|
|
6
|
+
"name": "Start",
|
|
7
|
+
"type": "n8n-nodes-base.manualTrigger",
|
|
8
|
+
"typeVersion": 1,
|
|
9
|
+
"position": [
|
|
10
|
+
-400,
|
|
11
|
+
0
|
|
12
|
+
],
|
|
13
|
+
"parameters": {}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "fixture",
|
|
17
|
+
"name": "Fixture",
|
|
18
|
+
"type": "n8n-nodes-base.code",
|
|
19
|
+
"typeVersion": 2,
|
|
20
|
+
"position": [
|
|
21
|
+
-200,
|
|
22
|
+
0
|
|
23
|
+
],
|
|
24
|
+
"parameters": {
|
|
25
|
+
"jsCode": "return [\n {\n \"shortId\": 42,\n \"styling\": {\n \"color\": \"#112233\",\n \"fontSize\": 31\n }\n },\n {\n \"shortId\": 43,\n \"styling\": {\n \"color\": \"#aabbcc\",\n \"fontSize\": 47\n }\n }\n].map(json => ({ json }));"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"id": "render",
|
|
30
|
+
"name": "Render",
|
|
31
|
+
"type": "n8n-nodes-base.httpRequest",
|
|
32
|
+
"typeVersion": 4.2,
|
|
33
|
+
"position": [
|
|
34
|
+
220,
|
|
35
|
+
180
|
|
36
|
+
],
|
|
37
|
+
"parameters": {
|
|
38
|
+
"method": "POST",
|
|
39
|
+
"url": "=https://api.example.com/renders/{{ $json.shortId }}",
|
|
40
|
+
"sendBody": true,
|
|
41
|
+
"specifyBody": "json",
|
|
42
|
+
"jsonBody": "={{ { shortId: $json.shortId, renderOptions: $json.styling } }}",
|
|
43
|
+
"options": {
|
|
44
|
+
"timeout": 10000
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"retryOnFail": true,
|
|
48
|
+
"maxTries": 2,
|
|
49
|
+
"waitBetweenTries": 1000
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "done",
|
|
53
|
+
"name": "Done",
|
|
54
|
+
"type": "n8n-nodes-base.noOp",
|
|
55
|
+
"typeVersion": 1,
|
|
56
|
+
"position": [
|
|
57
|
+
220,
|
|
58
|
+
-100
|
|
59
|
+
],
|
|
60
|
+
"parameters": {}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "loop",
|
|
64
|
+
"name": "Loop Over Items",
|
|
65
|
+
"type": "n8n-nodes-base.splitInBatches",
|
|
66
|
+
"typeVersion": 3,
|
|
67
|
+
"position": [
|
|
68
|
+
0,
|
|
69
|
+
0
|
|
70
|
+
],
|
|
71
|
+
"parameters": {
|
|
72
|
+
"batchSize": 1,
|
|
73
|
+
"options": {}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"connections": {
|
|
78
|
+
"Start": {
|
|
79
|
+
"main": [
|
|
80
|
+
[
|
|
81
|
+
{
|
|
82
|
+
"node": "Fixture",
|
|
83
|
+
"type": "main",
|
|
84
|
+
"index": 0
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
]
|
|
88
|
+
},
|
|
89
|
+
"Fixture": {
|
|
90
|
+
"main": [
|
|
91
|
+
[
|
|
92
|
+
{
|
|
93
|
+
"node": "Loop Over Items",
|
|
94
|
+
"type": "main",
|
|
95
|
+
"index": 0
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
"Render": {
|
|
101
|
+
"main": [
|
|
102
|
+
[
|
|
103
|
+
{
|
|
104
|
+
"node": "Loop Over Items",
|
|
105
|
+
"type": "main",
|
|
106
|
+
"index": 0
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"Loop Over Items": {
|
|
112
|
+
"main": [
|
|
113
|
+
[
|
|
114
|
+
{
|
|
115
|
+
"node": "Done",
|
|
116
|
+
"type": "main",
|
|
117
|
+
"index": 0
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
[
|
|
121
|
+
{
|
|
122
|
+
"node": "Render",
|
|
123
|
+
"type": "main",
|
|
124
|
+
"index": 0
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"settings": {
|
|
131
|
+
"executionOrder": "v1"
|
|
132
|
+
}
|
|
133
|
+
}
|