Legacy Dev Forum Posts

 View Only

Sign Up

Using Regex to get specific State name in Email body

  • 1.  Using Regex to get specific State name in Email body

    Posted 06-05-2025 19:26

    Asingh | 2024-09-25 14:15:34 UTC | #1

    Good morning everyone,

    I am trying to use an API (/api/v2/conversations/emails/{conversationId}/messages/{messageId}) to get the Loss State from an email body. The email will have text like shown below:

    Job Address Information: Loss City: TAYLORSVILLE Loss State: NorthCarolina Loss Country: US Loss Zip Code: XXXXX-XXXX I want to get the State name and it can be the full name or just a short one like FL. I have the data action configured as follows:

    I have tried various filters even something as simple as just matching "Loss" but I get the following error for it:

    JSON failed output schema validation for the following reasons: Schema: # @/properties/MessageText. Error location: /MessageText. instance type (array) does not match any allowed primitive type (allowed: [\"string\"])",

    Could someone point out what needs to be done to extract that State name properly each time with varying length of State name?


    crespino | 2024-09-25 21:15:01 UTC | #2

    Are you planning to use the Data Action in an Architect Flow or in a Agent Script, or somewhere else? What is your use case?


    system | 2024-10-26 21:15:44 UTC | #3

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 29526