Hi Users,
I want to reply to an mail that arrives in an shared mailbox. This reply should be specefic text for the specefic receiver.
So when an receiver alias is Test@test.nl it should reply with the correct details from the excel row.
And when the mail has been send to test1@test.nl it should reply with the test1 row text.
For now its working when someone send and email to an alias from an shared mailbox and if the to: field contains 1 email adres.
But when there is more email adresses in the to: Field its not working.
Can someone help me with this?
Solved! Go to Solution.
You will need to loop through each of the emails and check each one in your Excel file. I've created a quick example.
I'm using the following Excel Table.
The full flow is below. I'll go into each of the actions.
When a new email arrives is the same as what you have:
I then use a Select to get each of the email addresses and add them to an array that we can loop over. The expressions I use for this are:
split(triggerOutputs()?['body/toRecipients'], ';')
item()
This will give us an array of email address similar to below:
[
"grantjenkins@happywolf.onmicrosoft.com",
"AdeleV@happywolf.onmicrosoft.com"
]
Next, we have an Apply to each that loops over each email address in our array.
It will "try" to Get a row in the Excel Table that matches the current email address. If it doesn't find a match, then this action will cause an error. This is why we have the Terminate action after the loop which I'll explain later. If it does find a match, then we Send an email with the content returned from Get a row.
After the loop we have a Terminate action set to Status of Succeeded.
An important step here is to Configure run after on it so that it runs when the previous action either succeeds or fails. To do this we go into the Configure run after of the Terminate action.
Then we check both is successful AND has failed, then click on Done.
This should get what you are after.
Hi @nldenic,
you have to retrieve all addresses from ToRecipients and CcRecipients and select one that is assigned to your shared mailbox.
Thank you for your fast reply
so now its working if the to field contains the alias that is also in the row in excel. But when its 2 or more alias in the to field its broken and not able to Find the value in the row because its written like test@test.nl;test1@test.nl
so i neef to find an method to find the alias in the to field and Search in excel to send specific mail that is written in the excel row
You will need to loop through each of the emails and check each one in your Excel file. I've created a quick example.
I'm using the following Excel Table.
The full flow is below. I'll go into each of the actions.
When a new email arrives is the same as what you have:
I then use a Select to get each of the email addresses and add them to an array that we can loop over. The expressions I use for this are:
split(triggerOutputs()?['body/toRecipients'], ';')
item()
This will give us an array of email address similar to below:
[
"grantjenkins@happywolf.onmicrosoft.com",
"AdeleV@happywolf.onmicrosoft.com"
]
Next, we have an Apply to each that loops over each email address in our array.
It will "try" to Get a row in the Excel Table that matches the current email address. If it doesn't find a match, then this action will cause an error. This is why we have the Terminate action after the loop which I'll explain later. If it does find a match, then we Send an email with the content returned from Get a row.
After the loop we have a Terminate action set to Status of Succeeded.
An important step here is to Configure run after on it so that it runs when the previous action either succeeds or fails. To do this we go into the Configure run after of the Terminate action.
Then we check both is successful AND has failed, then click on Done.
This should get what you are after.
This is what i was looking for!
Thanks its now working !
User | Count |
---|---|
26 | |
15 | |
14 | |
10 | |
10 |
User | Count |
---|---|
45 | |
29 | |
29 | |
23 | |
22 |