{
  "name": "HasData - Local business email to HubSpot (test candidate)",
  "flow": [
    {
      "id": 1,
      "module": "util:SetVariables",
      "version": 1,
      "parameters": {},
      "mapper": {
        "variables": [
          {
            "name": "query",
            "value": "pizza in New York, NY"
          },
          {
            "name": "location",
            "value": "New York,New York,United States"
          }
        ],
        "scope": "roundtrip"
      },
      "metadata": {
        "designer": {
          "x": 0,
          "y": 0
        },
        "interface": [
          {
            "name": "query",
            "type": "text",
            "label": "query"
          },
          {
            "name": "location",
            "type": "text",
            "label": "location"
          }
        ]
      }
    },
    {
      "id": 2,
      "module": "hasdata:googleMaps",
      "version": 1,
      "parameters": {},
      "mapper": {
        "q": "{{1.query}}",
        "gl": "us",
        "hl": "en",
        "start": 0
      },
      "metadata": {
        "designer": {
          "x": 300,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:hasdata",
            "label": "Connection",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "q",
            "type": "text",
            "label": "Search Query",
            "required": true
          },
          {
            "name": "domain",
            "type": "select",
            "label": "Domain",
            "validate": {
              "enum": [
                "google.ac",
                "google.ad",
                "google.ae",
                "google.al",
                "google.am",
                "google.as",
                "google.at",
                "google.az",
                "google.ba",
                "google.be",
                "google.bf",
                "google.bg",
                "google.bi",
                "google.bj",
                "google.bs",
                "google.bt",
                "google.by",
                "google.ca",
                "google.cd",
                "google.cf",
                "google.cg",
                "google.ch",
                "google.ci",
                "google.cl",
                "google.cm",
                "google.co.ao",
                "google.co.bw",
                "google.co.ck",
                "google.co.cr",
                "google.co.id",
                "google.co.il",
                "google.co.in",
                "google.co.jp",
                "google.co.ke",
                "google.co.kr",
                "google.co.ls",
                "google.co.ma",
                "google.co.mz",
                "google.co.nz",
                "google.co.th",
                "google.co.tz",
                "google.co.ug",
                "google.co.uk",
                "google.co.uz",
                "google.co.ve",
                "google.co.vi",
                "google.co.za",
                "google.co.zm",
                "google.co.zw",
                "google.com",
                "google.com.af",
                "google.com.ag",
                "google.com.ai",
                "google.com.ar",
                "google.com.au",
                "google.com.bd",
                "google.com.bh",
                "google.com.bn",
                "google.com.bo",
                "google.com.br",
                "google.com.bz",
                "google.com.co",
                "google.com.cu",
                "google.com.cy",
                "google.com.do",
                "google.com.ec",
                "google.com.eg",
                "google.com.et",
                "google.com.fj",
                "google.com.gh",
                "google.com.gi",
                "google.com.gt",
                "google.com.hk",
                "google.com.jm",
                "google.com.kh",
                "google.com.kw",
                "google.com.lb",
                "google.com.ly",
                "google.com.mm",
                "google.com.mt",
                "google.com.mx",
                "google.com.my",
                "google.com.na",
                "google.com.ng",
                "google.ng",
                "google.com.nf",
                "google.com.ni",
                "google.com.np",
                "google.com.om",
                "google.com.pa",
                "google.com.pe",
                "google.com.pg",
                "google.com.ph",
                "google.com.pk",
                "google.com.pr",
                "google.com.py",
                "google.com.qa",
                "google.com.sa",
                "google.com.sb",
                "google.com.sg",
                "google.com.sl",
                "google.com.sv",
                "google.com.tj",
                "google.com.tr",
                "google.com.tw",
                "google.com.ua",
                "google.com.uy",
                "google.com.vc",
                "google.com.vn",
                "google.cat",
                "google.cn",
                "google.cv",
                "google.cz",
                "google.de",
                "google.dj",
                "google.dk",
                "google.dm",
                "google.dz",
                "google.ee",
                "google.es",
                "google.fi",
                "google.fm",
                "google.fr",
                "google.ga",
                "google.ge",
                "google.gg",
                "google.gl",
                "google.gm",
                "google.gp",
                "google.gr",
                "google.gy",
                "google.hn",
                "google.hr",
                "google.ht",
                "google.hu",
                "google.ie",
                "google.im",
                "google.iq",
                "google.is",
                "google.it",
                "google.je",
                "google.jo",
                "google.kg",
                "google.ki",
                "google.kz",
                "google.la",
                "google.li",
                "google.lk",
                "google.lt",
                "google.lu",
                "google.lv",
                "google.md",
                "google.me",
                "google.mg",
                "google.mk",
                "google.ml",
                "google.mn",
                "google.ms",
                "google.mu",
                "google.mv",
                "google.mw",
                "google.ne",
                "google.nl",
                "google.no",
                "google.nr",
                "google.nu",
                "google.pl",
                "google.pn",
                "google.ps",
                "google.pt",
                "google.ro",
                "google.rs",
                "google.ru",
                "google.rw",
                "google.sc",
                "google.se",
                "google.sh",
                "google.si",
                "google.sk",
                "google.sm",
                "google.sn",
                "google.so",
                "google.sr",
                "google.st",
                "google.td",
                "google.tg",
                "google.tk",
                "google.tl",
                "google.tm",
                "google.tn",
                "google.to",
                "google.tt",
                "google.vg",
                "google.vu",
                "google.ws"
              ]
            }
          },
          {
            "name": "gl",
            "type": "select",
            "label": "Country",
            "validate": {
              "enum": [
                "ac",
                "af",
                "al",
                "dz",
                "as",
                "ad",
                "ao",
                "ai",
                "aq",
                "ag",
                "ar",
                "am",
                "aw",
                "au",
                "at",
                "az",
                "bs",
                "bh",
                "bd",
                "bb",
                "by",
                "be",
                "bz",
                "bj",
                "bm",
                "bt",
                "bo",
                "ba",
                "bw",
                "bv",
                "br",
                "io",
                "bn",
                "bg",
                "bf",
                "bi",
                "kh",
                "cm",
                "ca",
                "cv",
                "ky",
                "cf",
                "td",
                "cl",
                "cn",
                "cx",
                "cc",
                "co",
                "km",
                "cg",
                "cd",
                "ck",
                "cr",
                "ci",
                "hr",
                "cu",
                "cy",
                "cz",
                "dk",
                "dj",
                "dm",
                "do",
                "ec",
                "eg",
                "sv",
                "gq",
                "er",
                "ee",
                "et",
                "fk",
                "fo",
                "fj",
                "fi",
                "fr",
                "gf",
                "pf",
                "tf",
                "ga",
                "gm",
                "ge",
                "gg",
                "de",
                "gh",
                "gi",
                "gr",
                "gl",
                "gd",
                "gp",
                "gu",
                "gt",
                "gn",
                "gw",
                "gy",
                "ht",
                "hm",
                "va",
                "hn",
                "hk",
                "hu",
                "im",
                "is",
                "in",
                "id",
                "ir",
                "iq",
                "ie",
                "il",
                "it",
                "je",
                "jm",
                "jp",
                "jo",
                "kz",
                "ke",
                "ki",
                "kp",
                "kr",
                "kw",
                "kg",
                "la",
                "lv",
                "lb",
                "ls",
                "lr",
                "ly",
                "li",
                "lt",
                "lu",
                "me",
                "mo",
                "mk",
                "mg",
                "mw",
                "my",
                "mv",
                "ml",
                "mt",
                "mh",
                "mq",
                "mr",
                "mu",
                "yt",
                "mx",
                "fm",
                "md",
                "mc",
                "mn",
                "ms",
                "ma",
                "mz",
                "mm",
                "na",
                "nr",
                "np",
                "nl",
                "an",
                "nc",
                "nz",
                "ni",
                "ne",
                "ng",
                "nu",
                "nf",
                "mp",
                "no",
                "om",
                "pk",
                "pw",
                "ps",
                "pa",
                "pg",
                "py",
                "pe",
                "ph",
                "pn",
                "pl",
                "pt",
                "pr",
                "qa",
                "re",
                "ro",
                "ru",
                "rw",
                "sh",
                "kn",
                "lc",
                "pm",
                "vc",
                "ws",
                "sm",
                "st",
                "sa",
                "sn",
                "rs",
                "sc",
                "sl",
                "sg",
                "sk",
                "si",
                "sb",
                "so",
                "za",
                "gs",
                "es",
                "lk",
                "sd",
                "sr",
                "sj",
                "sz",
                "se",
                "ch",
                "sy",
                "tw",
                "tj",
                "tz",
                "th",
                "tl",
                "tg",
                "tk",
                "to",
                "tt",
                "tn",
                "tr",
                "tm",
                "tc",
                "tv",
                "ug",
                "ua",
                "ae",
                "uk",
                "gb",
                "us",
                "um",
                "uy",
                "uz",
                "vu",
                "ve",
                "vn",
                "vg",
                "vi",
                "wf",
                "eh",
                "ye",
                "zm",
                "zw"
              ]
            }
          },
          {
            "name": "hl",
            "type": "select",
            "label": "Language",
            "validate": {
              "enum": [
                "af",
                "ak",
                "sq",
                "ws",
                "am",
                "ar",
                "hy",
                "az",
                "eu",
                "be",
                "bem",
                "bn",
                "bh",
                "xx-bork",
                "bs",
                "br",
                "bg",
                "bt",
                "km",
                "ca",
                "chr",
                "ny",
                "zh-cn",
                "zh-tw",
                "zh-hk",
                "co",
                "hr",
                "cs",
                "da",
                "nl",
                "xx-elmer",
                "en",
                "eo",
                "et",
                "ee",
                "fo",
                "tl",
                "fil",
                "fi",
                "fr",
                "fy",
                "gaa",
                "gl",
                "ka",
                "de",
                "el",
                "kl",
                "gn",
                "gu",
                "xx-hacker",
                "ht",
                "ha",
                "haw",
                "iw",
                "he",
                "hi",
                "hu",
                "is",
                "ig",
                "id",
                "ia",
                "ga",
                "it",
                "ja",
                "jw",
                "kn",
                "kk",
                "rw",
                "rn",
                "xx-klingon",
                "kg",
                "ko",
                "kri",
                "ku",
                "ckb",
                "ky",
                "lo",
                "la",
                "lv",
                "ln",
                "lt",
                "loz",
                "lg",
                "ach",
                "mk",
                "mg",
                "my",
                "ml",
                "mt",
                "mv",
                "mi",
                "mr",
                "mfe",
                "mo",
                "mn",
                "ms",
                "sr-me",
                "ne",
                "pcm",
                "nso",
                "no",
                "nn",
                "oc",
                "or",
                "om",
                "ps",
                "fa",
                "xx-pirate",
                "pl",
                "pt",
                "pt-br",
                "pt-pt",
                "pa",
                "qu",
                "ro",
                "rm",
                "nyn",
                "ru",
                "gd",
                "sr",
                "sh",
                "st",
                "tn",
                "crs",
                "sn",
                "sd",
                "si",
                "sk",
                "sl",
                "so",
                "es",
                "es-419",
                "su",
                "sw",
                "sv",
                "tg",
                "ta",
                "tt",
                "te",
                "th",
                "ti",
                "to",
                "lua",
                "tum",
                "tr",
                "tk",
                "tw",
                "ug",
                "uk",
                "ur",
                "uz",
                "vu",
                "vi",
                "cy",
                "wo",
                "xh",
                "yi",
                "yo",
                "zu"
              ]
            }
          },
          {
            "name": "start",
            "type": "integer",
            "label": "Result Offset"
          },
          {
            "name": "ll",
            "type": "text",
            "label": "GPS Coordinates"
          }
        ]
      }
    },
    {
      "id": 3,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {},
      "mapper": {
        "array": "{{slice(ifempty(2.localResults; emptyarray); 0; 1)}}"
      },
      "metadata": {
        "designer": {
          "x": 600,
          "y": 0
        }
      },
      "filter": {
        "name": "Successful Maps response",
        "conditions": [
          [
            {
              "a": "{{2.requestMetadata.status}}",
              "o": "text:equal",
              "b": "ok"
            }
          ]
        ]
      }
    },
    {
      "id": 4,
      "module": "regexp:Parser",
      "version": 1,
      "parameters": {
        "pattern": "^https?://(?:www\\.)?(?<host>(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63})(?:/|$)",
        "global": false,
        "sensitive": false,
        "multiline": false,
        "singleline": false,
        "continueWhenNoRes": false
      },
      "mapper": {
        "text": "{{3.website}}"
      },
      "metadata": {
        "designer": {
          "x": 900,
          "y": 0
        },
        "parameters": [
          {
            "name": "pattern",
            "type": "text",
            "label": "Pattern",
            "required": true
          },
          {
            "name": "global",
            "type": "boolean",
            "label": "Global match",
            "required": true
          },
          {
            "name": "sensitive",
            "type": "boolean",
            "label": "Case sensitive",
            "required": true
          },
          {
            "name": "multiline",
            "type": "boolean",
            "label": "Multiline",
            "required": true
          },
          {
            "name": "singleline",
            "type": "boolean",
            "label": "Singleline",
            "required": true
          },
          {
            "name": "continueWhenNoRes",
            "type": "boolean",
            "label": "Continue the execution of the route even if the module finds no matches",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "text",
            "type": "text",
            "label": "Text"
          }
        ],
        "interface": [
          {
            "name": "host",
            "type": "text",
            "label": "host"
          }
        ]
      },
      "filter": {
        "name": "Business has a website",
        "conditions": [
          [
            {
              "a": "{{3.website}}",
              "o": "exist"
            }
          ]
        ]
      }
    },
    {
      "id": 5,
      "module": "hasdata:googleAiMode",
      "version": 1,
      "parameters": {},
      "mapper": {
        "q": "Find a publicly published general business contact email for {{3.title}}. Official business website: {{3.website}}. Cite the exact official contact page. Do not infer or invent an email, and do not return personal employee addresses. If no public business email is available, say none found.",
        "location": "{{1.location}}",
        "gl": "us",
        "hl": "en",
        "continuable": false
      },
      "metadata": {
        "designer": {
          "x": 1200,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:hasdata",
            "label": "Connection",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "q",
            "type": "text",
            "label": "Search Query",
            "required": true
          },
          {
            "name": "location",
            "type": "text",
            "label": "Location"
          },
          {
            "name": "uule",
            "type": "text",
            "label": "Encoded Location"
          },
          {
            "name": "gl",
            "type": "select",
            "label": "Country",
            "validate": {
              "enum": [
                "ac",
                "af",
                "al",
                "dz",
                "as",
                "ad",
                "ao",
                "ai",
                "aq",
                "ag",
                "ar",
                "am",
                "aw",
                "au",
                "at",
                "az",
                "bs",
                "bh",
                "bd",
                "bb",
                "by",
                "be",
                "bz",
                "bj",
                "bm",
                "bt",
                "bo",
                "ba",
                "bw",
                "bv",
                "br",
                "io",
                "bn",
                "bg",
                "bf",
                "bi",
                "kh",
                "cm",
                "ca",
                "cv",
                "ky",
                "cf",
                "td",
                "cl",
                "cn",
                "cx",
                "cc",
                "co",
                "km",
                "cg",
                "cd",
                "ck",
                "cr",
                "ci",
                "hr",
                "cu",
                "cy",
                "cz",
                "dk",
                "dj",
                "dm",
                "do",
                "ec",
                "eg",
                "sv",
                "gq",
                "er",
                "ee",
                "et",
                "fk",
                "fo",
                "fj",
                "fi",
                "fr",
                "gf",
                "pf",
                "tf",
                "ga",
                "gm",
                "ge",
                "gg",
                "de",
                "gh",
                "gi",
                "gr",
                "gl",
                "gd",
                "gp",
                "gu",
                "gt",
                "gn",
                "gw",
                "gy",
                "ht",
                "hm",
                "va",
                "hn",
                "hk",
                "hu",
                "im",
                "is",
                "in",
                "id",
                "ir",
                "iq",
                "ie",
                "il",
                "it",
                "je",
                "jm",
                "jp",
                "jo",
                "kz",
                "ke",
                "ki",
                "kp",
                "kr",
                "kw",
                "kg",
                "la",
                "lv",
                "lb",
                "ls",
                "lr",
                "ly",
                "li",
                "lt",
                "lu",
                "me",
                "mo",
                "mk",
                "mg",
                "mw",
                "my",
                "mv",
                "ml",
                "mt",
                "mh",
                "mq",
                "mr",
                "mu",
                "yt",
                "mx",
                "fm",
                "md",
                "mc",
                "mn",
                "ms",
                "ma",
                "mz",
                "mm",
                "na",
                "nr",
                "np",
                "nl",
                "an",
                "nc",
                "nz",
                "ni",
                "ne",
                "ng",
                "nu",
                "nf",
                "mp",
                "no",
                "om",
                "pk",
                "pw",
                "ps",
                "pa",
                "pg",
                "py",
                "pe",
                "ph",
                "pn",
                "pl",
                "pt",
                "pr",
                "qa",
                "re",
                "ro",
                "ru",
                "rw",
                "sh",
                "kn",
                "lc",
                "pm",
                "vc",
                "ws",
                "sm",
                "st",
                "sa",
                "sn",
                "rs",
                "sc",
                "sl",
                "sg",
                "sk",
                "si",
                "sb",
                "so",
                "za",
                "gs",
                "es",
                "lk",
                "sd",
                "sr",
                "sj",
                "sz",
                "se",
                "ch",
                "sy",
                "tw",
                "tj",
                "tz",
                "th",
                "tl",
                "tg",
                "tk",
                "to",
                "tt",
                "tn",
                "tr",
                "tm",
                "tc",
                "tv",
                "ug",
                "ua",
                "ae",
                "uk",
                "gb",
                "us",
                "um",
                "uy",
                "uz",
                "vu",
                "ve",
                "vn",
                "vg",
                "vi",
                "wf",
                "eh",
                "ye",
                "zm",
                "zw"
              ]
            }
          },
          {
            "name": "hl",
            "type": "select",
            "label": "Language",
            "validate": {
              "enum": [
                "af",
                "ak",
                "sq",
                "ws",
                "am",
                "ar",
                "hy",
                "az",
                "eu",
                "be",
                "bem",
                "bn",
                "bh",
                "xx-bork",
                "bs",
                "br",
                "bg",
                "bt",
                "km",
                "ca",
                "chr",
                "ny",
                "zh-cn",
                "zh-tw",
                "zh-hk",
                "co",
                "hr",
                "cs",
                "da",
                "nl",
                "xx-elmer",
                "en",
                "eo",
                "et",
                "ee",
                "fo",
                "tl",
                "fil",
                "fi",
                "fr",
                "fy",
                "gaa",
                "gl",
                "ka",
                "de",
                "el",
                "kl",
                "gn",
                "gu",
                "xx-hacker",
                "ht",
                "ha",
                "haw",
                "iw",
                "he",
                "hi",
                "hu",
                "is",
                "ig",
                "id",
                "ia",
                "ga",
                "it",
                "ja",
                "jw",
                "kn",
                "kk",
                "rw",
                "rn",
                "xx-klingon",
                "kg",
                "ko",
                "kri",
                "ku",
                "ckb",
                "ky",
                "lo",
                "la",
                "lv",
                "ln",
                "lt",
                "loz",
                "lg",
                "ach",
                "mk",
                "mg",
                "my",
                "ml",
                "mt",
                "mv",
                "mi",
                "mr",
                "mfe",
                "mo",
                "mn",
                "ms",
                "sr-me",
                "ne",
                "pcm",
                "nso",
                "no",
                "nn",
                "oc",
                "or",
                "om",
                "ps",
                "fa",
                "xx-pirate",
                "pl",
                "pt",
                "pt-br",
                "pt-pt",
                "pa",
                "qu",
                "ro",
                "rm",
                "nyn",
                "ru",
                "gd",
                "sr",
                "sh",
                "st",
                "tn",
                "crs",
                "sn",
                "sd",
                "si",
                "sk",
                "sl",
                "so",
                "es",
                "es-419",
                "su",
                "sw",
                "sv",
                "tg",
                "ta",
                "tt",
                "te",
                "th",
                "ti",
                "to",
                "lua",
                "tum",
                "tr",
                "tk",
                "tw",
                "ug",
                "uk",
                "ur",
                "uz",
                "vu",
                "vi",
                "cy",
                "wo",
                "xh",
                "yi",
                "yo",
                "zu"
              ]
            }
          },
          {
            "name": "continuable",
            "type": "boolean",
            "label": "Continuable"
          },
          {
            "name": "subsequentRequestToken",
            "type": "text",
            "label": "Subsequent Request Token"
          }
        ]
      }
    },
    {
      "id": 6,
      "module": "regexp:Parser",
      "version": 1,
      "parameters": {
        "pattern": "(?:^|[^a-z0-9._%+-])(?<email>[a-z0-9](?:[a-z0-9._%+-]{0,62}[a-z0-9])?@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63})(?![a-z0-9_%+@-])",
        "global": false,
        "sensitive": false,
        "multiline": false,
        "singleline": false,
        "continueWhenNoRes": false
      },
      "mapper": {
        "text": "{{join(merge(map(ifempty(5.textBlocks; emptyarray); \"snippet\"; \"type\"; \"paragraph,heading\"); map(flatten(map(ifempty(5.textBlocks; emptyarray); \"list\"; \"type\"; \"list\")); \"snippet\")); \" \")}}"
      },
      "metadata": {
        "designer": {
          "x": 1500,
          "y": 0
        },
        "parameters": [
          {
            "name": "pattern",
            "type": "text",
            "label": "Pattern",
            "required": true
          },
          {
            "name": "global",
            "type": "boolean",
            "label": "Global match",
            "required": true
          },
          {
            "name": "sensitive",
            "type": "boolean",
            "label": "Case sensitive",
            "required": true
          },
          {
            "name": "multiline",
            "type": "boolean",
            "label": "Multiline",
            "required": true
          },
          {
            "name": "singleline",
            "type": "boolean",
            "label": "Singleline",
            "required": true
          },
          {
            "name": "continueWhenNoRes",
            "type": "boolean",
            "label": "Continue the execution of the route even if the module finds no matches",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "text",
            "type": "text",
            "label": "Text"
          }
        ],
        "interface": [
          {
            "name": "email",
            "type": "text",
            "label": "email"
          }
        ]
      },
      "filter": {
        "name": "Successful AI Mode response",
        "conditions": [
          [
            {
              "a": "{{5.requestMetadata.status}}",
              "o": "text:equal",
              "b": "ok"
            }
          ]
        ]
      }
    },
    {
      "id": 7,
      "module": "builtin:BasicFeeder",
      "version": 1,
      "parameters": {},
      "mapper": {
        "array": "{{slice(distinct(ifempty(5.references; emptyarray); \"link\"); 0; 2)}}"
      },
      "metadata": {
        "designer": {
          "x": 1800,
          "y": 0
        }
      }
    },
    {
      "id": 8,
      "module": "regexp:Parser",
      "version": 1,
      "parameters": {
        "pattern": "^https?://(?:www\\.)?(?<host>(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,63})(?:/|$)",
        "global": false,
        "sensitive": false,
        "multiline": false,
        "singleline": false,
        "continueWhenNoRes": false
      },
      "mapper": {
        "text": "{{7.link}}"
      },
      "metadata": {
        "designer": {
          "x": 2100,
          "y": 0
        },
        "parameters": [
          {
            "name": "pattern",
            "type": "text",
            "label": "Pattern",
            "required": true
          },
          {
            "name": "global",
            "type": "boolean",
            "label": "Global match",
            "required": true
          },
          {
            "name": "sensitive",
            "type": "boolean",
            "label": "Case sensitive",
            "required": true
          },
          {
            "name": "multiline",
            "type": "boolean",
            "label": "Multiline",
            "required": true
          },
          {
            "name": "singleline",
            "type": "boolean",
            "label": "Singleline",
            "required": true
          },
          {
            "name": "continueWhenNoRes",
            "type": "boolean",
            "label": "Continue the execution of the route even if the module finds no matches",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "text",
            "type": "text",
            "label": "Text"
          }
        ],
        "interface": [
          {
            "name": "host",
            "type": "text",
            "label": "host"
          }
        ]
      }
    },
    {
      "id": 9,
      "module": "datastore:ExistRecord",
      "version": 1,
      "parameters": {},
      "mapper": {
        "key": "lead-v1|{{sha256(lower(trim(6.email)))}}"
      },
      "metadata": {
        "designer": {
          "x": 2400,
          "y": 0
        },
        "parameters": [
          {
            "name": "datastore",
            "type": "datastore",
            "label": "Data store",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "key",
            "type": "text",
            "label": "Key",
            "required": true
          }
        ]
      },
      "filter": {
        "name": "Cited page is on the business website",
        "conditions": [
          [
            {
              "a": "{{lower(8.host)}}",
              "o": "text:equal",
              "b": "{{lower(4.host)}}"
            },
            {
              "a": "{{length(6.email)}}",
              "o": "number:less",
              "b": "255"
            }
          ]
        ]
      }
    },
    {
      "id": 10,
      "module": "hasdata:webScraping",
      "version": 1,
      "parameters": {},
      "mapper": {
        "url": "{{7.link}}",
        "proxyType": "datacenter",
        "proxyCountry": "US",
        "jsRendering": false,
        "blockResources": true,
        "blockAds": true,
        "screenshot": false,
        "extractEmails": true,
        "extractLinks": false,
        "outputFormat": [
          "json",
          "html"
        ]
      },
      "metadata": {
        "designer": {
          "x": 2700,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:hasdata",
            "label": "Connection",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "url",
            "type": "url",
            "label": "URL",
            "required": true
          },
          {
            "name": "headers",
            "type": "json",
            "label": "Headers"
          },
          {
            "name": "proxyType",
            "type": "select",
            "label": "Proxy Type",
            "validate": {
              "enum": [
                "datacenter",
                "residential"
              ]
            }
          },
          {
            "name": "proxyCountry",
            "type": "select",
            "label": "Proxy Country",
            "validate": {
              "enum": [
                "US",
                "UK",
                "DE",
                "IE",
                "FR",
                "IT",
                "SE",
                "BR",
                "CA",
                "JP",
                "SG",
                "IN",
                "ID"
              ]
            }
          },
          {
            "name": "blockResources",
            "type": "boolean",
            "label": "Block Images And CSS"
          },
          {
            "name": "blockAds",
            "type": "boolean",
            "label": "Block ADS"
          },
          {
            "name": "blockUrls",
            "type": "json",
            "label": "Block URLs"
          },
          {
            "name": "wait",
            "type": "integer",
            "label": "Wait For A Time"
          },
          {
            "name": "waitFor",
            "type": "text",
            "label": "Wait For CSS Selector"
          },
          {
            "name": "jsScenario",
            "type": "json",
            "label": "JavaScript Execution"
          },
          {
            "name": "extractRules",
            "type": "json",
            "label": "Extraction Rules"
          },
          {
            "name": "screenshot",
            "type": "boolean",
            "label": "Screenshot"
          },
          {
            "name": "jsRendering",
            "type": "boolean",
            "label": "JS Rendering"
          },
          {
            "name": "extractEmails",
            "type": "boolean",
            "label": "Extract Emails"
          },
          {
            "name": "extractLinks",
            "type": "boolean",
            "label": "Extract Links"
          },
          {
            "name": "includeOnlyTags",
            "type": "json",
            "label": "Include Only Tags"
          },
          {
            "name": "excludeTags",
            "type": "json",
            "label": "Exclude Tags"
          },
          {
            "name": "removeBase64Images",
            "type": "boolean",
            "label": "Remove Base64 Images"
          },
          {
            "name": "outputFormat",
            "type": "select",
            "label": "Output Format",
            "multiple": true,
            "validate": {
              "enum": [
                "json",
                "html",
                "markdown",
                "text"
              ]
            }
          },
          {
            "name": "aiExtractRules",
            "type": "json",
            "label": "AI Extraction Rules"
          }
        ]
      },
      "filter": {
        "name": "No contact recorded for this email",
        "conditions": [
          [
            {
              "a": "{{9.exist}}",
              "o": "text:equal",
              "b": "false"
            }
          ]
        ]
      }
    },
    {
      "id": 11,
      "module": "hubspotcrm:createContact",
      "version": 2,
      "parameters": {},
      "mapper": {
        "_method": "compact",
        "parseCustomFields": true,
        "properties": [
          {
            "key": "email",
            "value": "{{lower(trim(6.email))}}"
          },
          {
            "key": "company",
            "value": "{{3.title}}"
          },
          {
            "key": "website",
            "value": "{{3.website}}"
          }
        ]
      },
      "metadata": {
        "designer": {
          "x": 3000,
          "y": 0
        },
        "parameters": [
          {
            "name": "__IMTCONN__",
            "type": "account:hubspotcrm",
            "label": "Connection",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "_method",
            "type": "select",
            "label": "View Method",
            "required": true,
            "validate": {
              "enum": [
                "compact",
                "all"
              ]
            }
          },
          {
            "name": "parseCustomFields",
            "type": "boolean",
            "label": "Parse Custom Fields",
            "required": true
          },
          {
            "name": "properties",
            "type": "array",
            "label": "Properties",
            "spec": [
              {
                "name": "key",
                "type": "select",
                "label": "Key",
                "dynamic": true
              },
              {
                "name": "value",
                "type": "any",
                "label": "Value"
              }
            ]
          }
        ]
      },
      "filter": {
        "name": "Candidate email also occurs in the scraped page",
        "conditions": [
          [
            {
              "a": "{{10.requestMetadata.status}}",
              "o": "text:equal",
              "b": "ok"
            },
            {
              "a": "{{10.statusCode}}",
              "o": "number:greater",
              "b": "199"
            },
            {
              "a": "{{10.statusCode}}",
              "o": "number:less",
              "b": "300"
            },
            {
              "a": "{{length(replace(join(ifempty(10.emails; emptyarray); emptystring); \"|\"; emptystring))}}",
              "o": "number:equal",
              "b": "{{length(join(ifempty(10.emails; emptyarray); emptystring))}}"
            },
            {
              "a": "{{contains(split(lower(join(ifempty(10.emails; emptyarray); \"|\")); \"|\"); lower(trim(6.email)))}}",
              "o": "text:equal",
              "b": "true"
            }
          ]
        ]
      }
    },
    {
      "id": 12,
      "module": "datastore:AddRecord",
      "version": 1,
      "parameters": {},
      "mapper": {
        "key": "lead-v1|{{sha256(lower(trim(6.email)))}}",
        "overwrite": false,
        "data": {
          "email": "{{lower(trim(6.email))}}",
          "company": "{{3.title}}",
          "website": "{{3.website}}",
          "sourceUrl": "{{7.link}}",
          "checkedAt": "{{formatDate(now; \"YYYY-MM-DD HH:mm:ss\"; \"UTC\")}}",
          "evidenceStatus": "Email occurred in returned source page; ownership and deliverability not verified"
        }
      },
      "metadata": {
        "designer": {
          "x": 3300,
          "y": 0
        },
        "parameters": [
          {
            "name": "datastore",
            "type": "datastore",
            "label": "Data store",
            "required": true
          }
        ],
        "expect": [
          {
            "name": "key",
            "type": "text",
            "label": "Key"
          },
          {
            "name": "overwrite",
            "type": "boolean",
            "label": "Overwrite an existing record",
            "required": true
          },
          {
            "name": "data",
            "spec": [
              {
                "name": "email",
                "type": "text",
                "label": "email"
              },
              {
                "name": "company",
                "type": "text",
                "label": "company"
              },
              {
                "name": "website",
                "type": "text",
                "label": "website"
              },
              {
                "name": "sourceUrl",
                "type": "text",
                "label": "sourceUrl"
              },
              {
                "name": "checkedAt",
                "type": "text",
                "label": "checkedAt"
              },
              {
                "name": "evidenceStatus",
                "type": "text",
                "label": "evidenceStatus"
              }
            ],
            "type": "collection",
            "label": "Record"
          }
        ]
      }
    }
  ],
  "metadata": {
    "instant": false,
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": true,
      "slots": null,
      "confidential": false,
      "dataloss": false,
      "dlq": false,
      "freshVariables": false
    },
    "designer": {
      "orphans": []
    },
    "notes": []
  }
}
