{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "4069FA2D-6616-4A9D-9509-D27D0AB42160",
    "name": "Dovetail: survey answers in, recruits by a person"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -43.92370572207085,
        "y": 9.482288828337872,
        "zoom": 0.76
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When the NPS survey in Tally gets a response, an AI step reads the name, email, score, plan and written answer. The answer goes to a Dovetail dataset as one data point, with the score and plan as metadata and the respondent's email attached. A score of 6 or lower is posted to the CX channel in Slack with two buttons; the CX lead decides whether to invite the respondent to a research interview. A yes adds them to Dovetail's contacts with their plan and score; either answer is noted in the Slack thread.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a Tally NPS survey gets a response, sends the open-text answer to a Dovetail dataset with the score and plan. A score of 6 or lower goes to the CX channel in Slack, where the CX lead decides whether to invite the respondent to a research interview; a yes adds them to Dovetail's contacts.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Write the question for the CX lead Result"
          },
          "position": {
            "x": 1573,
            "y": 219
          }
        },
        "flowElementId": "1BC0F671-FECD-4991-AC8D-E761A5F811EF",
        "groupId": null,
        "id": "CAA44D98-D5E6-4EBF-8C63-6E427D356ACC",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "email",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "score",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "score",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "plan",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "plan",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answer",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "answer",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "formName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New survey response",
                    "subPathSegments": [
                      {
                        "key": "formName",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "answerLink",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Answer link",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Answer link"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "executionId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_ID",
                    "label": null,
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.executionId",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "executionId",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst who = [name, email].filter(Boolean).join(', ') || 'an anonymous respondent';\nconst quoted = String(answer || '').trim().replace(/\\n/g, '\\n> ');\nconst lines = [\n  `*NPS ${score} from ${who}*`,\n  plan ? `Plan: ${plan}` : null,\n  quoted ? `> ${quoted}` : null,\n  `The answer is in Dovetail (sent from ${formName}). Invite this respondent to a research interview?`,\n].filter(Boolean);\nreturn {\n  text: `NPS ${score} from ${who}: invite to a research interview?`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Invite to an interview' }, url: link('invite') },\n      { type: 'button', text: { type: 'plain_text', text: 'Not this one' }, url: link('pass') },\n    ] },\n  ],\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Write the question for the CX lead",
        "nextElementIds": [
          "31FBF389-F0AF-4F9C-9A62-807E4B46730F"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends one piece of customer feedback to a dataset of an API source, whether or not a channel subscribes to it yet. Each data point uses 1 workspace credit.",
          "elementId": "EXTENSION:::SHARED:::default:::dovetail:::createDatasetDataPoint",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Send the answer to Dovetail Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dovetail:::createDatasetDataPoint",
          "legacyElementId": null,
          "methodName": "createDatasetDataPoint",
          "position": {
            "x": 1221,
            "y": 40
          }
        },
        "flowElementId": "56755010-FCD6-4A40-BB63-B215DCCA5F49",
        "groupId": null,
        "id": "65064755-DB90-4791-922F-8E0ADB3215A4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "datasetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Dataset ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Dataset ID"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "text",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "answer",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "timestamp",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New survey response",
                    "subPathSegments": [
                      {
                        "key": "createdAt",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "email",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sourceTitle",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New survey response",
                    "subPathSegments": [
                      {
                        "key": "formName",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sourceUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "metadata",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "metadata",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Send the answer to Dovetail', Error: The placeholder \"Dataset ID\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createDatasetDataPoint",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Data point",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dovetail",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Send the answer to Dovetail",
        "nextElementIds": [
          "574A75C3-307C-47ED-8985-8BF2C9646F6C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm the invitation in the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 823,
            "y": 380
          }
        },
        "flowElementId": "EA9462ED-6791-4059-8847-FE77BDF981D0",
        "groupId": null,
        "id": "825700BC-E052-4CFA-B459-37B8E5930F6C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Added "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " ("
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "email",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ") to Dovetail's contacts for a research interview, with their plan and score. <"
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "New contact",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "url",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "6437FA58-2FD6-4998-8698-07C2211273F4"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "|Open the contact>"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to CX lead",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "31FBF389-F0AF-4F9C-9A62-807E4B46730F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Invitation note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the invitation in the thread",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 841,
            "y": 219
          }
        },
        "flowElementId": "89B18592-4684-440B-9CD8-30DF38F1D3C5",
        "groupId": null,
        "id": "440D0B34-0AB3-4B4E-9E6A-4D6B2AA58432",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "CX decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the CX lead's answer",
        "nextElementIds": [
          "37BA9C70-10F9-4E8C-BCD0-D2057246B6CA"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 485,
            "y": 219
          }
        },
        "flowElementId": "D9FC1556-DEFF-4C74-ACDC-F1478EC0A442",
        "groupId": null,
        "id": "37BA9C70-10F9-4E8C-BCD0-D2057246B6CA",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "06551e5b-2f4d-4b9f-bd53-e150e01252b3",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "CX decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "440D0B34-0AB3-4B4E-9E6A-4D6B2AA58432"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "invite"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "06551e5b-2f4d-4b9f-bd53-e150e01252b3"
            ]
          },
          "elseComponent": {
            "componentId": "F7516F81-FD04-46AB-921A-6C3946E6546C",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Invite to an interview",
          "storeResult": false,
          "thenComponent": {
            "componentId": "6437FA58-2FD6-4998-8698-07C2211273F4",
            "componentType": "ELEMENT"
          }
        },
        "name": "Invite to an interview?",
        "nextElementIds": [
          "F7516F81-FD04-46AB-921A-6C3946E6546C",
          "6437FA58-2FD6-4998-8698-07C2211273F4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Note the pass in the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 110,
            "y": 210
          }
        },
        "flowElementId": "71016789-E959-48AD-908F-63F40631C71D",
        "groupId": null,
        "id": "F7516F81-FD04-46AB-921A-6C3946E6546C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "No interview invitation for "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". The answer stays in the Dovetail dataset."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to CX lead",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "31FBF389-F0AF-4F9C-9A62-807E4B46730F"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Pass note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Note the pass in the thread",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the response Result"
          },
          "tools": {},
          "position": {
            "x": 872,
            "y": 49
          }
        },
        "flowElementId": "C767AF17-4BCA-491A-8F47-A676E8456E6E",
        "groupId": null,
        "id": "1B291C3C-F42C-4192-A035-BACB0B29849B",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Survey reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read NPS survey responses submitted through a Tally form. From the submission's fields, reply with JSON only, with these fields:\nname: the respondent's name, or empty text if the form does not ask for it\nemail: the respondent's email address, or empty text\nscore: the NPS score as a number from 0 to 10, or null if there is none\nplan: the respondent's plan or tier exactly as written, or empty text\nanswer: the open-text answer in the respondent's own words, unchanged. If there is no written answer, use the text: Score only, no written answer.\nmetadata: an object with the keys plan (text) and score (number), the same values as above. Leave out a key whose value is missing."
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Form: "
              },
              {
                "id": "RESULT",
                "label": "New survey response",
                "subPathSegments": [
                  {
                    "key": "formName",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSubmitted: "
              },
              {
                "id": "RESULT",
                "label": "New survey response",
                "subPathSegments": [
                  {
                    "key": "createdAt",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nFields of the submission:\n"
              },
              {
                "id": "RESULT",
                "label": "New survey response",
                "subPathSegments": [
                  {
                    "key": "fields",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the response",
        "nextElementIds": [
          "65064755-DB90-4791-922F-8E0ADB3215A4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1619,
            "y": 49
          }
        },
        "flowElementId": "54184D11-45E9-4AD3-9636-7044D62B1548",
        "groupId": null,
        "id": "574A75C3-307C-47ED-8985-8BF2C9646F6C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "a4cc52c3-b5c1-4a0e-88bc-970d4b508c7b",
                "nestedOperation": null,
                "operation": "<=",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Survey reading",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "score",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "INT",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 6
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "a4cc52c3-b5c1-4a0e-88bc-970d4b508c7b"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Score 6 or lower",
          "storeResult": false,
          "thenComponent": {
            "componentId": "CAA44D98-D5E6-4EBF-8C63-6E427D356ACC",
            "componentType": "ELEMENT"
          }
        },
        "name": "Score 6 or lower?",
        "nextElementIds": [
          "CAA44D98-D5E6-4EBF-8C63-6E427D356ACC"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the CX lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1247,
            "y": 210
          }
        },
        "flowElementId": "68B3DA31-875B-4CB4-8543-21CDA8D7E1B9",
        "groupId": null,
        "id": "31FBF389-F0AF-4F9C-9A62-807E4B46730F",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CAA44D98-D5E6-4EBF-8C63-6E427D356ACC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "CAA44D98-D5E6-4EBF-8C63-6E427D356ACC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Question to CX lead",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the CX lead",
        "nextElementIds": [
          "440D0B34-0AB3-4B4E-9E6A-4D6B2AA58432"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a person in the contacts database, such as an interview participant or customer, with optional custom fields.",
          "elementId": "EXTENSION:::SHARED:::default:::dovetail:::createContact",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add them to Dovetail contacts Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dovetail:::createContact",
          "legacyElementId": null,
          "methodName": "createContact",
          "position": {
            "x": 456,
            "y": 380
          }
        },
        "flowElementId": "2476367D-5903-464A-A7BF-DE25B6B45909",
        "groupId": null,
        "id": "6437FA58-2FD6-4998-8698-07C2211273F4",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "name",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "name",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Survey reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "email",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fields",
              "type": "COMPLEX_LIST",
              "value": [
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "label",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "Plan"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "value",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Survey reading",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "plan",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                },
                {
                  "type": "OBJECT",
                  "value": [
                    {
                      "name": "label",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "NPS score"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "value",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "ELEMENT_RESULT",
                            "label": "Survey reading",
                            "subPathSegments": [
                              {
                                "key": "output",
                                "optional": false
                              },
                              {
                                "key": "score",
                                "optional": false
                              }
                            ],
                            "type": "ELEMENT_LINK",
                            "value": "1B291C3C-F42C-4192-A035-BACB0B29849B"
                          }
                        ],
                        "mode": "EXPRESSION",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    },
                    {
                      "name": "type",
                      "type": "SIMPLE",
                      "value": {
                        "expression": [
                          {
                            "id": "TEXT",
                            "label": null,
                            "type": "INPUT",
                            "value": "NUMBER"
                          }
                        ],
                        "mode": "BASIC",
                        "parseJsonString": false,
                        "resultType": null
                      }
                    }
                  ]
                }
              ]
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createContact",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New contact",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dovetail",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Add them to Dovetail contacts",
        "nextElementIds": [
          "825700BC-E052-4CFA-B459-37B8E5930F6C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Fires in real time when the selected Tally form receives a new submission. Tally registers a webhook for the form and this trigger runs your flow with the raw submission data: responseId, submissionId, respondentId, formId, formName, createdAt, the raw fields array (each with key, label, type, and value), plus a flattened values map keyed by field label for easy access to answers.",
          "elementId": "EXTENSION:::SHARED:::default:::tally:::onNewSubmission",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::tally:::onNewSubmission",
          "legacyElementId": "JS###v1###Tally###onNewSubmission",
          "methodName": "onNewSubmission",
          "position": {
            "x": 486,
            "y": 40
          }
        },
        "flowElementId": "11A3B18B-C0C5-4919-ACD1-F7472D30EF37",
        "groupId": null,
        "id": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": "Block: 'New survey response', Error: Form is required",
            "valid": false
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onNewSubmission",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New survey response",
          "scope": "SINGLE_APP",
          "serviceId": "tally",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "New survey response",
        "nextElementIds": [
          "1B291C3C-F42C-4192-A035-BACB0B29849B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      }
    ],
    "firstElementId": "9A2D4DDE-8735-4DC2-A2BC-3D99DFA9FF4C",
    "groups": [],
    "id": "899DCD6C-E93C-4A4C-A75F-FAA7C744A116",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
      "executionStaticData": [
        {
          "description": "The Anthropic key the AI step uses to read each survey response.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the CX lead's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The Dovetail dataset the answers go to. Copy it from the API source's settings in Dovetail.",
          "error": null,
          "name": "Dataset ID",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-12-02T08:42:25.751Z"
}
