Step 1) I have used trigger "when a new email arrives" to get the email
Step 2) "Html to text" action to get the body of the email
Step 3) "Compose" action to Split Email body to Lines as shown in the SS attached
I/p: split(outputs('Html_to_text')?['body'], '\n')
Step 4) "Apply to each" here I used output of the Split Email body to Lines
Step 5) "Compose" action to get Each Item in the array
I/p: item()
Step 6) "Condition" to check Suggested Actions
I/p: Output of Step 5 -> contains -> Suggested Actions :
if yes,
Set variable
Name: VariableName
Value: trim(first(split(last(split(item(), 'Suggested Actions :')), ' *** This')))
After splitting text of email body below array I get:
[
"Alarm Name : Queue Link Error Details :\nQueue Link Error: Message=From MY00SISEPSN01.AP.MT.MTNET To\nch00siseadm01.eu.mt.mtnet; Cause=Closed Description : The queue link between two\nnodes in the ISE deployment is down. Severity : Critical Suggested Actions :\nPlease check and restore connectivity between the nodes. Ensure that the nodes\nand the ISE Messaging Service are up and running. Ensure that ISE Messaging\nService ports are not blocked by firewall. Please note that these alarms could\noccur between nodes, when the nodes are being registered to deployment or\nmanually-synced from PPAN or when the nodes are in out-of-sync state or when the\nnodes are getting restarted. *** This message is generated by Cisco Identity\nServices Engine (ISE) *** Sent By Host : ch00sisemon02"
]
I want to Extract text of "Suggested Actions" as follows:
Please check and restore connectivity between the nodes. Ensure that the nodes and the ISE Messaging Service are up and running. Ensure that ISE Messaging Service ports are not blocked by firewall. Please note that these alarms could occur between nodes, when the nodes are being registered to deployment or manually-synced from PPAN or when the nodes are in out-of-sync state or when the nodes are getting restarted.
But due to newline i.e. \n after Suggested Actions :\n I am not able to get the above output how to achieve this?