{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "0C778AC7-7C59-4DAB-A7FF-2FAC73E63F3A",
    "name": "Morse: inbound sales emails into HubSpot"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -36.502732240437155,
        "y": 12.180824639841035,
        "zoom": 0.7
      },
      "autoSave": false,
      "descriptions": {
        "flow": "Checks the sales inbox in Gmail for new emails. Morse Extract Structured Data reads each one on attested secure hardware (TEE) and returns the sender's name, company, role, request, budget and timeline. A known HubSpot contact gets the request added; a new sender becomes a contact with the extracted fields. Fields the email did not state stay empty.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "Checks the sales inbox in Gmail for new emails. Morse Extract Structured Data reads each one on attested secure hardware (TEE) and returns the sender's name, company, role, request, budget and timeline. A known HubSpot contact gets the request added; a new sender becomes a contact with the extracted fields. Fields the email did not state stay empty.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "error-handler",
          "isFirstElement": false,
          "blockDefinitionId": "error-handler",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Not in HubSpot yet Result"
          },
          "position": {
            "x": 1543,
            "y": 49
          }
        },
        "flowElementId": "2A2E4BCA-DE54-49E6-ADB6-50968438EEF4",
        "groupId": null,
        "id": "1C9A775B-4CA6-46EA-A4FF-3C6112E39A5D",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Lookup failed",
          "saveToVariable": null,
          "storeResult": true
        },
        "name": "Not in HubSpot yet",
        "nextElementIds": [
          "00F58001-D949-4D12-B42F-390B06A93AE5"
        ],
        "nextGroupIds": [],
        "type": "ERROR_HANDLER"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Prepare the HubSpot fields Result"
          },
          "position": {
            "x": 826,
            "y": 49
          }
        },
        "flowElementId": "93342909-3FC0-4516-9363-9F32AA93E3D5",
        "groupId": null,
        "id": "FD50DF93-6285-4310-877D-4E44E3201016",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "fields",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Fields",
                    "subPathSegments": [
                      {
                        "key": "data",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "4D1FB47C-1F36-4772-A249-F4FE1755D93B"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fromName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "fromName",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "receivedAt",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const f = fields || {};\nconst clean = v => (v === null || v === undefined) ? '' : String(v).trim();\nconst nameText = clean(f.name) || clean(fromName);\nconst parts = nameText.split(/\\s+/).filter(Boolean);\nconst firstname = parts.shift() || '';\nconst lastname = parts.join(' ');\nconst lines = [];\nif (clean(f.request)) lines.push(`Request: ${clean(f.request)}`);\nif (clean(f.budget)) lines.push(`Budget: ${clean(f.budget)}`);\nif (clean(f.timeline)) lines.push(`Timeline: ${clean(f.timeline)}`);\nlines.push(`From the email \"${clean(subject)}\" received ${clean(receivedAt)}.`);\nconst message = lines.join('\\n');\n// Every field: for a sender HubSpot does not know yet. Fields the email did not state are left out, not guessed.\nconst forNew = [{ property: 'email', value: clean(email) }];\nif (firstname) forNew.push({ property: 'firstname', value: firstname });\nif (lastname) forNew.push({ property: 'lastname', value: lastname });\nif (clean(f.company)) forNew.push({ property: 'company', value: clean(f.company) });\nif (clean(f.role)) forNew.push({ property: 'jobtitle', value: clean(f.role) });\nforNew.push({ property: 'message', value: message });\n// Only the new request: for a contact HubSpot already has.\nconst forKnown = [{ property: 'message', value: message }];\nreturn { forNew, forKnown, message, firstname, lastname };"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "HubSpot fields",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Prepare the HubSpot fields",
        "nextElementIds": [
          "A236B818-2434-4F51-9FB3-E99B60F7C041"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Creates a new contact record in your HubSpot account with the specified properties. The contact will be assigned a unique visitor ID (vid) for future reference. At least one property must be provided to create the contact successfully.",
          "elementId": "EXTENSION:::SHARED:::default:::hubspot:::createContact",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Create the contact Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::hubspot:::createContact",
          "legacyElementId": "JS###v1###HubSpotService###createContact",
          "methodName": "createContact",
          "position": {
            "x": 1843,
            "y": 40
          }
        },
        "flowElementId": "658DAC21-77DC-438C-A471-A7EFB8D4E0AC",
        "groupId": null,
        "id": "00F58001-D949-4D12-B42F-390B06A93AE5",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "properties",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "HubSpot fields",
                    "subPathSegments": [
                      {
                        "key": "forNew",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "FD50DF93-6285-4310-877D-4E44E3201016"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Create the contact', Error: OAuth Connection is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "createContact",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "New contact",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "hubspot",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Create the contact",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Reads a text with a Morse model that follows a JSON schema and returns the extracted fields as Data, a parsed object, alongside the full response with usage and its cost in US dollars. Use it to pull names, amounts, dates or intents out of emails, tickets and form answers. Pick a model from the list: it shows only the models that take a JSON schema. Fails when the answer is not valid JSON, for example when it was cut off at Max Tokens.",
          "elementId": "EXTENSION:::SHARED:::default:::morse:::extractStructuredData",
          "isFirstElement": false,
          "dynamicOptionLabels": {
            "model": {
              "moonshotai/kimi-k3.1-pro": "Kimi K3.1 Pro"
            }
          },
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Pull the fields out of the email Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::morse:::extractStructuredData",
          "legacyElementId": null,
          "methodName": "extractStructuredData",
          "position": {
            "x": 463,
            "y": 40
          }
        },
        "flowElementId": "02E312DC-C215-41AF-9945-BAD2786F1DEE",
        "groupId": null,
        "id": "4D1FB47C-1F36-4772-A249-F4FE1755D93B",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "model",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "moonshotai/kimi-k3.1-pro"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "text",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "From: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "fromName",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " <"
                  },
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": ">\nSubject: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\nReceived: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "date",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "\n\n"
                  },
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "message",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "schema",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "JSON",
                    "label": null,
                    "parsedValue": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The sender's full name as signed or stated in the email"
                        },
                        "company": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The sender's company, only if the email states it"
                        },
                        "role": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The sender's job title or role, only if stated"
                        },
                        "request": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "What the sender is asking for, in one or two sentences"
                        },
                        "budget": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The budget as the sender wrote it, only if stated"
                        },
                        "timeline": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "When the sender wants this, as written, only if stated"
                        }
                      },
                      "required": [
                        "name",
                        "company",
                        "role",
                        "request",
                        "budget",
                        "timeline"
                      ],
                      "additionalProperties": false
                    },
                    "type": "INPUT",
                    "value": "{\"type\":\"object\",\"properties\":{\"name\":{\"type\":[\"string\",\"null\"],\"description\":\"The sender's full name as signed or stated in the email\"},\"company\":{\"type\":[\"string\",\"null\"],\"description\":\"The sender's company, only if the email states it\"},\"role\":{\"type\":[\"string\",\"null\"],\"description\":\"The sender's job title or role, only if stated\"},\"request\":{\"type\":[\"string\",\"null\"],\"description\":\"What the sender is asking for, in one or two sentences\"},\"budget\":{\"type\":[\"string\",\"null\"],\"description\":\"The budget as the sender wrote it, only if stated\"},\"timeline\":{\"type\":[\"string\",\"null\"],\"description\":\"When the sender wants this, as written, only if stated\"}},\"required\":[\"name\",\"company\",\"role\",\"request\",\"budget\",\"timeline\"],\"additionalProperties\":false}"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "schemaName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "inbound_sales_email"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "strict",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "instructions",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "You read inbound sales emails for a sales team. Fill each field only from what the email says. Leave a field null when the email does not state it. Do not guess a company from the email domain, do not infer a budget or timeline, and do not add anything the sender did not write."
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxTokens",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "temperature",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reasoningEffort",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "minPrivacy",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "tee"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "zeroDataRetention",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_TRUE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": true
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxPricePrompt",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "maxPriceCompletion",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "privacyVeil",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "privacyVeilReport",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "privacyVeilRestore",
              "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": "extractStructuredData",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Fields",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "morse",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Pull the fields out of the email",
        "nextElementIds": [
          "FD50DF93-6285-4310-877D-4E44E3201016"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Updates an existing contact in HubSpot with new property values. Only the properties specified in the request will be updated, leaving all other contact data unchanged. Property updates include optional timestamps for historical tracking.",
          "elementId": "EXTENSION:::SHARED:::default:::hubspot:::updateContact",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Add the request to the contact Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::hubspot:::updateContact",
          "legacyElementId": "JS###v1###HubSpotService###updateContact",
          "methodName": "updateContact",
          "position": {
            "x": 1173,
            "y": 210
          }
        },
        "flowElementId": "53EBAF40-655D-4846-9C68-97961AC32FA8",
        "groupId": null,
        "id": "DCEF2BC3-8128-44A5-82F9-D3E82CB63635",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "vid",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Known contact",
                    "subPathSegments": [
                      {
                        "key": "vid",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "A236B818-2434-4F51-9FB3-E99B60F7C041"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "properties",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "HubSpot fields",
                    "subPathSegments": [
                      {
                        "key": "forKnown",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "FD50DF93-6285-4310-877D-4E44E3201016"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Add the request to the contact', Error: OAuth Connection is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "updateContact",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Updated contact",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "hubspot",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Add the request to the contact",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Retrieves detailed contact information by email address. This method searches for and returns a single contact record matching the provided email, including all property data, form submissions, and associated company details.",
          "elementId": "EXTENSION:::SHARED:::default:::hubspot:::getContactByEmail",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Look the sender up in HubSpot Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::hubspot:::getContactByEmail",
          "legacyElementId": "JS###v1###HubSpotService###getContactByEmail",
          "methodName": "getContactByEmail",
          "position": {
            "x": 1172,
            "y": 40
          }
        },
        "flowElementId": "E982B382-6577-455A-8625-F188A35F3B29",
        "groupId": null,
        "id": "A236B818-2434-4F51-9FB3-E99B60F7C041",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "contact_email",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Sales email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "B356F383-B3F5-4C8C-9870-450CA5008776"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "property",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "propertyMode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "value_only"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "formSubmissionMode",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "none"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "showListMemberships",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "K_FALSE",
                    "label": null,
                    "type": "KEYWORD",
                    "value": false
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "clientValidationState": {
            "errorMessage": "Block: 'Look the sender up in HubSpot', Error: OAuth Connection is required",
            "valid": false
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "getContactByEmail",
          "onFailElemId": "1C9A775B-4CA6-46EA-A4FF-3C6112E39A5D",
          "packageId": "default",
          "resultAlias": "Known contact",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "hubspot",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Look the sender up in HubSpot",
        "nextElementIds": [
          "DCEF2BC3-8128-44A5-82F9-D3E82CB63635"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Triggers when new emails arrive. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewEmail",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewEmail",
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewEmail",
          "legacyElementId": "JS###v1###GmailService###onNewEmail",
          "methodName": "onNewEmail",
          "position": {
            "x": 110,
            "y": 40
          }
        },
        "flowElementId": "5196ABF1-280A-4992-88C8-7C46E54DA049",
        "groupId": null,
        "id": "B356F383-B3F5-4C8C-9870-450CA5008776",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewEmail",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Sales email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "in:inbox"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New email in the sales inbox",
        "nextElementIds": [
          "4D1FB47C-1F36-4772-A249-F4FE1755D93B"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      }
    ],
    "firstElementId": "B356F383-B3F5-4C8C-9870-450CA5008776",
    "groups": [],
    "id": "C458BF54-D806-4705-93A1-F75F62DB7483",
    "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": [],
      "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:36.063Z"
}
