{
    "tags": [
        {
            "name": "documentation"
        },
        {
            "name": "email"
        }
    ],
    "editor": true,
    "type": "processing",
    "payload": {
        "id": "demo@0.1.0",
        "nodes": {
            "17": {
                "data": {
                    "extensions": {
                        "tag": "17-start-custom-tag"
                    }
                },
                "id": 17,
                "inputs": {},
                "name": "start",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 38
                            }
                        ]
                    }
                },
                "position": [
                    -425.19921875,
                    -308.27221623553567
                ]
            },
            "38": {
                "data": {
                    "email": {
                        "id": "",
                        "messageId": "${message_id}"
                    },
                    "extensions": {
                        "break": false,
                        "tag": "38-getEmail-custom-tag"
                    },
                    "set": [
                        {
                            "key": "files",
                            "value": "attachments"
                        },
                        {
                            "key": "html-body",
                            "value": "html"
                        },
                        {
                            "key": "subject",
                            "value": "subject"
                        },
                        {
                            "key": "from",
                            "value": "from"
                        },
                        {
                            "key": "message_id",
                            "value": "message_id"
                        },
                        {
                            "key": "contact_ids",
                            "value": "contact_ids"
                        },
                        {
                            "key": "body",
                            "value": "body"
                        }
                    ]
                },
                "id": 38,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 17,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "getEmail",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 56
                            }
                        ]
                    }
                },
                "position": [
                    -243.24768283529474,
                    -331.7884282971468
                ]
            },
            "39": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "39-formRichTextEditor-custom-tag"
                    },
                    "id": "html-body-form",
                    "view": {
                        "hint": "",
                        "initialValue": "Best regards, Your Care Team :)",
                        "label": "Please enter your response to the message below.",
                        "output": {
                            "locale": "apps.formRichTextEditor.params.output.html",
                            "value": "html"
                        }
                    }
                },
                "id": 39,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 42,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formRichTextEditor",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 60
                            }
                        ]
                    }
                },
                "position": [
                    671.0283298104191,
                    -336.50535452576446
                ]
            },
            "40": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "40-formFile-custom-tag"
                    },
                    "id": "files-form",
                    "view": {
                        "collapsible": true,
                        "component": "form-file",
                        "hint": "Files are displayed here if they are present in the inbound message.",
                        "initialValue": "${files}",
                        "label": "Attachments from the inbound message:",
                        "readonly": true
                    }
                },
                "id": 40,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 47,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formFile",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 42
                            }
                        ]
                    }
                },
                "position": [
                    314.7742813259906,
                    -332.07238262162105
                ]
            },
            "41": {
                "data": {
                    "actions": [
                        {
                            "id": "close",
                            "view": {
                                "color": "danger",
                                "text": "Don't answer"
                            }
                        },
                        {
                            "id": "send",
                            "view": {
                                "color": "success",
                                "text": "Send"
                            }
                        }
                    ],
                    "body": [
                        {
                            "name": "text"
                        },
                        {
                            "name": "debug-info"
                        },
                        {
                            "name": "files-form"
                        },
                        {
                            "name": "to"
                        },
                        {
                            "name": "cc"
                        },
                        {
                            "name": "html-body-form"
                        },
                        {
                            "name": "files-send-form"
                        }
                    ],
                    "extensions": {
                        "break": false,
                        "tag": "41-generateForm-custom-tag"
                    },
                    "id": "Email-form",
                    "title": "Inbound message from ${from}"
                },
                "id": 41,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 61,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "generateForm",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 43
                            }
                        ]
                    }
                },
                "position": [
                    1315.649230521879,
                    -334.01296805548213
                ]
            },
            "42": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "42-formFile-custom-tag"
                    },
                    "id": "files-send-form",
                    "view": {
                        "collapsible": true,
                        "component": "form-file",
                        "hint": "",
                        "initialValue": "",
                        "label": "Add attachments for the outbound message:",
                        "readonly": false
                    }
                },
                "id": 42,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 40,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formFile",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 39
                            }
                        ]
                    }
                },
                "position": [
                    487.144465812983,
                    -331.1461784630466
                ]
            },
            "43": {
                "data": {
                    "expression": "${Email-form} == 'send'",
                    "extensions": {
                        "break": false,
                        "tag": "43-if-custom-tag"
                    }
                },
                "id": 43,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 41,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "if",
                "outputs": {
                    "else": {
                        "connections": []
                    },
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 46
                            }
                        ]
                    },
                    "then": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 58
                            }
                        ]
                    }
                },
                "position": [
                    1546.121055245969,
                    -363.10414788660376
                ]
            },
            "45": {
                "data": {
                    "addCommunications": [
                        {
                            "destination": "",
                            "priority": 0,
                            "type": {
                                "id": ""
                            }
                        }
                    ],
                    "description": "",
                    "extensions": {
                        "break": true,
                        "tag": "45-attemptResult-custom-tag"
                    },
                    "isCommunications": false,
                    "readyAt": "",
                    "status": {
                        "name": "success"
                    },
                    "stickyDisplay": false,
                    "waitBetweenRetries": ""
                },
                "id": 45,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 58,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "attemptResult",
                "outputs": {
                    "out": {
                        "connections": []
                    }
                },
                "position": [
                    1939.3784629667002,
                    -429.7554632893343
                ]
            },
            "46": {
                "data": {
                    "addCommunications": [
                        {
                            "destination": "",
                            "priority": 0,
                            "type": {
                                "id": ""
                            }
                        }
                    ],
                    "description": "",
                    "extensions": {
                        "break": true,
                        "tag": "46-attemptResult-custom-tag"
                    },
                    "isCommunications": false,
                    "readyAt": "",
                    "status": {
                        "name": "abandoned"
                    },
                    "stickyDisplay": false,
                    "waitBetweenRetries": ""
                },
                "id": 46,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 43,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "attemptResult",
                "outputs": {
                    "out": {
                        "connections": []
                    }
                },
                "position": [
                    1766.0375486703792,
                    -161.4782054615381
                ]
            },
            "47": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "47-formText-custom-tag"
                    },
                    "id": "debug-info",
                    "view": {
                        "collapsible": true,
                        "color": "info",
                        "enableCopying": false,
                        "hint": "The following is displayed: from, subject, message_id, body.",
                        "initialValue": "<P><B>Message from: </B> ${from} </P>\n\n<P><B>Message subject: </B> ${subject} </P>\n\n<P><B>Message ID: </B> ${message_id}</P>\n\n<P><B>Message body: </B> ${body} </P>\n\n<P><B>Contact: </B> ${contact_ids} </P>\n",
                        "label": "Information about the inbound message:"
                    }
                },
                "id": 47,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 56,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formText",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 40
                            }
                        ]
                    }
                },
                "position": [
                    133.89595182666196,
                    -331.59271392174736
                ]
            },
            "56": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "56-formText-custom-tag"
                    },
                    "id": "text",
                    "view": {
                        "collapsible": false,
                        "color": "secondary",
                        "enableCopying": false,
                        "hint": "Hint: This displays text from the Hint field of the Form Text component",
                        "initialValue": "${html-body}\n\n\n",
                        "label": "${subject}"
                    }
                },
                "id": 56,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 38,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formText",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 47
                            }
                        ]
                    }
                },
                "position": [
                    -53.215050550138905,
                    -331.73841020560104
                ]
            },
            "58": {
                "data": {
                    "attachment": {
                        "files": "${files-send-form}"
                    },
                    "cc": [
                        {
                            "text": "${cc}"
                        }
                    ],
                    "contactIds": "${contact_ids}",
                    "contactIdsArray": [],
                    "contactIdsVariable": "",
                    "extensions": {
                        "break": false,
                        "tag": "58-sendEmail-custom-tag"
                    },
                    "from": "",
                    "isContactsVariable": false,
                    "message": "${html-body-form}",
                    "ownerId": "${user_id}",
                    "profile": {
                        "id": "120"
                    },
                    "replyToId": "${message_id}",
                    "responseCode": "",
                    "retryCount": 3,
                    "smtp": {
                        "_isAuth": true,
                        "auth": {
                            "password": "sofochka12051999",
                            "user": "s.drych@webitel.com"
                        },
                        "port": 587,
                        "server": "mx.webitel.com",
                        "tls": true
                    },
                    "store": true,
                    "subject": "${subject}",
                    "to": [
                        {
                            "text": "${to}"
                        }
                    ]
                },
                "id": 58,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 43,
                                "output": "then"
                            }
                        ]
                    }
                },
                "name": "sendEmail",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 45
                            }
                        ]
                    }
                },
                "position": [
                    1735.5845383105648,
                    -430.8045923348997
                ]
            },
            "60": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "60-formTextfield-custom-tag"
                    },
                    "id": "to",
                    "view": {
                        "hint": "Enter the recipient's email address",
                        "initialValue": "${from}",
                        "label": "To:"
                    }
                },
                "id": 60,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 39,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formTextfield",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 61
                            }
                        ]
                    }
                },
                "position": [
                    910.7338848442695,
                    -332.39613135353346
                ]
            },
            "61": {
                "data": {
                    "extensions": {
                        "break": false,
                        "tag": "61-formTextfield-custom-tag"
                    },
                    "id": "cc",
                    "view": {
                        "hint": "Enter the email address",
                        "initialValue": "",
                        "label": "Copy:"
                    }
                },
                "id": 61,
                "inputs": {
                    "in": {
                        "connections": [
                            {
                                "data": {},
                                "node": 60,
                                "output": "out"
                            }
                        ]
                    }
                },
                "name": "formTextfield",
                "outputs": {
                    "out": {
                        "connections": [
                            {
                                "data": {},
                                "input": "in",
                                "node": 41
                            }
                        ]
                    }
                },
                "position": [
                    1116.1276030560625,
                    -331.640265958065
                ]
            }
        }
    },
    "schema": "[\n    {\n        \"break\": false,\n        \"getEmail\": {\n            \"email\": {\n                \"id\": \"\",\n                \"messageId\": \"${message_id}\"\n            },\n            \"set\": {\n                \"body\": \"body\",\n                \"contact_ids\": \"contact_ids\",\n                \"files\": \"attachments\",\n                \"from\": \"from\",\n                \"html-body\": \"html\",\n                \"message_id\": \"message_id\",\n                \"subject\": \"subject\"\n            }\n        },\n        \"tag\": \"38-getEmail-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formComponent\": {\n            \"id\": \"text\",\n            \"view\": {\n                \"collapsible\": false,\n                \"color\": \"secondary\",\n                \"component\": \"form-text\",\n                \"enableCopying\": false,\n                \"hint\": \"Hint: This displays text from the Hint field of the Form Text component\",\n                \"initialValue\": \"${html-body}\\n\\n\\n\",\n                \"label\": \"${subject}\"\n            }\n        },\n        \"tag\": \"56-formText-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formComponent\": {\n            \"id\": \"debug-info\",\n            \"view\": {\n                \"collapsible\": true,\n                \"color\": \"info\",\n                \"component\": \"form-text\",\n                \"enableCopying\": false,\n                \"hint\": \"The following is displayed: from, subject, message_id, body.\",\n                \"initialValue\": \"<P><B>Message from: </B> ${from} </P>\\n\\n<P><B>Message subject: </B> ${subject} </P>\\n\\n<P><B>Message ID: </B> ${message_id}</P>\\n\\n<P><B>Message body: </B> ${body} </P>\\n\\n<P><B>Contact: </B> ${contact_ids} </P>\\n\",\n                \"label\": \"Information about the inbound message:\"\n            }\n        },\n        \"tag\": \"47-formText-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formFile\": {\n            \"id\": \"files-form\",\n            \"view\": {\n                \"collapsible\": true,\n                \"component\": \"form-file\",\n                \"hint\": \"Files are displayed here if they are present in the inbound message.\",\n                \"initialValue\": \"${files}\",\n                \"label\": \"Attachments from the inbound message:\",\n                \"readonly\": true\n            }\n        },\n        \"tag\": \"40-formFile-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formFile\": {\n            \"id\": \"files-send-form\",\n            \"view\": {\n                \"collapsible\": true,\n                \"component\": \"form-file\",\n                \"hint\": \"\",\n                \"initialValue\": \"\",\n                \"label\": \"Add attachments for the outbound message:\",\n                \"readonly\": false\n            }\n        },\n        \"tag\": \"42-formFile-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formComponent\": {\n            \"id\": \"html-body-form\",\n            \"view\": {\n                \"component\": \"rich-text-editor\",\n                \"hint\": \"\",\n                \"initialValue\": \"Best regards, Your Care Team :)\",\n                \"label\": \"Please enter your response to the message below.\",\n                \"output\": \"html\"\n            }\n        },\n        \"tag\": \"39-formRichTextEditor-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formComponent\": {\n            \"id\": \"to\",\n            \"view\": {\n                \"component\": \"wt-input\",\n                \"hint\": \"Enter the recipient's email address\",\n                \"initialValue\": \"${from}\",\n                \"label\": \"To:\"\n            }\n        },\n        \"tag\": \"60-formTextfield-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"formComponent\": {\n            \"id\": \"cc\",\n            \"view\": {\n                \"component\": \"wt-input\",\n                \"hint\": \"Enter the email address\",\n                \"initialValue\": \"\",\n                \"label\": \"Copy:\"\n            }\n        },\n        \"tag\": \"61-formTextfield-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"generateForm\": {\n            \"actions\": [\n                {\n                    \"id\": \"close\",\n                    \"view\": {\n                        \"color\": \"danger\",\n                        \"text\": \"Don't answer\"\n                    }\n                },\n                {\n                    \"id\": \"send\",\n                    \"view\": {\n                        \"color\": \"success\",\n                        \"text\": \"Send\"\n                    }\n                }\n            ],\n            \"body\": [\n                \"text\",\n                \"debug-info\",\n                \"files-form\",\n                \"to\",\n                \"cc\",\n                \"html-body-form\",\n                \"files-send-form\"\n            ],\n            \"id\": \"Email-form\",\n            \"title\": \"Inbound message from ${from}\"\n        },\n        \"tag\": \"41-generateForm-custom-tag\"\n    },\n    {\n        \"break\": false,\n        \"if\": {\n            \"expression\": \"${Email-form} == 'send'\",\n            \"then\": [\n                {\n                    \"break\": false,\n                    \"sendEmail\": {\n                        \"attachment\": {\n                            \"files\": \"${files-send-form}\"\n                        },\n                        \"cc\": [\n                            \"${cc}\"\n                        ],\n                        \"contactIds\": \"${contact_ids}\",\n                        \"from\": \"\",\n                        \"message\": \"${html-body-form}\",\n                        \"ownerId\": \"${user_id}\",\n                        \"profile\": {\n                            \"id\": \"120\"\n                        },\n                        \"replyToId\": \"${message_id}\",\n                        \"responseCode\": \"\",\n                        \"retryCount\": 3,\n                        \"smtp\": {\n                            \"auth\": {\n                                \"password\": \"sofochka12051999\",\n                                \"user\": \"s.drych@webitel.com\"\n                            },\n                            \"port\": 587,\n                            \"server\": \"mx.webitel.com\",\n                            \"tls\": true\n                        },\n                        \"store\": true,\n                        \"subject\": \"${subject}\",\n                        \"to\": [\n                            \"${to}\"\n                        ]\n                    },\n                    \"tag\": \"58-sendEmail-custom-tag\"\n                },\n                {\n                    \"attemptResult\": {\n                        \"description\": \"\",\n                        \"readyAt\": \"\",\n                        \"status\": \"success\",\n                        \"stickyDisplay\": false,\n                        \"waitBetweenRetries\": \"\"\n                    },\n                    \"break\": true,\n                    \"tag\": \"45-attemptResult-custom-tag\"\n                }\n            ]\n        },\n        \"tag\": \"43-if-custom-tag\"\n    },\n    {\n        \"attemptResult\": {\n            \"description\": \"\",\n            \"readyAt\": \"\",\n            \"status\": \"abandoned\",\n            \"stickyDisplay\": false,\n            \"waitBetweenRetries\": \"\"\n        },\n        \"break\": true,\n        \"tag\": \"46-attemptResult-custom-tag\"\n    }\n]",
    "id": "1840",
    "createdAt": "1725530490488",
    "createdBy": {
        "id": "11007",
        "name": "olesya"
    },
    "updatedAt": "1725536124125",
    "updatedBy": {
        "id": "11007",
        "name": "olesya"
    },
    "name": "Processing and Reply to Email"
}