{
    "name": "Integration Data store, CSV, Tools",
    "flow": [
        {
            "id": 1,
            "module": "datastore:SearchRecord",
            "version": 1,
            "parameters": {
                "datastore": 8521,
                "limit": null
            },
            "mapper": {
                "filter": [],
                "sort": []
            },
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 300
                },
                "restore": {
                    "parameters": {
                        "datastore": {
                            "label": "Webhook Limiter"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "datastore",
                        "type": "datastore",
                        "label": "Data store",
                        "required": true
                    },
                    {
                        "name": "limit",
                        "type": "uinteger",
                        "label": "Limit"
                    },
                    {
                        "name": "continueWhenNoRes",
                        "type": "boolean",
                        "label": "Continue the execution of the route even if the module returns no results"
                    }
                ],
                "expect": [
                    {
                        "name": "filter",
                        "type": "filter",
                        "label": "Filter",
                        "required": true,
                        "options": "rpc://datastore/1.8.2/RpcGetUDTKeys"
                    },
                    {
                        "name": "sort",
                        "type": "array",
                        "label": "Sort",
                        "spec": [
                            {
                                "name": "key",
                                "label": "Key",
                                "type": "select",
                                "options": [],
                                "required": true,
                                "dynamic": true
                            },
                            {
                                "name": "order",
                                "label": "Order",
                                "type": "select",
                                "options": [
                                    {
                                        "label": "Ascending",
                                        "value": 1
                                    },
                                    {
                                        "label": "Descending",
                                        "value": -1
                                    }
                                ],
                                "required": true
                            }
                        ]
                    },
                    {
                        "name": "filter",
                        "type": "filter",
                        "label": "Filter",
                        "required": true,
                        "options": "rpc://datastore/1.8.2/RpcGetUDTKeys"
                    },
                    {
                        "name": "sort",
                        "type": "array",
                        "label": "Sort",
                        "spec": [
                            {
                                "name": "key",
                                "label": "Key",
                                "type": "select",
                                "options": [],
                                "required": true,
                                "dynamic": true
                            },
                            {
                                "name": "order",
                                "label": "Order",
                                "type": "select",
                                "options": [
                                    {
                                        "label": "Ascending",
                                        "value": 1
                                    },
                                    {
                                        "label": "Descending",
                                        "value": -1
                                    }
                                ],
                                "required": true
                            }
                        ]
                    }
                ],
                "interface": [
                    {
                        "name": "key",
                        "type": "text",
                        "label": "Key"
                    },
                    {
                        "name": "data",
                        "type": "collection",
                        "label": "Record",
                        "spec": [
                            {
                                "name": "Item 1",
                                "label": null,
                                "type": "text",
                                "default": null,
                                "required": false,
                                "multiline": false
                            },
                            {
                                "name": "Item 2",
                                "label": null,
                                "type": "text",
                                "default": null,
                                "required": false,
                                "multiline": false
                            },
                            {
                                "name": "Item 3",
                                "label": null,
                                "type": "text",
                                "default": null,
                                "required": false,
                                "multiline": false
                            },
                            {
                                "name": "JSON",
                                "label": null,
                                "type": "array",
                                "spec": {
                                    "type": "text",
                                    "default": null,
                                    "required": false,
                                    "multiline": false
                                }
                            },
                            {
                                "name": "Time Created",
                                "label": null,
                                "type": "date"
                            }
                        ]
                    }
                ]
            }
        },
        {
            "id": 4,
            "module": "builtin:BasicRouter",
            "version": 1,
            "mapper": null,
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 300
                }
            },
            "routes": [
                {
                    "flow": [
                        {
                            "id": 6,
                            "module": "util:FunctionAggregator2",
                            "version": 1,
                            "parameters": {
                                "fn": "sum",
                                "feeder": 1
                            },
                            "mapper": {
                                "value": "{{1.data.`Item 3`}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 0,
                                    "name": "Sum"
                                },
                                "restore": {
                                    "parameters": {
                                        "fn": {
                                            "label": "SUM"
                                        }
                                    },
                                    "extra": {
                                        "feeder": {
                                            "label": "Data store - Search records [1]"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "fn",
                                        "type": "select",
                                        "label": "Aggregate function",
                                        "required": true,
                                        "validate": {
                                            "enum": [
                                                "avg",
                                                "sum",
                                                "count",
                                                "max",
                                                "min"
                                            ]
                                        }
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "value",
                                        "type": "number",
                                        "label": "Value"
                                    }
                                ]
                            }
                        },
                        {
                            "id": 5,
                            "module": "util:SetVariable2",
                            "version": 1,
                            "parameters": {},
                            "mapper": {
                                "name": "test",
                                "scope": "roundtrip",
                                "value": "{{6.result}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 900,
                                    "y": 0,
                                    "name": "Set"
                                },
                                "restore": {
                                    "expect": {
                                        "scope": {
                                            "label": "One cycle"
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Variable name",
                                        "required": true
                                    },
                                    {
                                        "name": "scope",
                                        "type": "select",
                                        "label": "Variable lifetime",
                                        "required": true,
                                        "validate": {
                                            "enum": [
                                                "roundtrip",
                                                "execution"
                                            ]
                                        }
                                    },
                                    {
                                        "name": "value",
                                        "type": "any",
                                        "label": "Variable value"
                                    }
                                ],
                                "interface": [
                                    {
                                        "name": "test",
                                        "label": "test",
                                        "type": "any"
                                    }
                                ]
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 2,
                            "module": "csv:CreateAggregator",
                            "version": 1,
                            "parameters": {
                                "includeHeaders": true,
                                "feeder": 1
                            },
                            "mapper": {
                                "data": "{{1.data}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 450
                                },
                                "restore": {
                                    "extra": {
                                        "feeder": {
                                            "label": "Data store - Search records [1]"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "includeHeaders",
                                        "type": "boolean",
                                        "label": "Include headers in the first row",
                                        "required": true
                                    }
                                ]
                            }
                        },
                        {
                            "id": 8,
                            "module": "datastore:SearchRecord",
                            "version": 1,
                            "parameters": {
                                "datastore": 8521,
                                "limit": null
                            },
                            "mapper": {
                                "filter": [],
                                "sort": []
                            },
                            "metadata": {
                                "designer": {
                                    "x": 900,
                                    "y": 450
                                },
                                "restore": {
                                    "parameters": {
                                        "datastore": {
                                            "label": "Webhook Limiter"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "datastore",
                                        "type": "datastore",
                                        "label": "Data store",
                                        "required": true
                                    },
                                    {
                                        "name": "limit",
                                        "type": "uinteger",
                                        "label": "Limit"
                                    },
                                    {
                                        "name": "continueWhenNoRes",
                                        "type": "boolean",
                                        "label": "Continue the execution of the route even if the module returns no results"
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "filter",
                                        "type": "filter",
                                        "label": "Filter",
                                        "required": true,
                                        "options": "rpc://datastore/1.8.2/RpcGetUDTKeys"
                                    },
                                    {
                                        "name": "sort",
                                        "type": "array",
                                        "label": "Sort",
                                        "spec": [
                                            {
                                                "name": "key",
                                                "label": "Key",
                                                "type": "select",
                                                "options": [],
                                                "required": true,
                                                "dynamic": true
                                            },
                                            {
                                                "name": "order",
                                                "label": "Order",
                                                "type": "select",
                                                "options": [
                                                    {
                                                        "label": "Ascending",
                                                        "value": 1
                                                    },
                                                    {
                                                        "label": "Descending",
                                                        "value": -1
                                                    }
                                                ],
                                                "required": true
                                            }
                                        ]
                                    },
                                    {
                                        "name": "filter",
                                        "type": "filter",
                                        "label": "Filter",
                                        "required": true,
                                        "options": "rpc://datastore/1.8.2/RpcGetUDTKeys"
                                    },
                                    {
                                        "name": "sort",
                                        "type": "array",
                                        "label": "Sort",
                                        "spec": [
                                            {
                                                "name": "key",
                                                "label": "Key",
                                                "type": "select",
                                                "options": [],
                                                "required": true,
                                                "dynamic": true
                                            },
                                            {
                                                "name": "order",
                                                "label": "Order",
                                                "type": "select",
                                                "options": [
                                                    {
                                                        "label": "Ascending",
                                                        "value": 1
                                                    },
                                                    {
                                                        "label": "Descending",
                                                        "value": -1
                                                    }
                                                ],
                                                "required": true
                                            }
                                        ]
                                    }
                                ],
                                "interface": [
                                    {
                                        "name": "key",
                                        "type": "text",
                                        "label": "Key"
                                    },
                                    {
                                        "name": "data",
                                        "type": "collection",
                                        "label": "Record",
                                        "spec": [
                                            {
                                                "name": "Item 1",
                                                "label": null,
                                                "type": "text",
                                                "default": null,
                                                "required": false,
                                                "multiline": false
                                            },
                                            {
                                                "name": "Item 2",
                                                "label": null,
                                                "type": "text",
                                                "default": null,
                                                "required": false,
                                                "multiline": false
                                            },
                                            {
                                                "name": "Item 3",
                                                "label": null,
                                                "type": "text",
                                                "default": null,
                                                "required": false,
                                                "multiline": false
                                            },
                                            {
                                                "name": "JSON",
                                                "label": null,
                                                "type": "array",
                                                "spec": {
                                                    "type": "text",
                                                    "default": null,
                                                    "required": false,
                                                    "multiline": false
                                                }
                                            },
                                            {
                                                "name": "Time Created",
                                                "label": null,
                                                "type": "date"
                                            }
                                        ]
                                    }
                                ]
                            }
                        },
                        {
                            "id": 9,
                            "module": "builtin:BasicRouter",
                            "version": 1,
                            "mapper": null,
                            "metadata": {
                                "designer": {
                                    "x": 1200,
                                    "y": 450
                                }
                            },
                            "routes": [
                                {
                                    "flow": [
                                        {
                                            "id": 10,
                                            "module": "util:FunctionAggregator2",
                                            "version": 1,
                                            "parameters": {
                                                "fn": "sum",
                                                "feeder": 8
                                            },
                                            "mapper": {
                                                "value": "{{8.data.`Item 3`}}"
                                            },
                                            "metadata": {
                                                "designer": {
                                                    "x": 1500,
                                                    "y": 300,
                                                    "name": "Sum"
                                                },
                                                "restore": {
                                                    "parameters": {
                                                        "fn": {
                                                            "label": "SUM"
                                                        }
                                                    },
                                                    "extra": {
                                                        "feeder": {
                                                            "label": "Data store - Search records [1]"
                                                        }
                                                    }
                                                },
                                                "parameters": [
                                                    {
                                                        "name": "fn",
                                                        "type": "select",
                                                        "label": "Aggregate function",
                                                        "required": true,
                                                        "validate": {
                                                            "enum": [
                                                                "avg",
                                                                "sum",
                                                                "count",
                                                                "max",
                                                                "min"
                                                            ]
                                                        }
                                                    }
                                                ],
                                                "expect": [
                                                    {
                                                        "name": "value",
                                                        "type": "number",
                                                        "label": "Value"
                                                    }
                                                ]
                                            }
                                        },
                                        {
                                            "id": 11,
                                            "module": "util:SetVariable2",
                                            "version": 1,
                                            "parameters": {},
                                            "mapper": {
                                                "name": "test1",
                                                "scope": "roundtrip",
                                                "value": "{{10.result}}"
                                            },
                                            "metadata": {
                                                "designer": {
                                                    "x": 1800,
                                                    "y": 300,
                                                    "name": "Set"
                                                },
                                                "restore": {
                                                    "expect": {
                                                        "scope": {
                                                            "label": "One cycle"
                                                        }
                                                    }
                                                },
                                                "expect": [
                                                    {
                                                        "name": "name",
                                                        "type": "text",
                                                        "label": "Variable name",
                                                        "required": true
                                                    },
                                                    {
                                                        "name": "scope",
                                                        "type": "select",
                                                        "label": "Variable lifetime",
                                                        "required": true,
                                                        "validate": {
                                                            "enum": [
                                                                "roundtrip",
                                                                "execution"
                                                            ]
                                                        }
                                                    },
                                                    {
                                                        "name": "value",
                                                        "type": "any",
                                                        "label": "Variable value"
                                                    }
                                                ],
                                                "interface": [
                                                    {
                                                        "name": "test1",
                                                        "label": "test1",
                                                        "type": "any"
                                                    }
                                                ]
                                            }
                                        }
                                    ]
                                },
                                {
                                    "flow": [
                                        {
                                            "id": 12,
                                            "module": "csv:CreateAggregator",
                                            "version": 1,
                                            "parameters": {
                                                "includeHeaders": true,
                                                "feeder": 8
                                            },
                                            "mapper": {
                                                "data": "{{8.data}}"
                                            },
                                            "metadata": {
                                                "designer": {
                                                    "x": 1500,
                                                    "y": 600
                                                },
                                                "restore": {
                                                    "extra": {
                                                        "feeder": {
                                                            "label": "Data store - Search records [1]"
                                                        }
                                                    }
                                                },
                                                "parameters": [
                                                    {
                                                        "name": "includeHeaders",
                                                        "type": "boolean",
                                                        "label": "Include headers in the first row",
                                                        "required": true
                                                    }
                                                ]
                                            }
                                        },
                                        {
                                            "id": 14,
                                            "module": "util:GetVariables",
                                            "version": 1,
                                            "parameters": {},
                                            "mapper": {
                                                "variables": [
                                                    "test",
                                                    "test1"
                                                ]
                                            },
                                            "metadata": {
                                                "designer": {
                                                    "x": 1790,
                                                    "y": 578,
                                                    "name": "Get variables"
                                                },
                                                "restore": {
                                                    "expect": {
                                                        "variables": {
                                                            "items": [
                                                                null,
                                                                null
                                                            ]
                                                        }
                                                    }
                                                },
                                                "expect": [
                                                    {
                                                        "name": "variables",
                                                        "type": "array",
                                                        "label": "Variables",
                                                        "spec": {
                                                            "name": "value",
                                                            "label": "Variable name",
                                                            "type": "text",
                                                            "required": true
                                                        }
                                                    }
                                                ],
                                                "interface": [
                                                    {
                                                        "name": "test",
                                                        "label": "test",
                                                        "type": "any"
                                                    },
                                                    {
                                                        "name": "test1",
                                                        "label": "test1",
                                                        "type": "any"
                                                    }
                                                ]
                                            }
                                        },
                                        {
                                            "id": 15,
                                            "module": "util:SetVariable2",
                                            "version": 1,
                                            "parameters": {},
                                            "mapper": {
                                                "name": "sumtest",
                                                "scope": "roundtrip",
                                                "value": "{{sum(14.test; 14.test1)}}"
                                            },
                                            "metadata": {
                                                "designer": {
                                                    "x": 2103,
                                                    "y": 584,
                                                    "name": "Sum variables"
                                                },
                                                "restore": {
                                                    "expect": {
                                                        "scope": {
                                                            "label": "One cycle"
                                                        }
                                                    }
                                                },
                                                "expect": [
                                                    {
                                                        "name": "name",
                                                        "type": "text",
                                                        "label": "Variable name",
                                                        "required": true
                                                    },
                                                    {
                                                        "name": "scope",
                                                        "type": "select",
                                                        "label": "Variable lifetime",
                                                        "required": true,
                                                        "validate": {
                                                            "enum": [
                                                                "roundtrip",
                                                                "execution"
                                                            ]
                                                        }
                                                    },
                                                    {
                                                        "name": "value",
                                                        "type": "any",
                                                        "label": "Variable value"
                                                    }
                                                ],
                                                "interface": [
                                                    {
                                                        "name": "sumtest",
                                                        "label": "sumtest",
                                                        "type": "any"
                                                    }
                                                ]
                                            }
                                        }
                                    ]
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "metadata": {
        "instant": false,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "us1.make.com"
    }
}