I wrote a Flow for our Sales team and am now expanding it. The requirement is that the Flow must read the email subject line and search for and replace any of the below characters. We're just replacing with an underscore for now. The issue is that I cannot find a way to make this work. Any thoughts? I tried some loops, creating variables and then reading an array, etc. None of these work. Thoughts?
@contains(triggerBody()?['Subject'], '.'),contains(triggerBody()?['Subject'], '@'),contains(triggerBody()?['Subject'], '`'),contains(triggerBody()?['Subject'], '='),contains(triggerBody()?['Subject'], '('),contains(triggerBody()?['Subject'], ')'),contains(triggerBody()?['Subject'], '&'),contains(triggerBody()?['Subject'], '$'),contains(triggerBody()?['Subject'], '~'),contains(triggerBody()?['Subject'], '#'),contains(triggerBody()?['Subject'], '%'),contains(triggerBody()?['Subject'], '*'),contains(triggerBody()?['Subject'], ':'),contains(triggerBody()?['Subject'], ','),contains(triggerBody()?['Subject'], '?'),contains(triggerBody()?['Subject'], '/'),contains(triggerBody()?['Subject'], '|'),contains(triggerBody()?['Subject'], ' '))
Solved! Go to Solution.
Hi @Anonymous ,
As suggested by abm, you could refer to the following methods to configure Flow.
replace(outputs('Compose'),items('Apply_to_each'),'_')
Please take a try.
Best Regards,
Hi @Anonymous
Define an array with all the special characters. Then add a for each action loop to iterate each special characters. Then check via a condition contains the special character against email subject. Then under the yes condition add a replace function with underscore. You need the following actions:
1. Array
2. For Each Loop
3 If Condition
4 Compare special character from the loop vs subject
5 Use expression replace function for underscore replacement
Thanks
If you liked my response, please consider giving it a thumbs up
Proud to be a Flownaut!
Learn more from my blog
Hi @Anonymous ,
As suggested by abm, you could refer to the following methods to configure Flow.
replace(outputs('Compose'),items('Apply_to_each'),'_')
Please take a try.
Best Regards,
Thanks so much @v-bacao-msft! That got me well on the way! I found a way to make it work, but it was ugly. This is more fluid and efficient. Thanks to the both of you for your willingness to assist!
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.
User | Count |
---|---|
25 | |
24 | |
24 | |
21 | |
17 |
User | Count |
---|---|
56 | |
39 | |
38 | |
30 | |
30 |