{
  "elementsLearnedData": [],
  "elementsTestData": [],
  "flow": {
    "id": "42209024-DE64-4872-A84E-558DB3E77614",
    "name": "Gmail: carrier setup packet check"
  },
  "flowVersion": {
    "clientMetadata": {
      "viewport": {
        "x": -46.03351955307262,
        "y": -61.67597765363128,
        "zoom": 0.78
      },
      "autoSave": false,
      "descriptions": {
        "flow": "When a carrier emails a setup packet, reads every attachment, checks for a signed W-9, a current certificate of insurance with auto liability and cargo, and an MC or DOT number. A packet with gaps gets a reply listing what is missing; a complete one goes to the carrier setup lead in Slack to approve.",
        "initialData": "",
        "initialDataFields": {}
      }
    },
    "description": "When a carrier emails a setup packet, reads every attachment, checks for a signed W-9, a current certificate of insurance with auto liability and cargo, and an MC or DOT number. A packet with gaps gets a reply listing what is missing; a complete one goes to the carrier setup lead in Slack to approve.",
    "elements": [
      {
        "clientMetadata": {
          "elementId": "data-bucket",
          "isFirstElement": false,
          "blockDefinitionId": "data-bucket",
          "fieldKeys": {
            "documents": "67602bda-a7a1-4219-9adf-3fb41dc64904"
          },
          "position": {
            "x": 881,
            "y": 139
          }
        },
        "flowElementId": "F75FF362-F3AA-4A23-8FB4-9857C6754675",
        "groupId": null,
        "id": "734020E0-C800-41CB-B744-120113B27BC3",
        "metaInfo": {
          "bucketName": "Default",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "fields": [
            {
              "name": "documents",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EMPTY_LIST",
                    "label": null,
                    "type": "KEYWORD",
                    "value": "arrays.create()"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "bucket",
          "storeResult": true
        },
        "name": "Start the document list",
        "nextElementIds": [],
        "nextGroupIds": [
          "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
        ],
        "type": "DATA_BUCKET"
      },
      {
        "clientMetadata": {
          "notes": "Triggers when an email with a new attachment is received. Polling interval can be customized (minimum 30 seconds).",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "isFirstElement": true,
          "blockDefinitionId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::onNewAttachment",
          "legacyElementId": "JS###v1###GmailService###onNewAttachment",
          "methodName": "onNewAttachment",
          "position": {
            "x": 497,
            "y": 130
          }
        },
        "flowElementId": "7BD18B67-B881-457D-B331-DD1A72E9D8ED",
        "groupId": null,
        "id": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "connectionId": null,
          "dynamicData": [],
          "eventName": "onNewAttachment",
          "frequency": {
            "repeat": {
              "every": 300
            },
            "schedule": "custom"
          },
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Packet email",
          "serviceId": "gmail-service",
          "slaConditions": [],
          "staticData": {
            "query": "subject:(setup OR \"carrier packet\" OR onboarding OR W-9 OR W9 OR COI OR \"certificate of insurance\")"
          },
          "storeResult": true,
          "subtype": "POLLING",
          "type": "CUSTOM"
        },
        "name": "New setup packet email",
        "nextElementIds": [
          "734020E0-C800-41CB-B744-120113B27BC3"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": true,
          "blockDefinitionId": "condition",
          "position": {
            "x": 110,
            "y": 49
          }
        },
        "flowElementId": "A284F666-BED9-4892-90D1-14E89B980457",
        "groupId": "CB5B42A2-69FE-4335-B519-D8E0E75717BA",
        "id": "F05BDB4E-9991-4E97-A8EC-55C97B9E5691",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "f6f31389-5273-4543-ae02-3cbee94139e6",
                "nestedOperation": null,
                "operation": "startsWith",
                "property": {
                  "expression": [
                    {
                      "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "label": null,
                      "subPathSegments": [
                        {
                          "key": "mimetype",
                          "optional": false
                        }
                      ],
                      "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "application/pdf"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              },
              {
                "id": "676e4d10-54dc-4792-8f6a-4538148835ad",
                "nestedOperation": null,
                "operation": "startsWith",
                "property": {
                  "expression": [
                    {
                      "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "label": null,
                      "subPathSegments": [
                        {
                          "key": "mimetype",
                          "optional": false
                        }
                      ],
                      "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                      "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "image/"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "f6f31389-5273-4543-ae02-3cbee94139e6",
              "OR",
              "676e4d10-54dc-4792-8f6a-4538148835ad"
            ]
          },
          "elseComponent": null,
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Is a document",
          "storeResult": false,
          "thenComponent": {
            "componentId": "2AC64A2D-E3E0-41C7-954E-89FD47E5406C",
            "componentType": "ELEMENT"
          }
        },
        "name": "PDF or image?",
        "nextElementIds": [
          "2AC64A2D-E3E0-41C7-954E-89FD47E5406C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": true,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "documents"
          },
          "position": {
            "x": 1012,
            "y": 49
          }
        },
        "flowElementId": "0AFB9B38-A2ED-4E8B-85E6-6C617CAE1552",
        "groupId": "CB5B42A2-69FE-4335-B519-D8E0E75717BA",
        "id": "2B6EAC3E-1432-46CC-BD38-1C37C55DC9C1",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "codeArguments": [
            {
              "name": "documents",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - documents",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.documents",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "documents",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "reading",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Document reading",
                    "subPathSegments": [
                      {
                        "key": "output",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "D2214070-A712-4925-A9C4-67E6C6AEC56C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileUrl",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Saved document",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2AC64A2D-E3E0-41C7-954E-89FD47E5406C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            }
          ],
          "codeBody": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "const list = Array.isArray(documents) ? documents : [];\nconst out = reading && typeof reading === 'object' ? reading : {};\nreturn [...list, { ...out, fileName, fileUrl }];"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Packet so far",
          "retryPolicy": null,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "documents"
          },
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Add it to the packet",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "ai-agent",
          "isFirstElement": false,
          "blockDefinitionId": "ai-agent",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Read the document Result"
          },
          "tools": {},
          "position": {
            "x": 712,
            "y": 49
          }
        },
        "flowElementId": "ED998511-53C3-4C3A-89F4-00AF319ACF6E",
        "groupId": "CB5B42A2-69FE-4335-B519-D8E0E75717BA",
        "id": "D2214070-A712-4925-A9C4-67E6C6AEC56C",
        "metaInfo": {
          "aiApiKey": null,
          "aiModel": "claude-sonnet-5",
          "aiProvider": "ANTHROPIC",
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "dynamicAiApiKey": {
            "expression": [
              {
                "id": "PLACEHOLDER_DATA",
                "label": "Anthropic key",
                "subPathSegments": null,
                "type": "EXECUTION_CONTEXT_STATIC_DATA",
                "value": "Anthropic key"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "files": [
            {
              "mimeType": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "mimetype",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
                  },
                  {
                    "id": "EMPTY_STRING",
                    "label": null,
                    "type": "KEYWORD",
                    "value": ""
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              },
              "url": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Saved document",
                    "subPathSegments": [
                      {
                        "key": "fileUrl",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "2AC64A2D-E3E0-41C7-954E-89FD47E5406C"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": "STRING"
              }
            }
          ],
          "forceParsedOutput": true,
          "langSmithSettings": {
            "enabled": false,
            "apiKey": null,
            "projectName": null,
            "label": "FlowRunner AI-Agent",
            "accountCluster": "US"
          },
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "messagesHistoryEnabled": false,
          "messagesHistoryLimit": 15,
          "onFailElemId": null,
          "resultAlias": "Document reading",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "systemPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "You read the documents a trucking company sends a freight broker to get set up as a carrier. Each call gives you one file from the setup packet. Say what the file is and pull out what it shows. Reply with JSON only, with these fields:\ndocumentType: W9 for an IRS Form W-9, COI for a certificate of insurance, AUTHORITY for an FMCSA operating authority letter or MC certificate, AGREEMENT for a signed broker-carrier agreement, OTHER for anything else\nlegalName: the legal business name on the document, or empty text\ntin: the taxpayer identification number (EIN or SSN) on a W-9, or empty text\nw9Signed: true if the W-9 is signed and dated, false otherwise\nautoLiability: true if a certificate of insurance lists automobile liability coverage, false otherwise\nautoLiabilityLimit: the automobile liability limit as a number in dollars, or null\ncargo: true if a certificate of insurance lists motor truck cargo coverage, false otherwise\ncargoLimit: the cargo limit as a number in dollars, or null\nexpiryDate: the earliest expiration date of the automobile liability and cargo policies, as YYYY-MM-DD, or empty text\nmcNumber: the MC docket number shown, digits only, or empty text\ndotNumber: the USDOT number shown, digits only, or empty text\nnote: one short sentence on anything a carrier setup person should know, or empty text"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "tools": [],
          "type": "AI_AGENT",
          "userPrompt": {
            "expression": [
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "File name: "
              },
              {
                "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                "label": null,
                "subPathSegments": [
                  {
                    "key": "filename",
                    "optional": false
                  }
                ],
                "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": "\nSent by "
              },
              {
                "id": "RESULT",
                "label": "Packet email",
                "subPathSegments": [
                  {
                    "key": "fromName",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": " <"
              },
              {
                "id": "RESULT",
                "label": "Packet email",
                "subPathSegments": [
                  {
                    "key": "fromAddress",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
              },
              {
                "id": "TEXT",
                "label": null,
                "type": "INPUT",
                "value": ">\nSubject: "
              },
              {
                "id": "RESULT",
                "label": "Packet email",
                "subPathSegments": [
                  {
                    "key": "subject",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          }
        },
        "name": "Read the document",
        "nextElementIds": [
          "2B6EAC3E-1432-46CC-BD38-1C37C55DC9C1"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Saves a Gmail attachment to FlowRunner Files and returns the file URL.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Save the attachment Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::saveAttachment",
          "legacyElementId": "JS###v1###GmailService###saveAttachment",
          "methodName": "saveAttachment",
          "position": {
            "x": 410,
            "y": 40
          }
        },
        "flowElementId": "48CA7EFE-178C-4174-AAA2-2D1A583C2C6C",
        "groupId": "CB5B42A2-69FE-4335-B519-D8E0E75717BA",
        "id": "2AC64A2D-E3E0-41C7-954E-89FD47E5406C",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "messageId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachmentId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "id",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "fileName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "label": null,
                    "subPathSegments": [
                      {
                        "key": "filename",
                        "optional": false
                      }
                    ],
                    "type": "LIST_ITERATOR_CURRENT_ELEMENT",
                    "value": "CB5B42A2-69FE-4335-B519-D8E0E75717BA"
                  }
                ],
                "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": "saveAttachment",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Saved document",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Save the attachment",
        "nextElementIds": [
          "D2214070-A712-4925-A9C4-67E6C6AEC56C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "external-callback",
          "isFirstElement": false,
          "blockDefinitionId": "external-callback",
          "position": {
            "x": 849,
            "y": 309
          }
        },
        "flowElementId": "D1261F07-CD37-444F-9836-0747DB00C10E",
        "groupId": null,
        "id": "C3B3CED2-7D8F-4024-B700-C3626A5C3584",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": null,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": null
          },
          "onFailElemId": null,
          "resultAlias": "Setup decision",
          "slaConditions": [],
          "storeResult": true,
          "type": "CALLBACK"
        },
        "name": "Wait for the setup lead's answer",
        "nextElementIds": [
          "5CAD54A2-D54D-48AA-B351-6BD3FAD68EB7"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "TRIGGER"
      },
      {
        "clientMetadata": {
          "notes": "Sends emails through Gmail for AI agents to automate customer communication.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Email the carrier what's missing Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 1230,
            "y": 430
          }
        },
        "flowElementId": "A4776FB9-5D3C-4BB8-A623-27EEE267B7C8",
        "groupId": null,
        "id": "B67C6ECF-6D65-4901-9BAC-2EA76AD7A517",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Re: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "plain"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyContent",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Packet check",
                    "subPathSegments": [
                      {
                        "key": "missingEmail",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bcc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "threadId",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachments",
              "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": "sendMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Missing items email",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Email the carrier what's missing",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "notes": "Sends emails through Gmail for AI agents to automate customer communication.",
          "elementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "isFirstElement": false,
          "blockDefinitionId": "api-service-method",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Tell the carrier they're approved Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::gmail-service:::sendMessage",
          "legacyElementId": "JS###v1###GmailService###sendMessage",
          "methodName": "sendMessage",
          "position": {
            "x": 469,
            "y": 600
          }
        },
        "flowElementId": "16B0678F-1299-4A4A-B8DA-A3862FD83F1A",
        "groupId": null,
        "id": "20519CA3-14FB-4146-B5A2-EAB9081A7676",
        "metaInfo": {
          "bodyParams": [
            {
              "name": "to",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "subject",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "Re: "
                  },
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "subject",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyType",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": "plain"
                  }
                ],
                "mode": "BASIC",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bodyContent",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Packet check",
                    "subPathSegments": [
                      {
                        "key": "approvedEmail",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "from",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "cc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "bcc",
              "type": "SIMPLE",
              "value": {
                "expression": [],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "threadId",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "attachments",
              "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": "sendMessage",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Approval email",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "gmail-service",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Tell the carrier they're approved",
        "nextElementIds": [],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "custom-cloud-code",
          "isFirstElement": false,
          "blockDefinitionId": "custom-cloud-code",
          "setResultToVariable": false,
          "saveToVariable": {
            "dataBucket": "Default",
            "variable": "Check what is missing Result"
          },
          "position": {
            "x": 1607,
            "y": 139
          }
        },
        "flowElementId": "03F51D2F-E040-450A-B1E7-ECE5283A59E3",
        "groupId": null,
        "id": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": "Block: 'Check what is missing', Error: The placeholder \"Answer link\" has no value",
            "valid": false
          },
          "codeArguments": [
            {
              "name": "documents",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "EXECUTION_CONTEXT_DATA_BUCKET_VARIABLE",
                    "label": "Default - documents",
                    "subPathSegments": null,
                    "type": "EXECUTION_CONTEXT_PATH",
                    "value": "executionContext.dataBuckets.Default.documents",
                    "valueSegments": [
                      {
                        "key": "executionContext",
                        "optional": false
                      },
                      {
                        "key": "dataBuckets",
                        "optional": false
                      },
                      {
                        "key": "Default",
                        "optional": false
                      },
                      {
                        "key": "documents",
                        "optional": false
                      }
                    ]
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "senderName",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "fromName",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "senderAddress",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "RESULT",
                    "label": "Packet email",
                    "subPathSegments": [
                      {
                        "key": "fromAddress",
                        "optional": false
                      }
                    ],
                    "type": "TRIGGER_DATA",
                    "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
                  }
                ],
                "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 docs = Array.isArray(documents) ? documents.filter(d => d && typeof d === 'object') : [];\nconst today = new Date().toISOString().slice(0, 10);\nconst money = (n) => (typeof n === 'number' ? `$${n.toLocaleString('en-US')}` : 'not shown');\nconst w9s = docs.filter(d => d.documentType === 'W9');\nconst cois = docs.filter(d => d.documentType === 'COI');\nconst goodW9 = w9s.find(d => d.w9Signed === true && d.legalName && d.tin);\nconst goodCoi = cois.find(d => d.autoLiability === true && d.cargo === true && d.expiryDate && d.expiryDate >= today);\nconst mc = (docs.find(d => d.mcNumber) || {}).mcNumber || '';\nconst dot = (docs.find(d => d.dotNumber) || {}).dotNumber || '';\n\nconst missing = [];\nif (!w9s.length) {\n  missing.push('A signed W-9. We did not find one in your email.');\n} else if (!goodW9) {\n  const w = w9s[0];\n  const gaps = [];\n  if (w.w9Signed !== true) gaps.push('it is not signed and dated');\n  if (!w.legalName) gaps.push('the legal name is blank');\n  if (!w.tin) gaps.push('the TIN is blank');\n  missing.push(`A complete W-9. On the one you sent, ${gaps.join(', ')}.`);\n}\nif (!cois.length) {\n  missing.push('A certificate of insurance showing auto liability and cargo coverage.');\n} else if (!goodCoi) {\n  const c = cois[0];\n  const gaps = [];\n  if (c.autoLiability !== true) gaps.push('auto liability coverage is not listed');\n  if (c.cargo !== true) gaps.push('cargo coverage is not listed');\n  if (!c.expiryDate) gaps.push('no expiration date is shown');\n  else if (c.expiryDate < today) gaps.push(`the coverage expired on ${c.expiryDate}`);\n  missing.push(`A current certificate of insurance. On the one you sent, ${gaps.join(', ')}.`);\n}\nif (!mc && !dot) missing.push('Your MC or USDOT number, or a copy of your operating authority.');\n\nconst carrierName = (goodW9 && goodW9.legalName) || (w9s[0] && w9s[0].legalName) || (cois[0] && cois[0].legalName) || senderName || senderAddress;\nconst hello = senderName ? `Hi ${senderName},` : 'Hello,';\nconst missingEmail = [\n  hello,\n  '',\n  'Thanks for sending your carrier setup paperwork. Before we can finish setting you up, we still need:',\n  '',\n  ...missing.map(m => `- ${m}`),\n  '',\n  'Please reply to this email with the missing documents.',\n  '',\n  'Thank you',\n].join('\\n');\nconst approvedEmail = [\n  hello,\n  '',\n  'Thanks for sending your carrier setup paperwork. Your W-9, certificate of insurance and authority have been reviewed and approved.',\n  '',\n  'Thank you',\n].join('\\n');\n\nconst tin = goodW9 ? String(goodW9.tin).replace(/\\D/g, '') : '';\nconst link = (decision) => `${answerLink}?execution=${encodeURIComponent(executionId)}&decision=${decision}`;\nconst files = docs.map(d => `<${d.fileUrl}|${d.fileName}>`).join(', ');\nconst notes = docs.map(d => d.note).filter(Boolean);\nconst lines = [\n  `*Carrier setup packet ready for approval: ${carrierName}*`,\n  `From: ${senderName || ''} ${senderAddress}`.trim(),\n  goodW9 ? `W-9: ${goodW9.legalName}, TIN ending ${tin.slice(-4)}, signed` : null,\n  goodCoi ? `Insurance: auto liability ${money(goodCoi.autoLiabilityLimit)}, cargo ${money(goodCoi.cargoLimit)}, expires ${goodCoi.expiryDate}` : null,\n  `Authority: ${[mc ? `MC ${mc}` : null, dot ? `USDOT ${dot}` : null].filter(Boolean).join(', ')}`,\n  notes.length ? `Notes: ${notes.join(' ')}` : null,\n  files ? `Files: ${files}` : null,\n].filter(Boolean);\n\nreturn {\n  complete: missing.length === 0,\n  carrierName,\n  missing,\n  missingEmail,\n  approvedEmail,\n  text: `Carrier setup packet ready for approval: ${carrierName}`,\n  blocks: [\n    { type: 'section', text: { type: 'mrkdwn', text: lines.join('\\n') } },\n    { type: 'actions', elements: [\n      { type: 'button', style: 'primary', text: { type: 'plain_text', text: 'Approve' }, url: link('approve') },\n      { type: 'button', text: { type: 'plain_text', text: 'Do not approve' }, url: link('reject') },\n    ] },\n  ],\n};\n"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "enabled": true,
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "onFailElemId": null,
          "resultAlias": "Packet check",
          "retryPolicy": null,
          "saveToVariable": null,
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "type": "CUSTOM_CLOUD_CODE"
        },
        "name": "Check what is missing",
        "nextElementIds": [
          "6DC25CF3-22CA-4189-A253-173DC3DEFF2C"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 1614,
            "y": 309
          }
        },
        "flowElementId": "6C2542AE-A2D7-4907-8D17-3D033412B05D",
        "groupId": null,
        "id": "6DC25CF3-22CA-4189-A253-173DC3DEFF2C",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "d568f113-6055-40fc-9090-03cafa01a206",
                "nestedOperation": null,
                "operation": "isTrue",
                "property": {
                  "expression": [
                    {
                      "id": "ELEMENT_RESULT",
                      "label": "Packet check",
                      "subPathSegments": [
                        {
                          "key": "complete",
                          "optional": false
                        }
                      ],
                      "type": "ELEMENT_LINK",
                      "value": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "BOOLEAN",
                "values": []
              }
            ],
            "grouping": [
              "d568f113-6055-40fc-9090-03cafa01a206"
            ]
          },
          "elseComponent": {
            "componentId": "B67C6ECF-6D65-4901-9BAC-2EA76AD7A517",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Packet complete",
          "storeResult": false,
          "thenComponent": {
            "componentId": "DB82602D-B05E-49A9-B9B0-5BD6C46E63D5",
            "componentType": "ELEMENT"
          }
        },
        "name": "Packet complete?",
        "nextElementIds": [
          "B67C6ECF-6D65-4901-9BAC-2EA76AD7A517",
          "DB82602D-B05E-49A9-B9B0-5BD6C46E63D5"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "preferredDateFormats": []
        },
        "type": "CONDITION"
      },
      {
        "clientMetadata": {
          "elementId": "condition",
          "isFirstElement": false,
          "blockDefinitionId": "condition",
          "position": {
            "x": 509,
            "y": 309
          }
        },
        "flowElementId": "3012AD9D-D3AC-4AC6-91F7-607489C8369F",
        "groupId": null,
        "id": "5CAD54A2-D54D-48AA-B351-6BD3FAD68EB7",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "condition": {
            "conditionParts": [
              {
                "id": "f06d2ab7-9631-4abe-908e-be62c4e33c58",
                "nestedOperation": null,
                "operation": "equal",
                "property": {
                  "expression": [
                    {
                      "id": "RESULT",
                      "label": "Setup decision",
                      "subPathSegments": [
                        {
                          "key": "decision",
                          "optional": false
                        }
                      ],
                      "type": "TRIGGER_DATA",
                      "value": "C3B3CED2-7D8F-4024-B700-C3626A5C3584"
                    }
                  ],
                  "mode": "EXPRESSION",
                  "parseJsonString": false,
                  "resultType": null
                },
                "propertyType": "STRING",
                "values": [
                  {
                    "expression": [
                      {
                        "id": "TEXT",
                        "label": null,
                        "type": "INPUT",
                        "value": "approve"
                      }
                    ],
                    "mode": "EXPRESSION",
                    "parseJsonString": false,
                    "resultType": null
                  }
                ]
              }
            ],
            "grouping": [
              "f06d2ab7-9631-4abe-908e-be62c4e33c58"
            ]
          },
          "elseComponent": {
            "componentId": "37A7A303-B8DF-42E4-81D7-1F6BBA2DA6E4",
            "componentType": "ELEMENT"
          },
          "logging": null,
          "onFailElemId": null,
          "resultAlias": "Approved",
          "storeResult": false,
          "thenComponent": {
            "componentId": "20519CA3-14FB-4146-B5A2-EAB9081A7676",
            "componentType": "ELEMENT"
          }
        },
        "name": "Approved?",
        "nextElementIds": [
          "37A7A303-B8DF-42E4-81D7-1F6BBA2DA6E4",
          "20519CA3-14FB-4146-B5A2-EAB9081A7676"
        ],
        "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 the carrier is on hold Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 110,
            "y": 300
          }
        },
        "flowElementId": "E2435B2C-3FED-4729-9F0B-ED7F2DFC1966",
        "groupId": null,
        "id": "37A7A303-B8DF-42E4-81D7-1F6BBA2DA6E4",
        "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": "Not approved. "
                  },
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Packet check",
                    "subPathSegments": [
                      {
                        "key": "carrierName",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
                  },
                  {
                    "id": "TEXT",
                    "label": null,
                    "type": "INPUT",
                    "value": " stays on hold and nothing was sent to the carrier."
                  }
                ],
                "mode": "EXPRESSION",
                "parseJsonString": false,
                "resultType": null
              }
            },
            {
              "name": "threadId",
              "type": "SIMPLE",
              "value": {
                "expression": [
                  {
                    "id": "ELEMENT_RESULT",
                    "label": "Question to setup lead",
                    "subPathSegments": [
                      {
                        "key": "messageId",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "DB82602D-B05E-49A9-B9B0-5BD6C46E63D5"
                  }
                ],
                "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": "COMPLEX_LIST",
              "value": []
            }
          ],
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "connectionId": null,
          "enabled": true,
          "hostType": "SHARED",
          "logging": {
            "input": {
              "logData": false,
              "message": null
            },
            "output": {
              "logData": false,
              "message": null
            }
          },
          "methodName": "sendMessageToChannel",
          "onFailElemId": null,
          "packageId": "default",
          "resultAlias": "Hold note",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Confirm the carrier is on hold",
        "nextElementIds": [],
        "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 setup lead Result"
          },
          "newElementId": "EXTENSION:::SHARED:::default:::slack:::sendMessageToChannel",
          "legacyElementId": "JS###v1###Slack###sendMessageToChannel",
          "methodName": "sendMessageToChannel",
          "position": {
            "x": 1269,
            "y": 300
          }
        },
        "flowElementId": "2D94A214-A00C-4155-9E14-2D4337F60E56",
        "groupId": null,
        "id": "DB82602D-B05E-49A9-B9B0-5BD6C46E63D5",
        "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": "Packet check",
                    "subPathSegments": [
                      {
                        "key": "text",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
                  }
                ],
                "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": "Packet check",
                    "subPathSegments": [
                      {
                        "key": "blocks",
                        "optional": false
                      }
                    ],
                    "type": "ELEMENT_LINK",
                    "value": "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
                  }
                ],
                "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 setup lead",
          "retryPolicy": null,
          "saveToVariable": null,
          "serviceId": "slack",
          "simulationResult": null,
          "slaConditions": [],
          "storeResult": true,
          "subtype": "API_SERVICE",
          "type": "EXTENSION"
        },
        "name": "Ask the setup lead",
        "nextElementIds": [
          "C3B3CED2-7D8F-4024-B700-C3626A5C3584"
        ],
        "nextGroupIds": [],
        "serverFields": {
          "learningStatus": "OFF"
        },
        "type": "ACTION"
      }
    ],
    "firstElementId": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43",
    "groups": [
      {
        "clientMetadata": {
          "elementId": "list-iterator",
          "isFirstElement": false,
          "blockDefinitionId": "list-iterator",
          "viewport": {
            "x": -70,
            "y": 0,
            "zoom": 1
          },
          "position": {
            "x": 1262,
            "y": 139
          }
        },
        "flowElementId": "60CA35C2-784C-4D63-AF76-CA9751A7E786",
        "groupId": null,
        "id": "CB5B42A2-69FE-4335-B519-D8E0E75717BA",
        "loopType": "LIST_ITERATOR",
        "metaInfo": {
          "clientValidationState": {
            "errorMessage": null,
            "valid": true
          },
          "enabled": true,
          "firstElementId": "F05BDB4E-9991-4E97-A8EC-55C97B9E5691",
          "list": {
            "expression": [
              {
                "id": "RESULT",
                "label": "Packet email",
                "subPathSegments": [
                  {
                    "key": "attachments",
                    "optional": false
                  }
                ],
                "type": "TRIGGER_DATA",
                "value": "06440F8C-07E5-4059-AB16-F1CEF4D0CD43"
              }
            ],
            "mode": "EXPRESSION",
            "parseJsonString": false,
            "resultType": null
          },
          "onFailElemId": null,
          "resultAlias": "loop",
          "storeResult": true
        },
        "name": "Read each attachment",
        "nextElementIds": [
          "1DFFCA25-6C3E-4900-B0ED-2DD3206EC213"
        ],
        "nextGroupIds": [],
        "type": "LOOP"
      }
    ],
    "id": "587A23B4-531C-45A5-BE5F-A2A247099720",
    "metaInfo": {
      "clientValidationState": {
        "errorMessage": "Please fix problems before start. Blocks with issues have red badge in the top-right corner of a block, hover it to see what needs to be done.",
        "valid": false
      },
      "errorMessage": "Block 'Check what is missing' has an invalid configuration. Code Argument 'answerLink' has invalid value. Placeholder Data 'Answer link': value is required",
      "executionStaticData": [
        {
          "description": "Your Anthropic API key for the AI steps.",
          "error": null,
          "name": "Anthropic key",
          "type": "API_KEY",
          "value": null
        },
        {
          "description": "The URL of the block Wait for the setup lead's answer. The Slack buttons open it.",
          "error": "Placeholder Data 'Answer link': value is required",
          "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-11-26T05:48:59.456Z"
}
