I have hard coded user in get user profile To action so my issue is when incoming email To address contains multiple email address then flow is not working as expected and what i mean is that i wan to filter remaining email addresses in incoming email other than Test1@test.com (As below) so how to check this logic in my below flow
Assuming you are trying to "Get user profile To" for all email address that came in from the incoming email, then you just need to "split" the "to" dynamic content. (Assuming it is split by semi-colon, you can dosplit(triggerOutputs()?['body/toRecipients'], ';'), which will give you an array of all email addresses.
Then you can Apply to each of the email to put into your Get user profile To action. However you want to handle the array will depend on your logic for the flow.
So,as per your above details i perform below things
1.Get user profile To-All email address that came in from the incoming email
2.using compose action, i put this split(triggerOutputs()?['body/toRecipients'], ';')
3.Apply to each of email array
after which i need to apply filter for this specified email address recipient isABC@hpl.xx then i need to get user profile for this recipient isABC@hpl.xx country property dynamic value
1.When incoming email arrives To address recipient is ABC@hpl.xx and we need to extract this recipient user profile country details by using get user profile TO
But issue is sometimes users were specifying cc recipients addresses in To address so we need to check in flow that if abc@hpl.xx country details from get user profile to retrieved
1. indexOf(variables('yourString'), 'Test1@test.com'): Finds the starting position of the email Test1@test.com within your string.
2. substring(variables('yourString'), start, length): Extracts the substring starting from the position found in step 1, with the length of the email.
Make sure to replace variables('yourString') with the actual variable or string that contains your emails.
Hope this helps.
Anthony.
If my reply answers your question, please like and mark it as verified. This helps me stay motivated to assist others and makes it easier for users with similar questions to find the answer. Thanks!
Not completely sure what you are trying to do here.
Assuming you are trying to "Get user profile To" for all email address that came in from the incoming email, then you just need to "split" the "to" dynamic content. (Assuming it is split by semi-colon, you can do split(triggerOutputs()?['body/toRecipients'], ';'), which will give you an array of all email addresses.
Then you can Apply to each of the email to put into your Get user profile To action. However you want to handle the array will depend on your logic for the flow.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.