{
    "name": "AgentBrains - Knowledge Base Explorer (Admin Utility)",
    "flow": [
        {
            "id": 1,
            "module": "gateway:CustomWebHook",
            "version": 1,
            "parameters": {
                "hook": 3270843,
                "maxResults": 1
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "hook": {
                            "data": {
                                "editable": "true"
                            },
                            "label": "Knowledge base explorer example flow"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "hook",
                        "type": "hook:gateway-webhook",
                        "label": "Webhook",
                        "required": true
                    },
                    {
                        "name": "maxResults",
                        "type": "number",
                        "label": "Maximum number of results"
                    }
                ],
                "interface": [
                    {
                        "name": "action",
                        "type": "text"
                    },
                    {
                        "name": "categoryId",
                        "type": "text"
                    },
                    {
                        "name": "categoryTypeAlias",
                        "type": "text"
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "builtin:BasicRouter",
            "version": 1,
            "mapper": null,
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                }
            },
            "routes": [
                {
                    "flow": [
                        {
                            "id": 3,
                            "module": "app#agentbrains-pulssc:listCategories",
                            "version": 1,
                            "parameters": {
                                "extended": false,
                                "__IMTCONN__": 7785706
                            },
                            "filter": {
                                "name": "Action: categories",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.action}}",
                                            "b": "categories",
                                            "o": "text:equal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {},
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": -300
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "data": {
                                                "scoped": "true",
                                                "connection": "app#agentbrains-pulssc"
                                            },
                                            "label": "ATN Stage"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:app#agentbrains-pulssc",
                                        "label": "Connection",
                                        "required": true
                                    },
                                    {
                                        "name": "extended",
                                        "type": "boolean",
                                        "label": "Extended"
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "fields",
                                        "type": "text",
                                        "label": "Fields"
                                    },
                                    {
                                        "name": "search",
                                        "type": "text",
                                        "label": "Search"
                                    },
                                    {
                                        "name": "parent",
                                        "type": "text",
                                        "label": "Parent"
                                    },
                                    {
                                        "name": "policy",
                                        "type": "text",
                                        "label": "Policy"
                                    }
                                ]
                            }
                        },
                        {
                            "id": 4,
                            "module": "app#agentbrains-pulssc:getCategory",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 7785706
                            },
                            "mapper": {
                                "id": "{{1.categoryId}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 900,
                                    "y": -300
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "data": {
                                                "scoped": "true",
                                                "connection": "app#agentbrains-pulssc"
                                            },
                                            "label": "ATN Stage"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:app#agentbrains-pulssc",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "id",
                                        "type": "text",
                                        "label": "Category ID or Key",
                                        "required": true
                                    }
                                ]
                            }
                        },
                        {
                            "id": 5,
                            "module": "app#agentbrains-pulssc:listCategoriesByTypeKey",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 7785706
                            },
                            "mapper": {
                                "categoryAlias": "{{4.categoryAlias.aliasKey}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 1200,
                                    "y": -300
                                },
                                "restore": {
                                    "expect": {
                                        "categoryAlias": {
                                            "mode": "edit"
                                        }
                                    },
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "data": {
                                                "scoped": "true",
                                                "connection": "app#agentbrains-pulssc"
                                            },
                                            "label": "ATN Stage"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:app#agentbrains-pulssc",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "categoryAlias",
                                        "type": "select",
                                        "label": "Category Type Name or ID",
                                        "required": true
                                    }
                                ]
                            }
                        },
                        {
                            "id": 6,
                            "module": "gateway:WebhookRespond",
                            "version": 1,
                            "parameters": {},
                            "mapper": {
                                "body": "{\n  \"allCategories\"{{3.items}}: ,\n  \"category\": {{`4`}},\n  \"categoryGroup\": {{5.items}}\n}",
                                "status": "200",
                                "headers": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ]
                            },
                            "metadata": {
                                "designer": {
                                    "x": 1500,
                                    "y": -300
                                },
                                "restore": {
                                    "expect": {
                                        "headers": {
                                            "mode": "chose",
                                            "items": [
                                                null
                                            ]
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "status",
                                        "type": "uinteger",
                                        "label": "Status",
                                        "required": true,
                                        "validate": {
                                            "min": 100
                                        }
                                    },
                                    {
                                        "name": "body",
                                        "type": "any",
                                        "label": "Body"
                                    },
                                    {
                                        "name": "headers",
                                        "spec": [
                                            {
                                                "name": "key",
                                                "type": "text",
                                                "label": "Key",
                                                "required": true,
                                                "validate": {
                                                    "max": 256
                                                }
                                            },
                                            {
                                                "name": "value",
                                                "type": "text",
                                                "label": "Value",
                                                "required": true,
                                                "validate": {
                                                    "max": 4096
                                                }
                                            }
                                        ],
                                        "type": "array",
                                        "label": "Custom headers",
                                        "validate": {
                                            "maxItems": 16
                                        }
                                    }
                                ],
                                "advanced": true
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 7,
                            "module": "app#agentbrains-pulssc:listRelationshipTypes",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 7785706
                            },
                            "filter": {
                                "name": "Action: relationships",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.action}}",
                                            "b": "relationships",
                                            "o": "text:equal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {},
                            "metadata": {
                                "designer": {
                                    "x": 661,
                                    "y": 1
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "data": {
                                                "scoped": "true",
                                                "connection": "app#agentbrains-pulssc"
                                            },
                                            "label": "ATN Stage"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:app#agentbrains-pulssc",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ]
                            }
                        },
                        {
                            "id": 8,
                            "module": "gateway:WebhookRespond",
                            "version": 1,
                            "parameters": {},
                            "mapper": {
                                "body": "{\n  \"relationshipTypes\": {{7.items}}\n}",
                                "status": "200",
                                "headers": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ]
                            },
                            "metadata": {
                                "designer": {
                                    "x": 1009,
                                    "y": 3
                                },
                                "restore": {
                                    "expect": {
                                        "headers": {
                                            "mode": "chose",
                                            "items": [
                                                null
                                            ]
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "status",
                                        "type": "uinteger",
                                        "label": "Status",
                                        "required": true,
                                        "validate": {
                                            "min": 100
                                        }
                                    },
                                    {
                                        "name": "body",
                                        "type": "any",
                                        "label": "Body"
                                    },
                                    {
                                        "name": "headers",
                                        "spec": [
                                            {
                                                "name": "key",
                                                "type": "text",
                                                "label": "Key",
                                                "required": true,
                                                "validate": {
                                                    "max": 256
                                                }
                                            },
                                            {
                                                "name": "value",
                                                "type": "text",
                                                "label": "Value",
                                                "required": true,
                                                "validate": {
                                                    "max": 4096
                                                }
                                            }
                                        ],
                                        "type": "array",
                                        "label": "Custom headers",
                                        "validate": {
                                            "maxItems": 16
                                        }
                                    }
                                ],
                                "advanced": true
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 9,
                            "module": "app#agentbrains-pulssc:getAttachment",
                            "version": 1,
                            "parameters": {
                                "__IMTCONN__": 7785706
                            },
                            "filter": {
                                "name": "Action: attachment",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.action}}",
                                            "b": "attachment",
                                            "o": "text:equal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {
                                "id": "{{1.attachmentId}}"
                            },
                            "metadata": {
                                "designer": {
                                    "x": 674,
                                    "y": 301
                                },
                                "restore": {
                                    "parameters": {
                                        "__IMTCONN__": {
                                            "data": {
                                                "scoped": "true",
                                                "connection": "app#agentbrains-pulssc"
                                            },
                                            "label": "ATN Stage"
                                        }
                                    }
                                },
                                "parameters": [
                                    {
                                        "name": "__IMTCONN__",
                                        "type": "account:app#agentbrains-pulssc",
                                        "label": "Connection",
                                        "required": true
                                    }
                                ],
                                "expect": [
                                    {
                                        "name": "id",
                                        "type": "text",
                                        "label": "Attachment ID",
                                        "required": true
                                    }
                                ]
                            }
                        },
                        {
                            "id": 10,
                            "module": "gateway:WebhookRespond",
                            "version": 1,
                            "parameters": {},
                            "mapper": {
                                "body": "{\n  \"attachment\": {{`9`}}\n}",
                                "status": "200",
                                "headers": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ]
                            },
                            "metadata": {
                                "designer": {
                                    "x": 998,
                                    "y": 302
                                },
                                "restore": {
                                    "expect": {
                                        "headers": {
                                            "mode": "chose",
                                            "items": [
                                                null
                                            ]
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "status",
                                        "type": "uinteger",
                                        "label": "Status",
                                        "required": true,
                                        "validate": {
                                            "min": 100
                                        }
                                    },
                                    {
                                        "name": "body",
                                        "type": "any",
                                        "label": "Body"
                                    },
                                    {
                                        "name": "headers",
                                        "spec": [
                                            {
                                                "name": "key",
                                                "type": "text",
                                                "label": "Key",
                                                "required": true,
                                                "validate": {
                                                    "max": 256
                                                }
                                            },
                                            {
                                                "name": "value",
                                                "type": "text",
                                                "label": "Value",
                                                "required": true,
                                                "validate": {
                                                    "max": 4096
                                                }
                                            }
                                        ],
                                        "type": "array",
                                        "label": "Custom headers",
                                        "validate": {
                                            "maxItems": 16
                                        }
                                    }
                                ],
                                "advanced": true
                            }
                        }
                    ]
                },
                {
                    "flow": [
                        {
                            "id": 11,
                            "module": "gateway:WebhookRespond",
                            "version": 1,
                            "parameters": {},
                            "filter": {
                                "name": "Unknown action",
                                "conditions": [
                                    [
                                        {
                                            "a": "{{1.action}}",
                                            "b": "categories",
                                            "o": "text:notequal"
                                        },
                                        {
                                            "a": "{{1.action}}",
                                            "b": "relationships",
                                            "o": "text:notequal"
                                        },
                                        {
                                            "a": "{{1.action}}",
                                            "b": "attachment",
                                            "o": "text:notequal"
                                        }
                                    ]
                                ]
                            },
                            "mapper": {
                                "body": "{\n  \"error\": \"Unknown action. Use one of: categories, relationships, attachment\"\n}",
                                "status": "400",
                                "headers": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application/json"
                                    }
                                ]
                            },
                            "metadata": {
                                "designer": {
                                    "x": 600,
                                    "y": 600
                                },
                                "restore": {
                                    "expect": {
                                        "headers": {
                                            "mode": "chose",
                                            "items": [
                                                null
                                            ]
                                        }
                                    }
                                },
                                "expect": [
                                    {
                                        "name": "status",
                                        "type": "uinteger",
                                        "label": "Status",
                                        "required": true,
                                        "validate": {
                                            "min": 100
                                        }
                                    },
                                    {
                                        "name": "body",
                                        "type": "any",
                                        "label": "Body"
                                    },
                                    {
                                        "name": "headers",
                                        "spec": [
                                            {
                                                "name": "key",
                                                "type": "text",
                                                "label": "Key",
                                                "required": true,
                                                "validate": {
                                                    "max": 256
                                                }
                                            },
                                            {
                                                "name": "value",
                                                "type": "text",
                                                "label": "Value",
                                                "required": true,
                                                "validate": {
                                                    "max": 4096
                                                }
                                            }
                                        ],
                                        "type": "array",
                                        "label": "Custom headers",
                                        "validate": {
                                            "maxItems": 16
                                        }
                                    }
                                ],
                                "advanced": true
                            }
                        }
                    ]
                }
            ]
        }
    ],
    "metadata": {
        "instant": true,
        "version": 1,
        "scenario": {
            "roundtrips": 1,
            "maxErrors": 3,
            "autoCommit": true,
            "autoCommitTriggerLast": true,
            "sequential": false,
            "slots": null,
            "confidential": false,
            "dataloss": false,
            "dlq": false,
            "freshVariables": false
        },
        "designer": {
            "orphans": []
        },
        "zone": "eu1.make.com",
        "notes": []
    }
}