{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "1FC1572C-8023-477D-AF2F-7AC6A8328B7D",
    "name": "Dittofeed: CRM audience to approved broadcast"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -33.40324118207816,
        "y": -46.74928503336511,
        "zoom": 0.67
      },
      "autoSave": false,
      "descriptions": {
        "flow": "A marketer asks in Slack for a broadcast to a HubSpot audience. The flow loads the matching contacts into self-hosted Dittofeed, checks them against recent email bounces, and asks the marketing lead in the thread to send, send without the bounced addresses, or hold. Only a send answer triggers the Dittofeed broadcast.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "A marketer asks in Slack for a broadcast to a HubSpot audience. The flow loads the matching contacts into self-hosted Dittofeed, checks them against recent email bounces, and asks the marketing lead in the thread to send, send without the bounced addresses, or hold. Only a send answer triggers the Dittofeed broadcast.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "contacts": "f0077d07-8696-44df-9bb0-526c2f12a034",
            "after": "581d1973-9303-4c34-b26b-299660a46e80",
            "more": "9ee61525-f597-4175-a638-defa8c86a60a"
          },
          "position": {
            "x": 789,
            "y": 49
          }
        },
        "flowElementId": "67B05A77-3881-4158-842D-23DB8D689D4A",
        "groupId": "8BC534F9-CFDE-4F5E-85C0-010E79F0EEED",
        "id": "09D2BA86-3C1F-4A29-9567-B23FC104A7A4",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "contacts",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Page added",
                    "subPathSegments": [
                      {
                        "key": "contacts",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1D996D18-8B72-4EA2-8C4A-3F3CB5AB10B9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "after",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Page added",
                    "subPathSegments": [
                      {
                        "key": "after",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1D996D18-8B72-4EA2-8C4A-3F3CB5AB10B9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "more",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Page added",
                    "subPathSegments": [
                      {
                        "key": "more",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1D996D18-8B72-4EA2-8C4A-3F3CB5AB10B9"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "keep",
          "storeResult": true
        },
        "name": "Keep the list",
        "nextElementIds": [],
        "nextGroupIds": [],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "notes": "Finds contacts whose properties meet the conditions you set, such as a lead status, a lifecycle stage or a date property before or after a moment, using HubSpot's CRM search. Conditions in Filters must all be met; each Filter Group is an alternative. Returns up to 200 contacts per call, with a cursor for the next page; HubSpot stops a search at 10,000 results, and a contact created or changed in the last few moments may not be found yet.",
          "elementId": "EXTENSION:::SHARED:::default:::hubspot:::searchContactsByProperty",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the contacts in HubSpot Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::hubspot:::searchContactsByProperty",
          "legacyElementId": "JS###v1###HubSpotService###searchContactsByProperty",
          "methodName": "searchContactsByProperty",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "5AA8CCE1-6692-49CB-A7B5-1CDAB2FF4114",
        "groupId": "8BC534F9-CFDE-4F5E-85C0-010E79F0EEED",
        "id": "C50E3343-BBE2-41F5-89C0-017B1E88DFD7",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "properties",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "email"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "firstname"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "lastname"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                {
                  "expression": [
                    {
                      "id": "PLACEHOLDER_DATA",
                      "label": "Dittofeed user ID property",
                      "subPathSegments": null,
                      "type": "EXECUTION_CONTEXT_STATIC_DATA",
                      "value": "Dittofeed user ID property"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "filters",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Request",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "filters",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "filterGroups",
              "type": "COMPLEX_LIST",
              "value": []
            },
            {
              "name": "query",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortBy",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sortDirection",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 200
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "after",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - after",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.after",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "after",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Find the contacts in HubSpot', Error: OAuth Connection is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "searchContactsByProperty",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Contact page",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "hubspot",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the contacts in HubSpot",
        "nextElementIds": [
          "1D996D18-8B72-4EA2-8C4A-3F3CB5AB10B9"
        ],
        "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": "Ask for the missing details Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1571,
            "y": 130
          }
        },
        "flowElementId": "FC545343-A575-4DD3-AF56-20B8AA9BA003",
        "groupId": null,
        "id": "FF48251A-DC67-4936-8C5E-236C47B05F6B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "channel",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Request",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "question",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "ts",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "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": "Missing details reply",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask for the missing details",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a broadcast from a segment definition and a message template definition and sends it right away (POST /api/admin/broadcasts/execute). The easiest way to get both definitions is to build the broadcast in the Dittofeed dashboard and copy it as a cURL request.",
          "elementId": "EXTENSION:::SHARED:::default:::dittofeed:::executeBroadcast",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create and trigger the broadcast Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dittofeed:::executeBroadcast",
          "legacyElementId": null,
          "methodName": "executeBroadcast",
          "position": {
            "x": 1158,
            "y": 770
          }
        },
        "flowElementId": "ACF275A6-63E4-4AC2-826A-B774DF5E3919",
        "groupId": null,
        "id": "A9F3F32F-9DA1-4AE3-9EF6-175BD6D9047E",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "broadcastName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Audience",
                    "subPathSegments": [
                      {
                        "key": "broadcastName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "segmentDefinition",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Chosen audience",
                    "subPathSegments": [
                      {
                        "key": "segment",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B549A8E-BE42-4EE6-9C89-268F2471663B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageTemplateDefinition",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Audience",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subscriptionGroupId",
              "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": "executeBroadcast",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Broadcast",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dittofeed",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create and trigger the broadcast",
        "nextElementIds": [
          "E371D946-F689-4C86-B58C-B2C36BEEE6EF"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 497,
            "y": 439
          }
        },
        "flowElementId": "79E42742-EB2F-43CD-91CF-F20671ADF9A3",
        "groupId": null,
        "id": "531A1D8C-1775-44F1-8FE5-81A7054A63C0",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "79170e16-0d90-4d02-a780-5adda36fc963",
                "nestedOperation": null,
                "operation": ">",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Audience",
                      "subPathSegments": [
                        {
                          "key": "total",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "INT",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "NUMBER",
                        "label": null,
                        "type": "INPUT",
                        "value": 0
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "79170e16-0d90-4d02-a780-5adda36fc963"
            ]
          },
          "elseComponent": {
            "componentId": "A6D53613-FB37-4EB2-BDDE-70D89FD6683C",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Contacts found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "0120C7BF-0EC3-45D2-B62E-BC688374D647",
            "componentType": "GROUP"
          }
        },
        "name": "Contacts found?",
        "nextElementIds": [
          "A6D53613-FB37-4EB2-BDDE-70D89FD6683C"
        ],
        "nextGroupIds": [
          "0120C7BF-0EC3-45D2-B62E-BC688374D647"
        ],
        "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": "Report no matching contacts Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 110,
            "y": 430
          }
        },
        "flowElementId": "C1E4C010-2D9D-487E-9EFF-2927ECB1BCC3",
        "groupId": null,
        "id": "A6D53613-FB37-4EB2-BDDE-70D89FD6683C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "channel",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "No HubSpot contacts with an email address matched "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Request",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "audienceDescription",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ". Nothing was loaded into Dittofeed or sent."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "ts",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "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": "No match reply",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Report no matching contacts",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add the page to the list Result"
          },
          "position": {
            "x": 469,
            "y": 49
          }
        },
        "flowElementId": "82FC005B-316E-4C27-883A-6EA7CCE24F2B",
        "groupId": "8BC534F9-CFDE-4F5E-85C0-010E79F0EEED",
        "id": "1D996D18-8B72-4EA2-8C4A-3F3CB5AB10B9",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "pageResult",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Contact page",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "C50E3343-BBE2-41F5-89C0-017B1E88DFD7"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "contacts",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - contacts",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.contacts",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "contacts",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(contacts) ? contacts : [];\nconst results = (pageResult && pageResult.results) || [];\nconst next = pageResult && pageResult.paging && pageResult.paging.next && pageResult.paging.next.after;\nreturn {\n  contacts: list.concat(results.map(r => ({ id: r.id, properties: r.properties || {} }))),\n  after: next ? String(next) : '',\n  more: Boolean(next),\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Page added",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Add the page to the list",
        "nextElementIds": [
          "09D2BA86-3C1F-4A29-9567-B23FC104A7A4"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Build the audience Result"
          },
          "position": {
            "x": 835,
            "y": 439
          }
        },
        "flowElementId": "FC2D0BC8-E5A9-4871-A35A-92B42706B6E1",
        "groupId": null,
        "id": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Build the audience', Error: The placeholder \"Broadcast messages\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "contacts",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - contacts",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.contacts",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "contacts",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bounceEvents",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Bounce events",
                    "subPathSegments": [
                      {
                        "key": "events",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "634A89AC-F089-4D9B-AB2C-7BF132FE7B43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "request",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Request",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messages",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Broadcast messages",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Broadcast messages"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "idProp",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Dittofeed user ID property",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Dittofeed user ID property"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "lead",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Marketing lead Slack ID",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Marketing lead Slack ID"
                  }
                ],
                "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 DAY = 24 * 60 * 60 * 1000;\nconst since = Date.now() - 90 * DAY;\nconst toMs = t => {\n  const s = String(t || '').trim().replace(' ', 'T');\n  if (!s) return 0;\n  const ms = Date.parse(/Z|[+-]\\d\\d:?\\d\\d$/.test(s) ? s : s + 'Z');\n  return isNaN(ms) ? 0 : ms;\n};\n\nconst bounced = new Set();\nfor (const e of (bounceEvents || [])) {\n  if (toMs(e.processingTime || e.eventTime) < since) continue;\n  let traits = {};\n  try {\n    traits = typeof e.traits === 'string' ? JSON.parse(e.traits || '{}') : (e.traits || {});\n  } catch (err) {\n    traits = {};\n  }\n  const email = String(traits.email || '').trim().toLowerCase();\n  if (email) bounced.add(email);\n}\n\nconst name = String(request.broadcastName || 'Broadcast').trim();\nconst key = `${name} ${String(executionId).slice(0, 8)}`;\nconst bouncedKey = `${key} (bounced)`;\nconst prop = String(idProp || 'email').trim();\n\nconst seen = new Set();\nconst entries = [];\nconst bouncedList = [];\nfor (const c of (contacts || [])) {\n  const p = c.properties || {};\n  const email = String(p.email || '').trim().toLowerCase();\n  if (!email || seen.has(email)) continue;\n  seen.add(email);\n  const userId = prop === 'email' ? email : (String(p[prop] || '').trim() || email);\n  const hasBounced = bounced.has(email);\n  if (hasBounced) bouncedList.push(email);\n  entries.push({\n    type: 'identify',\n    userId,\n    traits: {\n      email,\n      firstName: p.firstname || '',\n      lastName: p.lastname || '',\n      broadcastAudience: hasBounced ? bouncedKey : key,\n    },\n  });\n}\n\nconst batches = [];\nfor (let i = 0; i < entries.length; i += 500) batches.push(entries.slice(i, i + 500));\n\nconst trait = (id, value) => ({ type: 'Trait', id, path: 'broadcastAudience', operator: { type: 'Equals', value } });\nconst segments = {\n  clean: { entryNode: trait('audience', key), nodes: [] },\n  all: {\n    entryNode: { type: 'Or', id: 'everyone', children: ['audience', 'bounced'] },\n    nodes: [trait('audience', key), trait('bounced', bouncedKey)],\n  },\n};\n\nconst total = entries.length;\nconst b = bouncedList.length;\nconst link = decision => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst shown = bouncedList.slice(0, 10).join(', ') + (b > 10 ? `, and ${b - 10} more` : '');\nconst lines = [\n  `${lead ? `<@${lead}> ` : ''}*Ready to broadcast \"${request.messageName}\"*`,\n  `Audience: ${total} contacts from HubSpot (${request.audienceDescription}), now in Dittofeed.`,\n  b ? `${b} of them had an email bounce in the last 90 days: ${shown}` : 'None of them had an email bounce in the last 90 days.',\n  `This goes to all of them now and cannot be recalled. ${b ? `Send, send without the ${b}, or hold?` : 'Send or hold?'}`,\n];\nconst buttons = [\n  { type: 'button', style: 'primary', text: { type: 'plain_text', text: `Send to all ${total}` }, url: link('all') },\n];\nif (b && b < total) {\n  buttons.push({ type: 'button', text: { type: 'plain_text', text: `Send without the ${b}` }, url: link('clean') });\n}\nbuttons.push({ type: 'button', style: 'danger', text: { type: 'plain_text', text: 'Hold' }, url: link('hold') });\n\nreturn {\n  broadcastName: key,\n  total,\n  bouncedCount: b,\n  batches,\n  segments,\n  message: messages[request.messageName],\n  card: {\n    text: `Ready to broadcast \"${request.messageName}\" to ${total} contacts`,\n    blocks: [\n      { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n      { type: 'actions', elements: buttons },\n    ],\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": "Audience",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Build the audience",
        "nextElementIds": [
          "531A1D8C-1775-44F1-8FE5-81A7054A63C0"
        ],
        "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": "Ask the marketing lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 826,
            "y": 600
          }
        },
        "flowElementId": "64C6E3F4-C5F9-4026-A46D-98B627799C48",
        "groupId": null,
        "id": "31C1A271-8F22-4575-8B42-846BFFD79188",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "channel",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Audience",
                    "subPathSegments": [
                      {
                        "key": "card",
                        "optional": false
                      },
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "ts",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "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": "Audience",
                    "subPathSegments": [
                      {
                        "key": "card",
                        "optional": false
                      },
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                  }
                ],
                "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 lead",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the marketing lead",
        "nextElementIds": [
          "E1515E07-BF53-4BA8-8C90-7EDC1510FBE3"
        ],
        "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 hold Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1928,
            "y": 600
          }
        },
        "flowElementId": "B6004101-682E-4925-AB64-8CFC93FAEB87",
        "groupId": null,
        "id": "B15515B8-A0FF-4BFD-A788-AFC28156E36A",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "channel",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Held. Nothing was sent. The "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Audience",
                    "subPathSegments": [
                      {
                        "key": "total",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " contacts are in Dittofeed, and no broadcast was created."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "ts",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "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": "Hold confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the hold",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1200,
            "y": 269
          }
        },
        "flowElementId": "031558ED-C66A-4C42-A694-20EE7EF8EEBF",
        "groupId": null,
        "id": "F0EF84BD-8E1F-4290-BE1E-4194D1523764",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Request clear?', Error: The placeholder \"Broadcast messages\" has no value",
            "valid": false
          },
          "condition": {
            "conditionParts": [
              {
                "id": "5e97ef42-81ad-49c2-8a74-fa029bc1020c",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Request",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "understood",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              },
              {
                "id": "198901cd-28f4-4d79-b6df-751feb8ad797",
                "nestedOperation": null,
                "operation": "arrayIsNotEmpty",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Request",
                      "subPathSegments": [
                        {
                          "key": "output",
                          "optional": false
                        },
                        {
                          "key": "filters",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "ARRAY",
                "values": []
              },
              {
                "id": "76138349-47bb-47a8-aa43-121834ebb5dc",
                "nestedOperation": null,
                "operation": "objectHasKey",
                "property": {
                  "expression": [
                    {
                      "id": "PLACEHOLDER_DATA",
                      "label": "Broadcast messages",
                      "subPathSegments": null,
                      "type": "EXECUTION_CONTEXT_STATIC_DATA",
                      "value": "Broadcast messages"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "OBJECT",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "ELEMENT_RESULT",
                        "label": "Request",
                        "subPathSegments": [
                          {
                            "key": "output",
                            "optional": false
                          },
                          {
                            "key": "messageName",
                            "optional": false
                          }
                        ],
                        "type": "ELEMENT_LINK",
                        "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "5e97ef42-81ad-49c2-8a74-fa029bc1020c",
              "AND",
              "198901cd-28f4-4d79-b6df-751feb8ad797",
              "AND",
              "76138349-47bb-47a8-aa43-121834ebb5dc"
            ]
          },
          "elseComponent": {
            "componentId": "FF48251A-DC67-4936-8C5E-236C47B05F6B",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Request clear",
          "storeResult": false,
          "thenComponent": {
            "componentId": "2BDEAE38-954F-4729-BC92-D4359098378C",
            "componentType": "ELEMENT"
          }
        },
        "name": "Request clear?",
        "nextElementIds": [
          "2BDEAE38-954F-4729-BC92-D4359098378C",
          "FF48251A-DC67-4936-8C5E-236C47B05F6B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "contacts": "f592ca8f-f5ce-40a0-9e95-8c615aad1459",
            "after": "db251fa0-5318-40d5-86aa-7e719bbe0097",
            "more": "e43faa94-52d2-4416-b122-f58f5efade7b"
          },
          "position": {
            "x": 1592,
            "y": 269
          }
        },
        "flowElementId": "142FAB7F-97A9-4581-A1C5-FE584280F279",
        "groupId": null,
        "id": "2BDEAE38-954F-4729-BC92-D4359098378C",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "contacts",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "JSON",
                    "label": null,
                    "parsedValue": [],
                    "type": "INPUT",
                    "value": "[]"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "after",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EMPTY_STRING",
                    "label": null,
                    "type": "KEYWORD",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "more",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "b0",
          "storeResult": true
        },
        "name": "Start the contact list",
        "nextElementIds": [],
        "nextGroupIds": [
          "8BC534F9-CFDE-4F5E-85C0-010E79F0EEED"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1592,
            "y": 609
          }
        },
        "flowElementId": "F2094DC8-7E6C-4051-B8C3-CDC727225B36",
        "groupId": null,
        "id": "0881ABD9-F6D6-4B0C-AB27-B8F1BD227306",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "cb235972-8288-4ccc-af9f-7e10a912a9d6",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Lead decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "E1515E07-BF53-4BA8-8C90-7EDC1510FBE3"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "all"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "1ed6d7ed-d7db-4ea7-90b8-3f1d4726c8b1",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Lead decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "E1515E07-BF53-4BA8-8C90-7EDC1510FBE3"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "clean"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "cb235972-8288-4ccc-af9f-7e10a912a9d6",
              "OR",
              "1ed6d7ed-d7db-4ea7-90b8-3f1d4726c8b1"
            ]
          },
          "elseComponent": {
            "componentId": "B15515B8-A0FF-4BFD-A788-AFC28156E36A",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Send it",
          "storeResult": false,
          "thenComponent": {
            "componentId": "8B549A8E-BE42-4EE6-9C89-268F2471663B",
            "componentType": "ELEMENT"
          }
        },
        "name": "Send it?",
        "nextElementIds": [
          "8B549A8E-BE42-4EE6-9C89-268F2471663B",
          "B15515B8-A0FF-4BFD-A788-AFC28156E36A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 1144,
            "y": 609
          }
        },
        "flowElementId": "D09A99AD-6F85-4CCF-9E5B-5FFE97643DE6",
        "groupId": null,
        "id": "E1515E07-BF53-4BA8-8C90-7EDC1510FBE3",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Lead decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the marketing lead's answer",
        "nextElementIds": [
          "0881ABD9-F6D6-4B0C-AB27-B8F1BD227306"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "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 send Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 835,
            "y": 770
          }
        },
        "flowElementId": "C08A94BA-48D0-4D5F-AA9D-7F7F0C5E5B7E",
        "groupId": null,
        "id": "E371D946-F689-4C86-B58C-B2C36BEEE6EF",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "channel",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Sent. Dittofeed is broadcasting \""
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Request",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      },
                      {
                        "key": "messageName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B8E6773-67ED-474C-805C-F6BC901B6445"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\" to "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Chosen audience",
                    "subPathSegments": [
                      {
                        "key": "count",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "8B549A8E-BE42-4EE6-9C89-268F2471663B"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " contacts as "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Broadcast",
                    "subPathSegments": [
                      {
                        "key": "broadcastName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A9F3F32F-9DA1-4AE3-9EF6-175BD6D9047E"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Request message",
                    "subPathSegments": [
                      {
                        "key": "ts",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
                  }
                ],
                "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": "Send confirmation",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the send",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Monitors Slack for user mentions and keywords to trigger AI workflows for automated responses, notifications, or personalized interactions. Perfect for building AI assistants that respond to mentions, keyword-based automation, or priority message handling.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::onMention",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-trigger",
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::onMention",
          "legacyElementId": "JS###v1###Slack###onMention",
          "methodName": "onMention",
          "position": {
            "x": 476,
            "y": 260
          }
        },
        "flowElementId": "9FFC5013-2F2F-419A-BA2E-56F00A35C9DD",
        "groupId": null,
        "id": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84",
        "metaInfo": {
          "callbackUrl": null,
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "eventName": "onMention",
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Request message",
          "scope": "ALL_APPS",
          "serviceId": "slack",
          "slaConditions": [],
          "staticData": {
            "checkWord": "broadcast"
          },
          "storeResult": true,
          "subtype": "REALTIME",
          "type": "CUSTOM"
        },
        "name": "Broadcast request in Slack",
        "nextElementIds": [
          "8B8E6773-67ED-474C-805C-F6BC901B6445"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the audience Result"
          },
          "position": {
            "x": 1592,
            "y": 779
          }
        },
        "flowElementId": "A33AD9F7-02A0-4A26-A335-3C55F00097A6",
        "groupId": null,
        "id": "8B549A8E-BE42-4EE6-9C89-268F2471663B",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "decision",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Lead decision",
                    "subPathSegments": [
                      {
                        "key": "decision",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "E1515E07-BF53-4BA8-8C90-7EDC1510FBE3"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "audience",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Audience",
                    "subPathSegments": null,
                    "type": "ELEMENT_LINK",
                    "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const clean = decision === 'clean';\nreturn {\n  segment: clean ? audience.segments.clean : audience.segments.all,\n  count: clean ? audience.total - audience.bouncedCount : audience.total,\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Chosen audience",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the audience",
        "nextElementIds": [
          "A9F3F32F-9DA1-4AE3-9EF6-175BD6D9047E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends several identify, track, page, screen and group calls in one request (POST /api/public/apps/batch). Each entry without a messageId gets a new UUID. Uses the Write Key.",
          "elementId": "EXTENSION:::SHARED:::default:::dittofeed:::sendBatch",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Identify the contacts in Dittofeed Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dittofeed:::sendBatch",
          "legacyElementId": null,
          "methodName": "sendBatch",
          "position": {
            "x": 110,
            "y": 400
          }
        },
        "flowElementId": "0047BE7E-769E-4F98-9851-581154912889",
        "groupId": "0120C7BF-0EC3-45D2-B62E-BC688374D647",
        "id": "F7778664-1080-4F92-99A1-287A6D49541C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "batch",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "0120C7BF-0EC3-45D2-B62E-BC688374D647"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "context",
              "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": "sendBatch",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Loaded batch",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dittofeed",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Identify the contacts in Dittofeed",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the request Result"
          },
          "tools": {},
          "position": {
            "x": 835,
            "y": 269
          }
        },
        "flowElementId": "324E53F7-364B-498C-BDB8-DF38D30498D3",
        "groupId": null,
        "id": "8B8E6773-67ED-474C-805C-F6BC901B6445",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": "Block: 'Read the request', Error: The placeholder \"Broadcast messages\" has no value",
            "valid": false
          },
          "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": "Request",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read a marketer's Slack request for a broadcast from Dittofeed to an audience defined in HubSpot. Reply with JSON only, with these fields:\nunderstood: true when the request names both the audience and one of the available messages, otherwise false\nbroadcastName: a short name for this broadcast, taken from the request, for example \"Pricing update, April\"\nmessageName: the available message the request asks for, written exactly as its key appears in the available messages; empty text if none matches\naudienceDescription: the audience in plain words, for example \"lifecycle stage customer, plan Growth\"\nfilters: the HubSpot contact search conditions for that audience, as a list of objects with propertyName (the internal HubSpot property name, such as lifecyclestage, hs_lead_status, country or a custom property), operator (one of EQ, NEQ, LT, LTE, GT, GTE, HAS_PROPERTY, NOT_HAS_PROPERTY, CONTAINS_TOKEN, NOT_CONTAINS_TOKEN) and value (text; leave it out for HAS_PROPERTY and NOT_HAS_PROPERTY). Use at most 6 conditions; a contact must meet all of them. Enumeration values such as lifecycle stages use HubSpot's internal values, for example customer or salesqualifiedlead. An empty list when the request does not say who the audience is.\nquestion: when understood is false, one short question back to the marketer saying what is missing and naming the available messages; otherwise empty text"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "Request from <@"
              },
              {
                "id": "RESULT",
                "label": "Request message",
                "subPathSegments": [
                  {
                    "key": "user",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ">:\n"
              },
              {
                "id": "RESULT",
                "label": "Request message",
                "subPathSegments": [
                  {
                    "key": "text",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\n\nAvailable messages (the keys of this JSON object are their names):\n"
              },
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Broadcast messages",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Broadcast messages"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the request",
        "nextElementIds": [
          "F0EF84BD-8E1F-4290-BE1E-4194D1523764"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Lists the events Dittofeed recorded, your own and its internal ones such as DFEmailBounced, newest first (GET /api/admin/events/). Page with Offset; count is the total that matches.",
          "elementId": "EXTENSION:::SHARED:::default:::dittofeed:::searchEvents",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check recent bounces Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::dittofeed:::searchEvents",
          "legacyElementId": null,
          "methodName": "searchEvents",
          "position": {
            "x": 1193,
            "y": 430
          }
        },
        "flowElementId": "48C88AA4-3219-4718-8F15-4A103F2ECEAA",
        "groupId": null,
        "id": "634A89AC-F089-4D9B-AB2C-7BF132FE7B43",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "event",
              "type": "SIMPLE_LIST",
              "value": [
                {
                  "expression": [
                    {
                      "id": "TEXT",
                      "label": null,
                      "type": "INPUT",
                      "value": "DFEmailBounced"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                }
              ]
            },
            {
              "name": "userId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "searchTerm",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "journeyId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 1000
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "offset",
              "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": "searchEvents",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Bounce events",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "dittofeed",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Check recent bounces",
        "nextElementIds": [
          "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "A71243A5-6AB5-48DD-A827-9DE1FFBFFD84",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": -360,
            "zoom": 1
          },
          "position": {
            "x": 468,
            "y": 609
          }
        },
        "flowElementId": "0DC15208-BEB5-4771-864C-1DB48CC0C8F8",
        "groupId": null,
        "id": "0120C7BF-0EC3-45D2-B62E-BC688374D647",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "F7778664-1080-4F92-99A1-287A6D49541C",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Audience",
                "subPathSegments": [
                  {
                    "key": "batches",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "2D0B8668-AD6D-454C-B2AD-EB77AF627F5E"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "iter",
          "storeResult": true
        },
        "name": "Load the contacts in batches",
        "nextElementIds": [
          "31C1A271-8F22-4575-8B42-846BFFD79188"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      },
      {
        "clientMetadata": {
          "elementId": "repeat",
          "isFirstElement": false,
          "blockDefinitionId": "repeat",
          "viewport": {
            "x": -70,
            "y": 0,
            "zoom": 1
          },
          "position": {
            "x": 1555,
            "y": 439
          }
        },
        "flowElementId": "15762E15-9CD2-4E72-8553-AED0C44753BE",
        "groupId": null,
        "id": "8BC534F9-CFDE-4F5E-85C0-010E79F0EEED",
        "loopType": "REPEAT",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Collect every matching contact', Error: Children have error",
            "valid": false
          },
          "condition": {
            "conditionParts": [
              {
                "id": "a2221732-90d0-4de0-b50e-c19563f3ba3c",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                      "label": "Default - more",
                      "subPathSegments": null,
                      "type": "EXECUTION_CONTEXT_PATH",
                      "value": "executionContext.dataBuckets.Default.more",
                      "valueSegments": [
                        {
                          "key": "executionContext",
                          "optional": false
                        },
                        {
                          "key": "dataBuckets",
                          "optional": false
                        },
                        {
                          "key": "Default",
                          "optional": false
                        },
                        {
                          "key": "more",
                          "optional": false
                        }
                      ]
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "a2221732-90d0-4de0-b50e-c19563f3ba3c"
            ]
          },
          "enabled": true,
          "firstElementId": "C50E3343-BBE2-41F5-89C0-017B1E88DFD7",
          "maxIterations": 50,
          "onFailElemId": null,
          "resultAlias": "rep",
          "storeResult": true
        },
        "name": "Collect every matching contact",
        "nextElementIds": [
          "634A89AC-F089-4D9B-AB2C-7BF132FE7B43"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "361AD776-82B3-4B4E-80BD-1C070789E71C",
    "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": "Block 'Build the audience' has an invalid configuration. Code Argument 'messages' has invalid value. Placeholder Data 'Broadcast messages': value is required",
      "executionStaticData": [
        {
          "description": "",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the marketing lead's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The messages a broadcast can send, by name. Each value is a Dittofeed message template definition, as in the cURL request the Dittofeed dashboard copies for a broadcast, for example { \"Pricing update, April\": { \"type\": \"Email\", \"from\": \"...\", \"subject\": \"...\", \"body\": \"...\" } }.",
          "error": "Placeholder Data 'Broadcast messages': value is required",
          "name": "Broadcast messages",
          "type": "OBJECT",
          "value": ""
        },
        {
          "description": "The HubSpot contact property that holds each person's Dittofeed user ID. Leave it as email if your Dittofeed users are identified by email address.",
          "error": null,
          "name": "Dittofeed user ID property",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "Slack member ID of the marketing lead who approves broadcasts, for example U012AB3CD.",
          "error": null,
          "name": "Marketing lead Slack 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-02T01:42:42.624Z"
}
