I know this is fairly easy, but I'm unable to figure it out...
I have a flow that creates takes a ms form input, sends out an email to ServiceNow with the form input, and waits for the ticket creation verification email in a shared mailbox. At this point, I need to extract the incident number from the servicenow ticket response email and add the ticket number to the original input and send ticket number + original form input out in a new email
I can't figure out how to extract the incident number from the subject of the returned email and store it in a variable for use later. The servicenow ticket is always returned in the same format in the email: INC0048420
Hi @cgo84,
Could you please share a screenshot of your flow's configuration?
Could you please share an sample of the subject of the returned email?
Further, do you want to get the 'INC0048420' from the subject of the returned email?
I assume that the Subject of the returned email shows as below:
If you want to extract the incident number (INC0048420) from the Subject, please take a try with the following workaround:
substring(triggerBody()?['Subject'],indexOf(triggerBody()?['Subject'],'INC'),10)
Image reference:
The flow works successfully as below:
Please also check if the following article would help in your scenario:
More detauils about using expression in flow actions, please check the following article:
Use expression in flow actions
If you could provide more details about the Subject of the returned email from ServiceNow ticket, we would provide a proper workaround for you.
Best regards,
Kris
WarrenBelz
146,587
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,928
Most Valuable Professional