{
    "name": "Demo 3: Email triage",
    "flow": [
        {
            "id": 1,
            "module": "gateway:CustomWebHook",
            "version": 1,
            "parameters": {
                "maxResults": 1
            },
            "mapper": {},
            "metadata": {
                "designer": {
                    "x": 0,
                    "y": 0
                },
                "restore": {
                    "parameters": {
                        "hook": {
                            "data": {
                                "editable": "true"
                            },
                            "label": "Incoming email"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "hook",
                        "type": "hook:gateway-webhook",
                        "label": "Webhook",
                        "required": true
                    },
                    {
                        "name": "maxResults",
                        "type": "number",
                        "label": "Maximum number of results"
                    }
                ],
                "interface": [
                    {
                        "name": "caller_name",
                        "type": "text"
                    },
                    {
                        "name": "caller_phone",
                        "type": "text"
                    },
                    {
                        "name": "called_at",
                        "type": "text"
                    },
                    {
                        "name": "voicemail",
                        "type": "text"
                    }
                ]
            }
        },
        {
            "id": 2,
            "module": "app#vrymdor-ai-node:runAction",
            "version": 1,
            "parameters": {},
            "mapper": {
                "type": "sanitize",
                "input": "Subject: {{1.subject}}\n{{1.body}}"
            },
            "metadata": {
                "designer": {
                    "x": 300,
                    "y": 0
                },
                "setupValidation": {
                    "result": {
                        "valid": true,
                        "fields": []
                    },
                    "version": 1,
                    "configuration": "517b66431009494f"
                },
                "restore": {
                    "expect": {
                        "type": {
                            "mode": "chose",
                            "label": "Remove personal data and secrets"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "app#vrymdor-ai-node2"
                            },
                            "label": "Your Vrymdor AI Node connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:app#vrymdor-ai-node2",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "type",
                        "type": "select",
                        "label": "Action",
                        "required": true,
                        "validate": {
                            "enum": [
                                "sanitize",
                                "tool",
                                "llm",
                                "webhook"
                            ]
                        }
                    },
                    {
                        "name": "input",
                        "type": "any",
                        "label": "Input",
                        "required": true
                    }
                ]
            }
        },
        {
            "id": 3,
            "module": "json:CreateJSON",
            "version": 1,
            "parameters": {
                "type": 587676,
                "space": ""
            },
            "mapper": {
                "model": "claude-opus-5-5",
                "system": "You sort incoming email for a small insurance agency. Private details have already been replaced with placeholders such as [REDACTED:PHONE] or [REDACTED:CREDIT_CARD]; never guess or invent what they hide. Reply with JSON only, no other text, in exactly this shape: {\"category\": \"claim\" or \"billing\" or \"quote\" or \"policy_change\" or \"spam\" or \"other\", \"priority\": \"urgent\" or \"normal\" or \"low\", \"summary\": \"one sentence for the staff member\"}. Use \"urgent\" for an accident or loss that just happened, a coverage deadline today, or an angry customer about to cancel. Use \"low\" for spam and newsletters. Write in US English. Do not use em dashes, en dashes or double hyphens.",
                "messages": [
                    {
                        "role": "user",
                        "content": "{{2.output}}"
                    }
                ],
                "max_tokens": "2000",
                "output_config": {
                    "effort": "low"
                }
            },
            "metadata": {
                "designer": {
                    "x": 600,
                    "y": 0
                },
                "setupValidation": {
                    "result": {
                        "valid": true,
                        "fields": []
                    },
                    "version": 1,
                    "configuration": "efcf4962dea20af7"
                },
                "restore": {
                    "expect": {
                        "messages": {
                            "mode": "chose",
                            "items": [
                                null
                            ]
                        }
                    },
                    "parameters": {
                        "type": {
                            "label": "Claude request"
                        },
                        "space": {
                            "label": "Empty"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure",
                        "required": true
                    },
                    {
                        "name": "space",
                        "type": "select",
                        "label": "Indentation",
                        "validate": {
                            "enum": [
                                "tab",
                                "2",
                                "4"
                            ]
                        }
                    }
                ],
                "expect": [
                    {
                        "name": "model",
                        "type": "text",
                        "label": "Model"
                    },
                    {
                        "name": "max_tokens",
                        "type": "number",
                        "label": "Max tokens"
                    },
                    {
                        "name": "output_config",
                        "spec": [
                            {
                                "name": "effort",
                                "type": "text",
                                "label": "Effort"
                            }
                        ],
                        "type": "collection",
                        "label": "Output config"
                    },
                    {
                        "name": "system",
                        "type": "text",
                        "label": "System"
                    },
                    {
                        "name": "messages",
                        "spec": {
                            "name": "value",
                            "spec": [
                                {
                                    "name": "role",
                                    "type": "text"
                                },
                                {
                                    "name": "content",
                                    "type": "text"
                                }
                            ],
                            "type": "collection"
                        },
                        "type": "array",
                        "label": "Messages"
                    }
                ]
            }
        },
        {
            "id": 5,
            "module": "app#vrymdor-ai-node:runAction",
            "version": 1,
            "parameters": {},
            "mapper": {
                "path": "v1/messages",
                "type": "llm",
                "input": "{{3.json}}",
                "dryRun": false,
                "upstream": "anthropic"
            },
            "metadata": {
                "designer": {
                    "x": 900,
                    "y": 0
                },
                "setupValidation": {
                    "result": {
                        "valid": true,
                        "fields": []
                    },
                    "version": 1,
                    "configuration": "33d310da182bb62a"
                },
                "restore": {
                    "expect": {
                        "type": {
                            "mode": "chose",
                            "label": "Call a model"
                        },
                        "dryRun": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "app#vrymdor-ai-node2"
                            },
                            "label": "Your Vrymdor AI Node connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:app#vrymdor-ai-node2",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "type",
                        "type": "select",
                        "label": "Action",
                        "required": true,
                        "validate": {
                            "enum": [
                                "sanitize",
                                "tool",
                                "llm",
                                "webhook"
                            ]
                        }
                    },
                    {
                        "name": "input",
                        "type": "any",
                        "label": "Input",
                        "required": true
                    },
                    {
                        "name": "upstream",
                        "type": "text",
                        "label": "Upstream",
                        "required": true
                    },
                    {
                        "name": "path",
                        "type": "text",
                        "label": "API path",
                        "required": true
                    },
                    {
                        "name": "dryRun",
                        "type": "boolean",
                        "label": "Check only (dry run)"
                    }
                ]
            }
        },
        {
            "id": 6,
            "module": "json:ParseJSON",
            "version": 1,
            "parameters": {
                "type": 588290
            },
            "mapper": {
                "json": "{{first(map(5.output.content; \"text\"; \"type\"; \"text\"))}}"
            },
            "metadata": {
                "designer": {
                    "x": 1200,
                    "y": 0
                },
                "setupValidation": {
                    "result": {
                        "valid": true,
                        "fields": []
                    },
                    "version": 1,
                    "configuration": "38608a4fe6fbb085"
                },
                "restore": {
                    "parameters": {
                        "type": {
                            "label": "Inbox answer"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "type",
                        "type": "udt",
                        "label": "Data structure"
                    }
                ],
                "expect": [
                    {
                        "name": "json",
                        "type": "text",
                        "label": "JSON string",
                        "required": true
                    }
                ],
                "interface": [
                    {
                        "help": "",
                        "name": "category",
                        "type": "text",
                        "label": "Category"
                    },
                    {
                        "help": "",
                        "name": "priority",
                        "type": "text",
                        "label": "Priority"
                    },
                    {
                        "help": "",
                        "name": "summary",
                        "type": "text",
                        "label": "Summary"
                    }
                ]
            }
        },
        {
            "id": 7,
            "module": "microsoft-excel:addAWorksheetRow",
            "version": 2,
            "parameters": {},
            "mapper": {
                "row": {
                    "0": "{{now}}",
                    "1": "{{1.from}}",
                    "2": "{{1.subject}}",
                    "3": "{{6.category}}",
                    "4": "{{6.priority}}",
                    "5": "{{6.summary}}",
                    "6": "{{2.output}}"
                },
                "select": "list",
                "selectB": "my",
                "workbook": "/Documents/Make demos.xlsx",
                "valueType": "values",
                "worksheet": "Inbox"
            },
            "metadata": {
                "designer": {
                    "x": 1500,
                    "y": 0
                },
                "setupValidation": {
                    "result": {
                        "valid": true,
                        "fields": []
                    },
                    "version": 1,
                    "configuration": "6406e44651802304"
                },
                "restore": {
                    "expect": {
                        "select": {
                            "label": "Select from the list"
                        },
                        "selectB": {
                            "label": "My Drive"
                        },
                        "valueType": {
                            "mode": "chose",
                            "label": "Values"
                        },
                        "worksheet": {
                            "mode": "chose",
                            "label": "Inbox"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "azure"
                            },
                            "label": "Your Microsoft 365 connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:azure",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "select",
                        "type": "select",
                        "label": "Select a method",
                        "required": true,
                        "validate": {
                            "enum": [
                                "map",
                                "list"
                            ]
                        }
                    },
                    {
                        "name": "selectB",
                        "type": "select",
                        "label": "Choose your OneDrive location",
                        "required": true,
                        "validate": {
                            "enum": [
                                "my",
                                "site",
                                "group"
                            ]
                        }
                    },
                    {
                        "name": "workbook",
                        "type": "file",
                        "label": "Workbook",
                        "required": true
                    },
                    {
                        "name": "worksheet",
                        "type": "select",
                        "label": "Worksheet name",
                        "required": true
                    },
                    {
                        "name": "valueType",
                        "type": "select",
                        "label": "Type of values being entered",
                        "required": true,
                        "validate": {
                            "enum": [
                                "formulas",
                                "formulasLocal",
                                "values"
                            ]
                        }
                    },
                    {
                        "name": "row",
                        "spec": [
                            {
                                "name": "0",
                                "type": "text",
                                "label": "(A): Time"
                            },
                            {
                                "name": "1",
                                "type": "text",
                                "label": "(B): From"
                            },
                            {
                                "name": "2",
                                "type": "text",
                                "label": "(C): Subject"
                            },
                            {
                                "name": "3",
                                "type": "text",
                                "label": "(D): Category"
                            },
                            {
                                "name": "4",
                                "type": "text",
                                "label": "(E): Priority"
                            },
                            {
                                "name": "5",
                                "type": "text",
                                "label": "(F): Summary"
                            },
                            {
                                "name": "6",
                                "type": "text",
                                "label": "(G): What the AI saw"
                            }
                        ],
                        "type": "collection",
                        "label": "Row"
                    }
                ],
                "interface": [
                    {
                        "name": "id",
                        "type": "text",
                        "label": "Row ID"
                    },
                    {
                        "name": "row",
                        "spec": [
                            {
                                "name": "a",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(A): Time"
                            },
                            {
                                "name": "b",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(B): From"
                            },
                            {
                                "name": "c",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(C): Subject"
                            },
                            {
                                "name": "d",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(D): Category"
                            },
                            {
                                "name": "e",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(E): Priority"
                            },
                            {
                                "name": "f",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(F): Summary"
                            },
                            {
                                "name": "g",
                                "spec": [
                                    {
                                        "name": "formula",
                                        "type": "text",
                                        "label": "Formula"
                                    },
                                    {
                                        "name": "formulaLocal",
                                        "type": "text",
                                        "label": "Formula Local"
                                    },
                                    {
                                        "name": "numberFormat",
                                        "type": "text",
                                        "label": "Number Format"
                                    },
                                    {
                                        "name": "text",
                                        "type": "text",
                                        "label": "Text"
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    },
                                    {
                                        "name": "valueType",
                                        "type": "text",
                                        "label": "Value Type"
                                    }
                                ],
                                "type": "collection",
                                "label": "(G): What the AI saw"
                            }
                        ],
                        "type": "collection",
                        "label": "Row"
                    }
                ]
            }
        },
        {
            "id": 8,
            "module": "microsoft-email:createAndSendAMessage",
            "version": 2,
            "parameters": {},
            "filter": {
                "name": "Urgent only",
                "conditions": [
                    [
                        {
                            "a": "{{6.priority}}",
                            "b": "urgent",
                            "o": "text:equal"
                        }
                    ]
                ]
            },
            "mapper": {
                "content": "{{6.summary}}",
                "subject": "Urgent: {{1.subject}}",
                "contentType": "html",
                "toRecipients": [
                    {
                        "name": "You",
                        "address": "you@example.com"
                    }
                ],
                "singleValueExtendedProperties": {}
            },
            "metadata": {
                "designer": {
                    "x": 1800,
                    "y": 0
                },
                "setupValidation": {
                    "result": {
                        "valid": true,
                        "fields": []
                    },
                    "version": 1,
                    "configuration": "99a5bc4491dc90a8"
                },
                "restore": {
                    "expect": {
                        "from": {
                            "mode": "chose"
                        },
                        "replyTo": {
                            "mode": "chose"
                        },
                        "importance": {
                            "mode": "chose",
                            "label": "Empty"
                        },
                        "attachments": {
                            "mode": "chose"
                        },
                        "contentType": {
                            "mode": "chose",
                            "label": "HTML"
                        },
                        "ccRecipients": {
                            "mode": "chose"
                        },
                        "toRecipients": {
                            "mode": "chose",
                            "items": [
                                null
                            ]
                        },
                        "bccRecipients": {
                            "mode": "chose"
                        },
                        "internetMessageHeaders": {
                            "mode": "chose"
                        }
                    },
                    "parameters": {
                        "__IMTCONN__": {
                            "data": {
                                "scoped": "true",
                                "connection": "azure"
                            },
                            "label": "Your Microsoft 365 connection"
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "__IMTCONN__",
                        "type": "account:azure",
                        "label": "Connection",
                        "required": true
                    }
                ],
                "expect": [
                    {
                        "name": "toRecipients",
                        "spec": [
                            {
                                "name": "address",
                                "type": "email",
                                "label": "Email Address",
                                "required": true
                            },
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Name"
                            }
                        ],
                        "type": "array",
                        "label": "To Recipients",
                        "required": true
                    },
                    {
                        "name": "subject",
                        "type": "text",
                        "label": "Subject",
                        "required": true
                    },
                    {
                        "name": "content",
                        "type": "text",
                        "label": "Body Content",
                        "required": true
                    },
                    {
                        "name": "attachments",
                        "spec": [
                            {
                                "name": "filename",
                                "type": "filename",
                                "label": "File Name",
                                "required": true,
                                "semantic": "file:name"
                            },
                            {
                                "name": "data",
                                "type": "buffer",
                                "label": "Data",
                                "required": true,
                                "semantic": "file:data"
                            }
                        ],
                        "type": "array",
                        "label": "Attachments"
                    },
                    {
                        "name": "replyTo",
                        "spec": [
                            {
                                "name": "address",
                                "type": "email",
                                "label": "Email Address",
                                "required": true
                            },
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Name"
                            }
                        ],
                        "type": "array",
                        "label": "Reply To"
                    },
                    {
                        "name": "from",
                        "spec": [
                            {
                                "name": "address",
                                "type": "email",
                                "label": "Email Address",
                                "required": true
                            },
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Name"
                            }
                        ],
                        "type": "array",
                        "label": "From",
                        "validate": {
                            "maxItems": 1
                        }
                    },
                    {
                        "name": "ccRecipients",
                        "spec": [
                            {
                                "name": "address",
                                "type": "email",
                                "label": "Email Address",
                                "required": true
                            },
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Name"
                            }
                        ],
                        "type": "array",
                        "label": "CC Recipients"
                    },
                    {
                        "name": "bccRecipients",
                        "spec": [
                            {
                                "name": "address",
                                "type": "email",
                                "label": "Email Address",
                                "required": true
                            },
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Name"
                            }
                        ],
                        "type": "array",
                        "label": "Bcc Recipients"
                    },
                    {
                        "name": "importance",
                        "type": "select",
                        "label": "Importance",
                        "validate": {
                            "enum": [
                                "Low",
                                "Normal",
                                "High"
                            ]
                        }
                    },
                    {
                        "name": "internetMessageHeaders",
                        "spec": [
                            {
                                "name": "name",
                                "type": "text",
                                "label": "Name",
                                "required": true
                            },
                            {
                                "name": "value",
                                "type": "text",
                                "label": "Value",
                                "required": true
                            }
                        ],
                        "type": "array",
                        "label": "Internet Message Headers"
                    },
                    {
                        "name": "contentType",
                        "type": "select",
                        "label": "Body Content Type",
                        "required": true,
                        "validate": {
                            "enum": [
                                "html",
                                "text"
                            ]
                        }
                    },
                    {
                        "name": "singleValueExtendedProperties",
                        "spec": [
                            {
                                "name": "sensitivityLabel",
                                "type": "text",
                                "label": "Sensitivity Label"
                            }
                        ],
                        "type": "collection",
                        "label": "Extended MAPI Properties"
                    }
                ]
            }
        }
    ],
    "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": "us2.make.com",
        "notes": []
    }
}
