Hello,
Looking for some guidance from the Dev Team on how we can pull email textBody attribute from an email conversation. Here is the scenario. We have Customer ID included in the email body and we would like to grab the Customer ID number to run it against an existing API that returns profile information.
Is there a way that I can grab the customer ID within the textBody of the email in architect inbound email flow? I pulled the conversationId & messageId using the below API. I have an idea on how to set it up using a data action but I am not sure if this is the correct approach.
Email API: api/v2/conversations/emails/{input.conversationId}/messages/{input.messageId}
Here an example of the conversation we get today in the interactions view.
{
"id": "emailID here",
"to": [
{
"email": "emailaddress@example.com",
"name": "emailaddressname"
}
],
"cc": [],
"bcc": [],
"from": {
"email": "emailaddress@example.com"",
"name": "emailaddress@example.com""
},
"attachments": [],
"textBody": "\r\n View in browser https:URLHERE\r\n[HEADERIMAGE]\r\nSubject Line:\r\n\r\nCustomer Email Address: emailaddress@example.com\r\n\r\nCustomer Name:\r\n\r\n(comments)\r\n\r\n Customer ID: 12345 \r\n\r\n\r\n", etc.......}
Update** I am also open to suggestions in case there is an easier way to accomplish this using the Email Builder.
Thank you.