Honestly, I am not sure if what I am doing is right, very new with MS Flow.
Anyway,
I have email regarding routers etc.
Usually the email consists of:
Affected CI: abcd.router.net
Assignment Group: abcdef
I would like to assign the abcd.router.net to a variable so I could check the SharePoint list if there is already an entry regarding that CI.
Solved! Go to Solution.
Hi @KarlChristopher,
Do you want to extract the Affected CI from the email body? Do all the emails always have the same format?
Please take the following flow for a reference.
The flow is triggered by When an email arrives with the following email body.
Add an action to convert email body to text.
Add a Compose action, use the following code:
length(body('Html_to_text'))
Add a Compose 2 action, use the following code:
add(indexOf(body('Html_to_text'),'Assignment Group'),6)
Add a Compose 3 action, use the following code:
substring(body('Html_to_text'),12,sub(outputs('Compose'),outputs('Compose_2')))
Then it will return the Affected CI as expected. Please check the following screenshots.
Best regards,
Mabel Mao
Hi @KarlChristopher,
Do you want to extract the Affected CI from the email body? Do all the emails always have the same format?
Please take the following flow for a reference.
The flow is triggered by When an email arrives with the following email body.
Add an action to convert email body to text.
Add a Compose action, use the following code:
length(body('Html_to_text'))
Add a Compose 2 action, use the following code:
add(indexOf(body('Html_to_text'),'Assignment Group'),6)
Add a Compose 3 action, use the following code:
substring(body('Html_to_text'),12,sub(outputs('Compose'),outputs('Compose_2')))
Then it will return the Affected CI as expected. Please check the following screenshots.
Best regards,
Mabel Mao
Hello, thank you for the solution. However, I realized that the email I am extracting is actually encrypted or something when trying to do an HTML to text, hence I did very similar things than your solution but I only did it on one expression
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
85 | |
58 | |
44 | |
38 | |
34 |
User | Count |
---|---|
91 | |
74 | |
74 | |
61 | |
41 |