{
  "flow": [
    {
      "id": 1,
      "mapper": {},
      "module": "tally:watchNewResponse",
      "version": 1,
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        },
        "interface": [
          {
            "name": "eventId",
            "type": "text",
            "label": "Event ID"
          },
          {
            "name": "responseId",
            "type": "text",
            "label": "Response ID"
          },
          {
            "name": "submissionId",
            "type": "text",
            "label": "Submission ID"
          },
          {
            "name": "respondentId",
            "type": "text",
            "label": "Respondent ID"
          },
          {
            "name": "formId",
            "type": "text",
            "label": "Form ID"
          },
          {
            "name": "formName",
            "type": "text",
            "label": "Form Name"
          },
          {
            "name": "createdAt",
            "type": "date",
            "label": "Created at"
          },
          {
            "name": "submissionPdfUrl",
            "type": "url",
            "label": "Submission PDF URL"
          },
          {
            "name": "submissionPreviewUrl",
            "type": "url",
            "label": "Submission Preview URL"
          },
          {
            "name": "fields",
            "spec": [
              {
                "name": "שם מלא",
                "type": "text"
              },
              {
                "name": "מייל",
                "type": "email"
              },
              {
                "name": "טלפון",
                "type": "text"
              }
            ],
            "type": "collection",
            "label": "Fields"
          },
          {
            "name": "fieldsById",
            "spec": [
              {
                "name": "question_zQ52k0",
                "type": "text",
                "label": "שם מלא"
              },
              {
                "name": "question_5qP8JE",
                "type": "email",
                "label": "מייל"
              },
              {
                "name": "question_d2eKOK",
                "type": "text",
                "label": "טלפון"
              }
            ],
            "type": "collection",
            "label": "Fields by ID"
          }
        ],
        "parameters": [
          {
            "name": "__IMTHOOK__",
            "type": "hook:tally",
            "label": "Webhook",
            "required": true
          }
        ]
      },
      "parameters": {
        "__IMTHOOK__": null
      }
    },
    {
      "id": 2,
      "mapper": {
        "from": "drive",
        "mode": "select",
        "values": {
          "0": "{{1.createdAt}}",
          "1": "{{1.fields.`שם מלא`}}",
          "2": "{{1.fields.`מייל`}}",
          "3": "{{1.fields.`טלפון`}}"
        },
        "sheetId": "",
        "spreadsheetId": "",
        "includesHeaders": true,
        "insertDataOption": "INSERT_ROWS",
        "useColumnHeaders": false,
        "valueInputOption": "USER_ENTERED",
        "insertUnformatted": false
      },
      "module": "google-sheets:addRow",
      "version": 2,
      "metadata": {
        "expect": [
          {
            "name": "mode",
            "type": "select",
            "label": "Search Method",
            "required": true,
            "validate": {
              "enum": [
                "select",
                "fromAll",
                "map"
              ]
            }
          },
          {
            "name": "insertUnformatted",
            "type": "boolean",
            "label": "Unformatted",
            "required": true
          },
          {
            "name": "valueInputOption",
            "type": "select",
            "label": "Value input option",
            "required": true,
            "validate": {
              "enum": [
                "USER_ENTERED",
                "RAW"
              ]
            }
          },
          {
            "name": "insertDataOption",
            "type": "select",
            "label": "Insert data option",
            "validate": {
              "enum": [
                "INSERT_ROWS",
                "OVERWRITE"
              ]
            }
          },
          {
            "name": "from",
            "type": "select",
            "label": "Drive",
            "required": true,
            "validate": {
              "enum": [
                "drive",
                "share",
                "team"
              ]
            }
          },
          {
            "name": "spreadsheetId",
            "type": "file",
            "label": "Spreadsheet Name",
            "required": true
          },
          {
            "name": "sheetId",
            "type": "select",
            "label": "Sheet Name",
            "required": true
          },
          {
            "name": "includesHeaders",
            "type": "select",
            "label": "Table contains headers",
            "required": true,
            "validate": {
              "enum": [
                true,
                false
              ]
            }
          },
          {
            "name": "useColumnHeaders",
            "type": "select",
            "label": "Use column headers as IDs of the columns",
            "required": true,
            "validate": {
              "enum": [
                true,
                false
              ]
            }
          },
          {
            "name": "values",
            "spec": [
              {
                "name": "0",
                "type": "text",
                "label": "תאריך (A)"
              },
              {
                "name": "1",
                "type": "text",
                "label": "שם (B)"
              },
              {
                "name": "2",
                "type": "text",
                "label": "מייל (C)"
              },
              {
                "name": "3",
                "type": "text",
                "label": "טלפון (D)"
              },
              {
                "name": "4",
                "type": "text",
                "label": "(E)"
              },
              {
                "name": "5",
                "type": "text",
                "label": "(F)"
              },
              {
                "name": "6",
                "type": "text",
                "label": "(G)"
              },
              {
                "name": "7",
                "type": "text",
                "label": "(H)"
              },
              {
                "name": "8",
                "type": "text",
                "label": "(I)"
              },
              {
                "name": "9",
                "type": "text",
                "label": "(J)"
              },
              {
                "name": "10",
                "type": "text",
                "label": "(K)"
              },
              {
                "name": "11",
                "type": "text",
                "label": "(L)"
              },
              {
                "name": "12",
                "type": "text",
                "label": "(M)"
              },
              {
                "name": "13",
                "type": "text",
                "label": "(N)"
              },
              {
                "name": "14",
                "type": "text",
                "label": "(O)"
              },
              {
                "name": "15",
                "type": "text",
                "label": "(P)"
              },
              {
                "name": "16",
                "type": "text",
                "label": "(Q)"
              },
              {
                "name": "17",
                "type": "text",
                "label": "(R)"
              },
              {
                "name": "18",
                "type": "text",
                "label": "(S)"
              },
              {
                "name": "19",
                "type": "text",
                "label": "(T)"
              },
              {
                "name": "20",
                "type": "text",
                "label": "(U)"
              },
              {
                "name": "21",
                "type": "text",
                "label": "(V)"
              },
              {
                "name": "22",
                "type": "text",
                "label": "(W)"
              },
              {
                "name": "23",
                "type": "text",
                "label": "(X)"
              },
              {
                "name": "24",
                "type": "text",
                "label": "(Y)"
              },
              {
                "name": "25",
                "type": "text",
                "label": "(Z)"
              }
            ],
            "type": "collection",
            "label": "Values in columns",
            "metadata": [
              [
                [
                  "תאריך",
                  "שם",
                  "מייל",
                  "טלפון"
                ]
              ]
            ]
          }
        ],
        "designer": {
          "x": 300,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:google",
            "label": "Connection",
            "required": true
          }
        ]
      },
      "parameters": {
        "__IMTCONN__": null
      }
    },
    {
      "id": 3,
      "mapper": {
        "to": [
          "{{1.fields.`מייל`}}"
        ],
        "content": "שלום {{1.fields.`שם מלא`}}, קיבלנו את הפרטים שלך ונחזור אליך בהקדם. צוות עסק לדוגמה",
        "subject": "תודה שפנית לעסק לדוגמה",
        "bodyType": "rawHtml"
      },
      "module": "google-email:sendAnEmail",
      "version": 4,
      "metadata": {
        "expect": [
          {
            "name": "to",
            "spec": {
              "name": "value",
              "type": "email",
              "label": "Recipient email address",
              "required": true,
              "validate": true
            },
            "type": "array",
            "label": "To",
            "required": true
          },
          {
            "name": "subject",
            "type": "text",
            "label": "Subject"
          },
          {
            "name": "bodyType",
            "type": "select",
            "label": "Body type",
            "required": true,
            "validate": {
              "enum": [
                "rawHtml",
                "collection"
              ]
            }
          },
          {
            "name": "attachments",
            "spec": {
              "name": "value",
              "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": "collection",
              "label": "Attachment"
            },
            "type": "array",
            "label": "Attachments"
          },
          {
            "name": "from",
            "type": "select",
            "label": "From"
          },
          {
            "name": "cc",
            "spec": {
              "name": "value",
              "type": "email",
              "label": "Recipient email address"
            },
            "type": "array",
            "label": "CC recipients"
          },
          {
            "name": "bcc",
            "spec": {
              "name": "value",
              "type": "email",
              "label": "Recipient email address"
            },
            "type": "array",
            "label": "BCC recipients"
          },
          {
            "name": "emailHeaders",
            "spec": {
              "name": "value",
              "spec": [
                {
                  "name": "key",
                  "type": "text",
                  "label": "Key",
                  "required": true
                },
                {
                  "name": "value",
                  "type": "text",
                  "label": "Value"
                }
              ],
              "type": "collection",
              "label": "Email header"
            },
            "type": "array",
            "label": "Additional email headers"
          },
          {
            "name": "content",
            "type": "text",
            "label": "Content"
          }
        ],
        "designer": {
          "x": 600,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:google-email",
            "label": "Connection",
            "required": true
          }
        ]
      },
      "parameters": {
        "__IMTCONN__": null
      }
    },
    {
      "id": 4,
      "mapper": {
        "text": "ליד חדש: {{1.fields.`שם מלא`}} · טלפון: {{1.fields.`טלפון`}}",
        "chatId": "",
        "parseMode": "",
        "replyMarkup": "",
        "messageThreadId": "",
        "replyToMessageId": "",
        "replyMarkupAssembleType": "reply_markup_enter"
      },
      "module": "telegram:SendReplyMessage",
      "version": 1,
      "metadata": {
        "expect": [
          {
            "name": "chatId",
            "type": "text",
            "label": "Chat ID",
            "required": true
          },
          {
            "name": "text",
            "type": "text",
            "label": "Text",
            "required": true
          },
          {
            "name": "messageThreadId",
            "type": "number",
            "label": "Message Thread ID"
          },
          {
            "name": "parseMode",
            "type": "select",
            "label": "Parse Mode",
            "validate": {
              "enum": [
                "Markdown",
                "HTML"
              ]
            }
          },
          {
            "name": "disableNotification",
            "type": "boolean",
            "label": "Disable Notifications"
          },
          {
            "name": "disableWebPagePreview",
            "type": "boolean",
            "label": "Disable Link Previews"
          },
          {
            "name": "replyToMessageId",
            "type": "number",
            "label": "Original Message ID"
          },
          {
            "name": "replyMarkupAssembleType",
            "type": "select",
            "label": "Enter/Assemble the Reply Markup Field",
            "validate": {
              "enum": [
                "reply_markup_enter",
                "reply_markup_assemble"
              ]
            }
          },
          {
            "name": "replyMarkup",
            "type": "text",
            "label": "Reply Markup"
          }
        ],
        "designer": {
          "x": 900,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:telegram",
            "label": "Connection",
            "required": true
          }
        ]
      },
      "parameters": {
        "__IMTCONN__": null
      }
    }
  ],
  "name": "ליד מטופס: גיליון, מייל תודה והתראה בטלגרם",
  "metadata": {
    "instant": true,
    "version": 1,
    "designer": {
      "orphans": []
    },
    "scenario": {
      "dlq": false,
      "slots": null,
      "dataloss": false,
      "maxErrors": 3,
      "autoCommit": true,
      "roundtrips": 1,
      "sequential": false,
      "confidential": false,
      "freshVariables": false,
      "autoCommitTriggerLast": true
    }
  }
}
