Hello ALL
I am a newbie in the Power Automate world but have experience working with PowerShell so I thought it could help me. But I was wrong 🙂 I was looking for some debug options but did not find anything that could help me in my case.
The situation:
I have a mailbox, dba@contoso.com; and source1@contoso.com and source2@contoso.com.
Both source1 and source2 redirect emails to dba@contoso.com.
Depending on the original mailbox, I need to save attachments in Folder1 or Folder2.
There should not be a problem but it is.
I have a "Condition" block that always returns "false". I have tried to use the e-mail address and Display Name. The result is the same.
Could you help me to figure out how could I save attachments based on the TO field?
Thank you very much in advance.
Solved! Go to Solution.
Thank you for explaining @RomanMelekh 🙂
I think i was confused about forwarding and redirecting 🙂
If it is being redirected then what you are doing is correct. My earlier solution works when emails are getting forwarded .
To help debug the issue i recommend create two compose action and adding To (from dynamic content) in one of those and adding From (from dynamic content) in the second compose action.
Then once you run/test your flow go and check the flow run values
This should help
let me know if that does not help
Hello @RomanMelekh
I am little bit confused but let me know if i am assuming this correctly.
You are forwarding all emails sent to source1@contoso.com and source2@contoso.com. To dba@contoso.com.
Now you are setting up the flow on dba@contonso.com 's inbox . You would like to differentiate the attachments that were sent to source1 and source2.
If this is the scenario then you can do this. You need to be looking at the FROM column since this email is getting forwarded 🙂
Hopefully this help !!!
Hi!
Probably I was in hurry and did not provide more details 🙂
Sorry about that.
The real scenario is that:
I have 4 mailboxes: mysql@contoso.com, mssql@contoso.com, oracle@contoso.com and postgresql@contoso.com
Each mailbox redirects (M365 setting) everything to dba@contoso.com.
Now, users can send emails to those 4 mailboxes with attachments (SQL scripts) and I need to save those attachments in different folders.
The flow:
person1@contoso.com wants the DBA team to run their script on MSSQL.
person1@contoso.com sends an email to mssql@contoso.com (because their script is for MSSQL)
mssql@contoso.com redirects to dba@contoso.com
My flow, attached to dba@contoso.com should understand that the original email was intended to mssql@contoso.com and should save all the attachments to Root\MSSQL folder on dba's OneDrive.
So, I need to utilize TO, not FROM, but Power Automate always returns "false" if I create CONDITION like "if TO=mssql do ....."
Thank you for explaining @RomanMelekh 🙂
I think i was confused about forwarding and redirecting 🙂
If it is being redirected then what you are doing is correct. My earlier solution works when emails are getting forwarded .
To help debug the issue i recommend create two compose action and adding To (from dynamic content) in one of those and adding From (from dynamic content) in the second compose action.
Then once you run/test your flow go and check the flow run values
This should help
let me know if that does not help
Hi
I have added two Compose blocks and TO shows exactly the email I am sending to.
It seems like it is working (at least, worked once) if I copy-paste the value from the Compose block. Weird 🙂
The difference is just upper-lower case
Great ! There is a small chance that your condition had space in it. Also I do have faced similar annoying glitches when everything was right but the flow simply did not like to run. Removing and readding things normally fixes it- it would have been convenient to give it a slight whack - that's how i used to fix all my old electronic appliances LOL
Glad it works now . Have a nice day
Cheers!!
that's how i used to fix all my old electronic appliances - you have made my day 🙂
Thank you very much for your help and support, it seems like the "Compose" block forces PA to do what the user is asking it to do 🙂
User | Count |
---|---|
92 | |
44 | |
20 | |
19 | |
15 |
User | Count |
---|---|
135 | |
54 | |
44 | |
42 | |
31 |