{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "C78BD3F8-27EE-4870-9823-125725CC24E7",
    "name": "Meirra: local prospects, one approved batch"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -41.74097664543524,
        "y": 10.276008492569005,
        "zoom": 0.74
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a rep adds an industry and a city to the prospecting sheet, searches Meirra's map listings, counts the businesses with a website, reads the Meirra balance and asks the rep in Slack how many domains to enrich. For each approved domain, Enrich Company lists the contacts and the most senior one with a deliverable address is written to the Prospects tab.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a rep adds an industry and a city to the prospecting sheet, searches Meirra's map listings, counts the businesses with a website, reads the Meirra balance and asks the rep in Slack how many domains to enrich. For each approved domain, Enrich Company lists the contacts and the most senior one with a deliverable address is written to the Prospects tab.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1634,
            "y": 219
          }
        },
        "flowElementId": "D6AE5620-99E2-4664-9137-CDAAC5C14D98",
        "groupId": null,
        "id": "9CDE081B-FEF2-4765-9387-963B28A21345",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "b221d94f-7cb7-4fd8-bf71-c14a8d9e9758",
                "nestedOperation": null,
                "operation": ">",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Question card",
                      "subPathSegments": [
                        {
                          "key": "count",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "BF648534-6698-403B-9E86-E169D600FB82"
                    }
                  ],
                  "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": [
              "b221d94f-7cb7-4fd8-bf71-c14a8d9e9758"
            ]
          },
          "elseComponent": {
            "componentId": "9C34F2DA-8604-4A83-805A-80937393F5DC",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Any domains",
          "storeResult": false,
          "thenComponent": {
            "componentId": "D1B93913-6D6C-42F3-851F-7ED7B7ACCCEC",
            "componentType": "ELEMENT"
          }
        },
        "name": "Any website to enrich?",
        "nextElementIds": [
          "9C34F2DA-8604-4A83-805A-80937393F5DC",
          "D1B93913-6D6C-42F3-851F-7ED7B7ACCCEC"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Confirm nothing was enriched Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 110,
            "y": 210
          }
        },
        "flowElementId": "73D4F45C-BA5B-4275-AC97-4BF24D533A56",
        "groupId": null,
        "id": "6F0C4247-28F2-419E-88BE-457C479B45FA",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Stopped. "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "count",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BF648534-6698-403B-9E86-E169D600FB82"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " domains were found with a website and none was enriched. Nothing was spent beyond the search."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to rep",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D1B93913-6D6C-42F3-851F-7ED7B7ACCCEC"
                  }
                ],
                "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": "Stopped note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm nothing was enriched",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the most senior deliverable contact Result"
          },
          "position": {
            "x": 481,
            "y": 409
          }
        },
        "flowElementId": "7326D81B-7EA6-4584-9AC0-0CE211BCD171",
        "groupId": "3254976C-EECF-4F57-849F-F9ABDEB65744",
        "id": "13237872-F438-44FA-BFEA-225FEDD535DC",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "contacts",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Company contacts",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "contacts",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "02C984F6-85AE-405D-A03D-CA35CC6279DD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "costPence",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Company contacts",
                    "subPathSegments": [
                      {
                        "key": "billing",
                        "optional": false
                      },
                      {
                        "key": "costPence",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "02C984F6-85AE-405D-A03D-CA35CC6279DD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "balanceRemaining",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Company contacts",
                    "subPathSegments": [
                      {
                        "key": "billing",
                        "optional": false
                      },
                      {
                        "key": "balanceRemaining",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "02C984F6-85AE-405D-A03D-CA35CC6279DD"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "domain",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "3254976C-EECF-4F57-849F-F9ABDEB65744"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "listings",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Map listings",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "results",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C978F9A5-9D87-43E7-B7E4-0F6A8FF7E6E2"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "city",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "City",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "industry",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Industry",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(contacts) ? contacts : [];\nconst rank = (c) => {\n  const s = String(c.seniority || '').toLowerCase();\n  const t = String(c.title || '').toLowerCase();\n  const table = [['owner', 100], ['founder', 100], ['c_suite', 95], ['c-suite', 95], ['cxo', 95], ['executive', 95], ['partner', 90], ['vp', 80], ['director', 70], ['head', 60], ['manager', 50], ['senior', 40], ['entry', 10]];\n  for (const [k, v] of table) if (s.includes(k)) return v;\n  if (/owner|founder|ceo|chief|principal|partner|managing director/.test(t)) return 95;\n  if (/\\bvp\\b|vice president/.test(t)) return 80;\n  if (/director/.test(t)) return 70;\n  if (/head of|head,/.test(t)) return 60;\n  if (/manager/.test(t)) return 50;\n  return 20;\n};\nconst ok = list.filter(c => c && c.email && c.verified === true && !c.isRisky && !c.isRole && !c.isDisposable);\nok.sort((a, b) => rank(b) - rank(a));\nconst best = ok[0] || null;\nconst listing = (Array.isArray(listings) ? listings : []).find(l => l && String(l.domain || '').toLowerCase() === String(domain).toLowerCase()) || {};\nconst pence = costPence == null || costPence === '' ? null : Number(costPence);\nconst cost = pence == null ? 'unknown' : `${pence}p`;\nconst left = balanceRemaining == null || balanceRemaining === '' ? 'unknown' : `£${Number(balanceRemaining).toFixed(2)}`;\nif (!best) {\n  return { found: false, row: null, summary: `${domain}: ${list.length} contact(s) known, none with a deliverable address. Enrich Company cost ${cost}, balance left ${left}.` };\n}\nconst name = [best.firstName, best.lastName].filter(Boolean).join(' ') || 'name unknown';\nreturn {\n  found: true,\n  row: {\n    'Company': listing.name || '',\n    'Domain': domain,\n    'First name': best.firstName || '',\n    'Last name': best.lastName || '',\n    'Title': best.title || '',\n    'Email': best.email,\n    'Email status': best.verificationStatus || 'verified',\n    'City': city || listing.city || '',\n    'Industry': industry || '',\n    'Added on': new Date().toISOString().slice(0, 10),\n    'Source': 'Meirra Enrich Company',\n  },\n  summary: `${domain}: ${name}, ${best.title || 'title unknown'}, ${best.email} (${best.verificationStatus || 'verified'}). ${list.length} contact(s) known. Enrich Company cost ${cost}, balance left ${left}.`,\n};"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Best contact",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the most senior deliverable contact",
        "nextElementIds": [
          "17138259-C731-4ABC-B60F-0A57F0524033"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 826,
            "y": 219
          }
        },
        "flowElementId": "4930D20B-3AB3-40A9-8DF4-3667760B6CB4",
        "groupId": null,
        "id": "00C1F124-4D2F-4D4C-B61B-760F6F40C44D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Rep decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the rep's answer",
        "nextElementIds": [
          "1350E712-F9DD-43B2-8FA6-12E7FC03A29A"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Monitors Google Sheets for new rows and triggers AI workflows when data is added. Perfect for automated processing of form submissions, real-time data analysis, or immediate response to user input in collaborative spreadsheets. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::onNewRow",
          "legacyElementId": "JS###v1###GoogleSheets###onNewRow",
          "methodName": "onNewRow",
          "position": {
            "x": 495,
            "y": 40
          }
        },
        "flowElementId": "1FEC67AA-743A-4C80-B199-9FDB15CF2483",
        "groupId": null,
        "id": "37E9D35B-662D-4D7D-90F5-5A1C1B257019",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'New prospecting row', Error: Document is required",
            "valid": false
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewRow",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New prospecting row",
          "serviceId": "google-sheets",
          "slaConditions": [],
          "staticData": {},
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New prospecting row",
        "nextElementIds": [
          "C978F9A5-9D87-43E7-B7E4-0F6A8FF7E6E2"
        ],
        "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,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Report that nothing can be enriched Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1164,
            "y": 340
          }
        },
        "flowElementId": "419F7FAA-8ED5-49E0-8BE8-C4AA8F360EC9",
        "groupId": null,
        "id": "9C34F2DA-8604-4A83-805A-80937393F5DC",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Prospect list for "
                  },
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Industry",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " in "
                  },
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "City",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ": Search Local Businesses found "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "found",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BF648534-6698-403B-9E86-E169D600FB82"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " listings, none with a website. Nothing to enrich. Meirra balance left: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "balanceLeft",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BF648534-6698-403B-9E86-E169D600FB82"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "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": "Nothing note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Report that nothing can be enriched",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Lists the contacts Meirra knows at a company domain, with their titles, departments, seniority and email verification. Paid: list price £0.25 from your prepaid Meirra balance.",
          "elementId": "EXTENSION:::SHARED:::default:::meirra:::enrichCompany",
          "isFirstElement": true,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "List the contacts at the domain Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::meirra:::enrichCompany",
          "legacyElementId": null,
          "methodName": "enrichCompany",
          "position": {
            "x": 110,
            "y": 400
          }
        },
        "flowElementId": "A4851D1F-E373-4D30-94AF-02C8EAFE7584",
        "groupId": "3254976C-EECF-4F57-849F-F9ABDEB65744",
        "id": "02C984F6-85AE-405D-A03D-CA35CC6279DD",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "domain",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "3254976C-EECF-4F57-849F-F9ABDEB65744"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "idempotencyKey",
              "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
                      }
                    ]
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "-"
                  },
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": null,
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "3254976C-EECF-4F57-849F-F9ABDEB65744"
                  }
                ],
                "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": "enrichCompany",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Company contacts",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "meirra",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "List the contacts at the domain",
        "nextElementIds": [
          "13237872-F438-44FA-BFEA-225FEDD535DC"
        ],
        "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,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Close the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1217,
            "y": 510
          }
        },
        "flowElementId": "76001C44-E29C-408C-9CD1-E35FCA85D315",
        "groupId": null,
        "id": "67C1752F-9A91-430D-B353-F3B59444F002",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Done: "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Approved domains",
                    "subPathSegments": [
                      {
                        "key": "count",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DABD8E16-05E9-4164-A7A3-224F61B68EDE"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " domains enriched with Meirra. Every contact with a deliverable address is in the Prospects tab."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to rep",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D1B93913-6D6C-42F3-851F-7ED7B7ACCCEC"
                  }
                ],
                "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": "Done note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Close the thread",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1325,
            "y": 409
          }
        },
        "flowElementId": "DFBE7792-6017-42EE-85D2-B57E12C31686",
        "groupId": "3254976C-EECF-4F57-849F-F9ABDEB65744",
        "id": "C737B09D-4E83-4A10-A7E5-D8F75B03E0EB",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "c439c9d0-d722-401c-beaf-3a86449456e4",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Best contact",
                      "subPathSegments": [
                        {
                          "key": "found",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "13237872-F438-44FA-BFEA-225FEDD535DC"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "c439c9d0-d722-401c-beaf-3a86449456e4"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Contact found",
          "storeResult": false,
          "thenComponent": {
            "componentId": "C29E88D9-0779-4F3E-A082-920FDE96ADF8",
            "componentType": "ELEMENT"
          }
        },
        "name": "Deliverable contact found?",
        "nextElementIds": [
          "C29E88D9-0779-4F3E-A082-920FDE96ADF8"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Sends messages to Slack channels with optional Block Kit rich layouts. Supports plain text with Slack formatting, or advanced Block Kit JSON for buttons, menus, and interactive elements. Returns the message timestamp and channel ID for later updates or tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Report the domain in the thread Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 914,
            "y": 400
          }
        },
        "flowElementId": "DDE89FF9-3645-4277-BC27-BD7EE8FBD6CD",
        "groupId": "3254976C-EECF-4F57-849F-F9ABDEB65744",
        "id": "17138259-C731-4ABC-B60F-0A57F0524033",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Best contact",
                    "subPathSegments": [
                      {
                        "key": "summary",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "13237872-F438-44FA-BFEA-225FEDD535DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to rep",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D1B93913-6D6C-42F3-851F-7ED7B7ACCCEC"
                  }
                ],
                "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": "Domain note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Report the domain in the thread",
        "nextElementIds": [
          "C737B09D-4E83-4A10-A7E5-D8F75B03E0EB"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Count the domains and write the question Result"
          },
          "position": {
            "x": 1570,
            "y": 49
          }
        },
        "flowElementId": "508F8EB0-839A-423B-84E3-DAE2ECA12FDD",
        "groupId": null,
        "id": "BF648534-6698-403B-9E86-E169D600FB82",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "results",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Map listings",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "results",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C978F9A5-9D87-43E7-B7E4-0F6A8FF7E6E2"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "resultsCount",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Map listings",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "resultsCount",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "C978F9A5-9D87-43E7-B7E4-0F6A8FF7E6E2"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "balance",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Balance",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "balance",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "52D91A4B-5CA7-4E33-8468-CBEB114CD2E6"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "industry",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Industry",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "city",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "City",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  }
                ],
                "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 list = Array.isArray(results) ? results : [];\nconst seen = new Set();\nconst domains = [];\nfor (const b of list) {\n  const d = b && b.domain ? String(b.domain).trim().toLowerCase() : '';\n  if (!d || b.hasWebsite === false || seen.has(d)) continue;\n  seen.add(d);\n  domains.push(d);\n}\nconst count = domains.length;\nconst found = Number(resultsCount) || list.length;\nconst link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst left = balance != null && balance !== '' ? `£${Number(balance).toFixed(2)}` : 'unknown';\nconst lines = [\n  `*Prospect list: ${industry} in ${city}*`,\n  `Search Local Businesses found ${found} listing(s); ${count} list a website.`,\n  count\n    ? `Enrich Company on all ${count} is ${count} paid call(s). Meirra balance left: ${left}.`\n    : `Nothing to enrich. Meirra balance left: ${left}.`,\n  count ? 'How many domains should I enrich?' : null,\n].filter(Boolean);\nconst elements = [];\nif (count) elements.push({ type: 'button', style: 'primary', text: { type: 'plain_text', text: `Run all ${count}` }, url: link('all') });\nif (count > 10) elements.push({ type: 'button', text: { type: 'plain_text', text: 'Run the first 10' }, url: link('ten') });\nelements.push({ type: 'button', style: 'danger', text: { type: 'plain_text', text: 'Stop here' }, url: link('stop') });\nconst blocks = [{ type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } }];\nif (count) blocks.push({ type: 'actions', elements });\nreturn { text: `${count} domain(s) to enrich for ${industry} in ${city}`, blocks, domains, count, found, balanceLeft: left };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Question card",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Count the domains and write the question",
        "nextElementIds": [
          "9CDE081B-FEF2-4765-9387-963B28A21345"
        ],
        "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,
          "dynamicOptionLabels": {
            "channelId": {}
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Ask the rep how many to enrich Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1179,
            "y": 210
          }
        },
        "flowElementId": "5BD3AC4F-4C32-49E3-B7EE-C58FD6FA86A2",
        "groupId": null,
        "id": "D1B93913-6D6C-42F3-851F-7ED7B7ACCCEC",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "channelId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "messageText",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BF648534-6698-403B-9E86-E169D600FB82"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sendAsBot",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botName",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "botIcon",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "replyBroadcast",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "imageURL",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "blocks",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BF648534-6698-403B-9E86-E169D600FB82"
                  }
                ],
                "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 rep",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the rep how many to enrich",
        "nextElementIds": [
          "00C1F124-4D2F-4D4C-B61B-760F6F40C44D"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Reads the prepaid API balance of your Meirra account in GBP, with the totals topped up and spent. Free.",
          "elementId": "EXTENSION:::SHARED:::default:::meirra:::getCreditBalance",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the Meirra balance Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::meirra:::getCreditBalance",
          "legacyElementId": null,
          "methodName": "getCreditBalance",
          "position": {
            "x": 1204,
            "y": 40
          }
        },
        "flowElementId": "5EB8CB76-404F-48E7-938D-EDE044C27F6A",
        "groupId": null,
        "id": "52D91A4B-5CA7-4E33-8468-CBEB114CD2E6",
        "metaInfo": {
          "bodyParams": [],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getCreditBalance",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Balance",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "meirra",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Read the Meirra balance",
        "nextElementIds": [
          "BF648534-6698-403B-9E86-E169D600FB82"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pick the approved domains Result"
          },
          "position": {
            "x": 475,
            "y": 519
          }
        },
        "flowElementId": "6832B4F2-FDA4-43FC-ADAD-44D9EC1BFDE4",
        "groupId": null,
        "id": "DABD8E16-05E9-4164-A7A3-224F61B68EDE",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "domains",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question card",
                    "subPathSegments": [
                      {
                        "key": "domains",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "BF648534-6698-403B-9E86-E169D600FB82"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "decision",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Rep decision",
                    "subPathSegments": [
                      {
                        "key": "decision",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "00C1F124-4D2F-4D4C-B61B-760F6F40C44D"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const all = Array.isArray(domains) ? domains : [];\nconst picked = String(decision) === 'ten' ? all.slice(0, 10) : all;\nreturn { domains: picked, count: picked.length, decision: String(decision) };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Approved domains",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Pick the approved domains",
        "nextElementIds": [],
        "nextGroupIds": [
          "3254976C-EECF-4F57-849F-F9ABDEB65744"
        ],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 498,
            "y": 219
          }
        },
        "flowElementId": "F74BE1A2-269F-4154-8C30-053FCFB34378",
        "groupId": null,
        "id": "1350E712-F9DD-43B2-8FA6-12E7FC03A29A",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "c3d32c2f-f56f-4fcb-9d4c-517068a2daed",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Rep decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "00C1F124-4D2F-4D4C-B61B-760F6F40C44D"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "stop"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "c3d32c2f-f56f-4fcb-9d4c-517068a2daed"
            ]
          },
          "elseComponent": {
            "componentId": "DABD8E16-05E9-4164-A7A3-224F61B68EDE",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Stop here",
          "storeResult": false,
          "thenComponent": {
            "componentId": "6F0C4247-28F2-419E-88BE-457C479B45FA",
            "componentType": "ELEMENT"
          }
        },
        "name": "Stop here?",
        "nextElementIds": [
          "6F0C4247-28F2-419E-88BE-457C479B45FA",
          "DABD8E16-05E9-4164-A7A3-224F61B68EDE"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "notes": "Searches map listings for businesses matching a query in a country and, optionally, a city. Paid: list price £0.03 per search from your prepaid Meirra balance; not charged when nothing is found or the country is not recognized.",
          "elementId": "EXTENSION:::SHARED:::default:::meirra:::searchLocalBusinesses",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Find the local businesses Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::meirra:::searchLocalBusinesses",
          "legacyElementId": null,
          "methodName": "searchLocalBusinesses",
          "position": {
            "x": 827,
            "y": 40
          }
        },
        "flowElementId": "5D9117C8-8F7C-4D4C-B4A7-DCDEB1D152AE",
        "groupId": null,
        "id": "C978F9A5-9D87-43E7-B7E4-0F6A8FF7E6E2",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "query",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "Industry",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "country",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Country code",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Country code"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "city",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "New prospecting row",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      },
                      {
                        "key": "City",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "37E9D35B-662D-4D7D-90F5-5A1C1B257019"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "limit",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "NUMBER",
                    "label": null,
                    "type": "INPUT",
                    "value": 50
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "idempotencyKey",
              "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
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "searchLocalBusinesses",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Map listings",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "meirra",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Find the local businesses",
        "nextElementIds": [
          "52D91A4B-5CA7-4E33-8468-CBEB114CD2E6"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Adds new data rows to Google Sheets for AI agents to store processed results, log user interactions, or collect data from automated workflows. Perfect for building databases, tracking metrics, saving form submissions, or creating data collection pipelines.",
          "elementId": "EXTENSION:::SHARED:::default:::google-sheets:::addRow",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add the contact to the Prospects tab Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::google-sheets:::addRow",
          "legacyElementId": "JS###v1###GoogleSheets###addRow",
          "methodName": "addRow",
          "position": {
            "x": 1291,
            "y": 570
          }
        },
        "flowElementId": "F8F8E01E-27B1-4DD0-9600-5EA228143FAC",
        "groupId": "3254976C-EECF-4F57-849F-F9ABDEB65744",
        "id": "C29E88D9-0779-4F3E-A082-920FDE96ADF8",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "documentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Prospecting sheet",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Prospecting sheet"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "sheetId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "PLACEHOLDER_DATA",
                    "label": "Prospects tab",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_STATIC_DATA",
                    "value": "Prospects tab"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "row",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Best contact",
                    "subPathSegments": [
                      {
                        "key": "row",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "13237872-F438-44FA-BFEA-225FEDD535DC"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Add the contact to the Prospects tab', Error: The placeholder \"Prospecting sheet\" has no value",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "addRow",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Prospect row",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "google-sheets",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Add the contact to the Prospects tab",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "37E9D35B-662D-4D7D-90F5-5A1C1B257019",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -57.90209790209791,
            "y": -316.00762873490146,
            "zoom": 0.89
          },
          "position": {
            "x": 821,
            "y": 519
          }
        },
        "flowElementId": "606BCB9C-4482-4905-BF1B-A1E6D6470900",
        "groupId": null,
        "id": "3254976C-EECF-4F57-849F-F9ABDEB65744",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'For each approved domain', Error: Children have error",
            "valid": false
          },
          "enabled": true,
          "firstElementId": "02C984F6-85AE-405D-A03D-CA35CC6279DD",
          "list": {
            "expression": [
              {
                "id": "ELEMENT_RESULT",
                "label": "Approved domains",
                "subPathSegments": [
                  {
                    "key": "domains",
                    "optional": false
                  }
                ],
                "type": "ELEMENT_LINK",
                "value": "DABD8E16-05E9-4164-A7A3-224F61B68EDE"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "Domain loop",
          "storeResult": true
        },
        "name": "For each approved domain",
        "nextElementIds": [
          "67C1752F-9A91-430D-B353-F3B59444F002"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "474E9799-2F90-407F-828E-C85CF8C1BB9E",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
      "executionStaticData": [
        {
          "description": "The URL or ID of the prospecting Google Sheet. The same sheet the trigger New prospecting row watches.",
          "error": null,
          "name": "Prospecting sheet",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The ID of the Prospects tab in that sheet: the number after gid= in its URL. Its columns: Company, Domain, First name, Last name, Title, Email, Email status, City, Industry, Added on, Source.",
          "error": null,
          "name": "Prospects tab",
          "type": "INT",
          "value": ""
        },
        {
          "description": "The country the local searches run in, as an ISO code such as GB or US.",
          "error": null,
          "name": "Country code",
          "type": "STRING",
          "value": ""
        },
        {
          "description": "The URL of the block Wait for the rep's answer. The Slack buttons open it.",
          "error": null,
          "name": "Answer link",
          "type": "STRING",
          "value": ""
        }
      ],
      "initialData": null,
      "initialDataDefaultValues": {},
      "ownerFlowVersionId": null,
      "schedule": null,
      "sharedMemory": {
        "anchor": {
          "missingAnchorPolicy": null,
          "path": null,
          "type": "FLOW_MEMORY"
        },
        "expirationInSec": null
      },
      "wasLive": false
    }
  },
  "slaCalendars": [],
  "slaGoals": [],
  "subFlows": [],
  "exportDate": "2026-12-02T08:43:24.577Z"
}
