Dear Power Automate community,
I'm a bit stuck with one of my automation... I'm trying to loop through an array and extract each element.
Basically I have a MS Form with an open text response which collects Outlook contacts, and I would like to automate the sending of an email for each contact.
The problem is that the information gathered from MS Forms looks like: DOE John <john.DOE@microsoft.com>; DOET Jane <Jane.DOET@microsoft.com>
So I'm trying to create an array from the string and then use each value to send them an email... however I cannot find how to use each element of the array.
My Flow looks like:
The split function seems to be working, and it creates the array: split(body('Get_response_details')?['rc4d2b1f0971547c0a40aeb8daf18e5e9'], ';')
The problem comes when I try to use each element of the array to:
1. Find the user in O365 (so I get the full SMTP address)
2. Use the SMTP address found to send an email
Does anyone know how could I do this?
Any help will be much appreciated! 🙂
Solved! Go to Solution.
Hi @Ruidiaz ,
Please try the following configuration:
split(outputs('Compose'),';')
split(split(items('Apply_to_each'),'<')[1],'>')[0]
Best Regards,
Hi @Ruidiaz ,
Using the split function to convert the string to array and then using Apply to Each for array gives me desired output.
Compose 6 finds indexof '<' and Compose 8 '>'. Compose 7 then retrieves the substring using
Hi @Ruidiaz ,
Please try the following configuration:
split(outputs('Compose'),';')
split(split(items('Apply_to_each'),'<')[1],'>')[0]
Best Regards,
This is GREAT!!!
It worked like a charm! Thanks a lot! Much appreciated indeed!
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
51 | |
42 | |
41 | |
41 | |
38 |
User | Count |
---|---|
81 | |
80 | |
71 | |
52 | |
49 |