Hi,
I am trying to build an app to: Check that an email contains at least one PDF file
but I do not know how to check for at least one pdf attachment.
Any experts help would be greatful.
Thank you in advance.
Graham
P.S. Is there a designer flow help file/resource anywhere online?
Solved! Go to Solution.
Hi @graham-oriley.
I love help the community 🙂
What you need is a simple conversion in your condiction, because the Flow compare the boolean value of variable with the string, with this the result is false.
Click in "edit in advanced mode" on condiction and convert the string true to boolean, like above:
@equals(variables('HasPdf'), bool('true'))
after this run the flow and it's work.
OBS: If you can kudo the reply it help me in the community 🙂
Best Regards,
Gustavo Moraes
Gustavo Moraes, o astronauta brasileiro do Flow!
Hi graham-oriley,
According to your scenario “check an email contains at least one PDF file”, then you could consider to add a Condition to check if an email contains a PDF file.
If yes, do an action you want. If no, use the action “Office 365 Outlook – Reply to email”.
When an email arrives without a PDF file, an email will be sent back to the sender.
Please try if this will work for you.
Best regards,
Mabel Mao
Hi,
Thanks for the information and help.
I have applied your logic to my flow but I receive a rejection email when one of the attachments is not a .pdf.
An email should only be sent if one of the attachments was not a pdf.
The only difference I can see between what I have done and yours is that I have a For Each and you have an
Apply to Each - I do not know how to change mine? Is this possibly the issue?
Regards,
Graham
What you need is a variable, you set this if has an pdf and after for each you verify if the variable is true, look the print below.
Hope have helped,
Gustavo Moraes
Gustavo Moraes, o astronauta brasileiro do Flow!
Hi,
Thank you for the information, I didn't realise that logic apps had variables.
I still have slight problem in that HasPdf appears to be false in the final condition, yet in the output I can see it was set to true.
It's like the variable is set as inline and not global and so defaulting to the initialise value? Although if it was inline then I suppose the variable would be undefined?
I've attached a word document with designer and output.
If you could have one final expert view of what I doing wrong that would be fantastic.
Designer
Output
Regards,
Graham
Hi @graham-oriley.
I love help the community 🙂
What you need is a simple conversion in your condiction, because the Flow compare the boolean value of variable with the string, with this the result is false.
Click in "edit in advanced mode" on condiction and convert the string true to boolean, like above:
@equals(variables('HasPdf'), bool('true'))
after this run the flow and it's work.
OBS: If you can kudo the reply it help me in the community 🙂
Best Regards,
Gustavo Moraes
Gustavo Moraes, o astronauta brasileiro do Flow!
You're a super star.
That works fantastically and I've learnt a lot.
Thank you for your time.
Graham
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!
User | Count |
---|---|
45 | |
42 | |
37 | |
36 | |
23 |
User | Count |
---|---|
42 | |
39 | |
30 | |
29 | |
28 |