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 →
{
"nodes": [
{
"parameters": {},
"id": "da111771-9d1e-4d51-9a63-b031fdb4af45",
"name": "On clicking 'execute'",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1700,
660
],
"typeVersion": 1
},
{
"parameters": {},
"id": "7f74e207-cf4f-461f-8e1d-af94baf0fdb6",
"name": "When Called By Another Workflow",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
-1700,
860
],
"typeVersion": 1
},
{
"parameters": {
"source": "url",
"workflowUrl": "https://gitlab.com/vdshop/public/n8n-workflows/-/raw/master/workflows/data-provider/api/magento/search-criteria.json"
},
"id": "3b0ba90e-4b0f-464b-b0d8-158750f4d7c3",
"name": "Search Magento API",
"type": "n8n-nodes-base.executeWorkflow",
"position": [
-1000,
860
],
"executeOnce": true,
"notesInFlow": true,
"typeVersion": 1,
"notes": "using search criteria."
},
{
"parameters": {
"values": {
"string": [
{
"name": "endpoint",
"value": "creditmemos"
}
]
},
"options": {}
},
"id": "d1f7e5cc-3fe9-4170-a7b3-64288d6e6361",
"name": "Set endpoint",
"type": "n8n-nodes-base.set",
"position": [
-1240,
860
],
"executeOnce": true,
"typeVersion": 1
},
{
"parameters": {
"jsCode": "return {\n \"json\": {\n \"page_size\": 2, // Optional field, defaults to 25,\n \"filters\": [ // Optional field, defaults to empty array (no filtering).\n {\n \"field\": 'increment_id',\n \"conditionType\": 'in',\n \"value\": \"14000000020\",\n }\n ],\n \"sort_orders\": [ // Optional field, defaults to empty array (no sorting).\n {\n \"field\": \"increment_id\",\n \"direction\": \"asc\"\n }\n ]\n }\n};"
},
"id": "3965738b-df86-4284-8c66-82a37d53f36a",
"name": "Set search criteria data",
"type": "n8n-nodes-base.code",
"position": [
-1460,
660
],
"executeOnce": true,
"notesInFlow": true,
"typeVersion": 1,
"notes": "for demo purposes."
}
],
"connections": {
"On clicking 'execute'": {
"main": [
[
{
"node": "Set search criteria data",
"type": "main",
"index": 0
}
]
]
},
"When Called By Another Workflow": {
"main": [
[
{
"node": "Set endpoint",
"type": "main",
"index": 0
}
]
]
},
"Set endpoint": {
"main": [
[
{
"node": "Search Magento API",
"type": "main",
"index": 0
}
]
]
},
"Set search criteria data": {
"main": [
[
{
"node": "Set endpoint",
"type": "main",
"index": 0
}
]
]
}
}
}
About this workflow
Search-Criteria. Uses manualTrigger, executeWorkflowTrigger, executeWorkflow. Event-driven trigger; 5 nodes.
Source: https://gitlab.com/vdshop/public/n8n-workflows/-/blob/master/workflows/data-provider/api/magento/creditmemos/search-criteria.json — original creator credit. Request a take-down →