web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Automate Desktop / Ret...
Power Automate
Answered

Automate Desktop / Retrieve mail with PDF attachement only

(0) ShareShare
ReportReport
Posted on by 206

Hi Everyone,

Here's the situation :

We are receiving mail with some attachements and i need to analyse each email.

The first analyse is to check if the mail contains a PDF file. If yes, i need to read the content to find a specific text.

In this situation, the mail is transfered to a another mailbox.

In the other case, the mail is transfered to a seconde maibox.

 

I don't know if it is possible with POD. I am not alloud to use PO (Group requirement)

 

I think i am obliged to retrieve all the mail in the mail box because, i can not put a condition on attachement file the "Retrieve email messages from Outlook" (this should be great)

 

XRQ57_4-1629455577932.png

 

I do not know how to link the PDF file containing the word "TSA" with the original message

XRQ57_3-1629455384715.png

Thanks for your help.

 

 

 

 

 

  • NikosMoutzou Profile Picture
    Microsoft Employee on at

    Hello @XRQ57 !

    If I have understood correctly your use case, you check all pdf attachements and for those that contain the word 'TSA', you would like to send a response to the respective received email.

    I would just use another loop before the get files (getting pdfs), for each retrieved email item. Then in the 'Response to Outlook message' action, I would use the specific item of the first loop (which is the retrieved email ) for populating input parameter 'Mail message'. A simple structure of the flow should be like:

    NikosMoutzou_1-1629470860160.png

     

     

     

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    You might be able to narrow down the scope before activating PAD.  For instance, in Outlook, you might be able to set up a rule that says "All incoming emails with a ".pdf" attachment are moved to the "Bot processing" folder."

    Then, in PAD, point it to the specific folder to minimize the number of emails being processed. 

     

    I don't know for sure if that's a possibility, I'm just thinking out loud.  Good luck.  

  • OpoqO Profile Picture
    2 on at

    Are the PDFs in the same format? If they are, you might just want to train a form processing AI Model and run the whole thing on power automate instead of PAD. I think that is more reliable than using pdf extract text on PAD

  • XRQ57 Profile Picture
    206 on at

    Hi NikosMoutzou,

    thanks for your answer.

     

    It is not working :(.

    I tried with a mail containing a PDF with the text "TSA" and a another without "TSA".

     

    The first pass, the bot is detecting that the PDF does not contains "TSA" which is good.

    But, on the second pass, the bot is detecting "TSA" and tranfers the mail with the 2 files (the good file and the wrong file..) and second mail with the same attachement 2 times wich is the good PDF file.

     

    In the transfer message option I choose CurrentItem2 as attachement.

     

  • XRQ57 Profile Picture
    206 on at

    Hi MichaelAnnis,

    there is no rules in Outlook (desktop) for that.

    Thanks for your help

  • XRQ57 Profile Picture
    206 on at

    Hi OpoqO,

    The PDFs are not the same, they are invoices from our suppliers.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    You should still able to train the AI model....you will just need to use more documents from everyone of your suppliers for training. Then the cloud flow should be able to do everything.

  • XRQ57 Profile Picture
    206 on at

    AI model is not possible with PAD. It is only possible with online version. Moreover, we have too many suppliers to train the AI.

    I know it is easier to use the online version, but i am not allowed to use it for now.

    With the online mode, i can use "when a new email arrives"

     

    I even though using excel exhange to retrieve the unique email ID and keep only files with PDF.

    This fonction is not available in PAD, the ID are not the same, so i can not liked the 2 variables.

     

  • Verified answer
    yoko2020 Profile Picture
    495 on at

    @XRQ57 

     

    1. The first analyze is to check if the mail contains a PDF file. If yes, i need to read the content to find a specific text.  What if the pdf attachment is Scanned PDFs ? You wont be able to read it's content. 

     

     

  • XRQ57 Profile Picture
    206 on at

    As i can not use the OCR online, i build the bot in 2 times.

    With PA, i check if the mail contains a PDF file. If yes, the PDF file is stocked on my onedrive, if not, the bot move the email in a folder.

    After that, i a using PAD to read the PDF file.

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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 229 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 223 Super User 2026 Season 2

#3
Valantis Profile Picture

Valantis 136 Super User 2026 Season 2

Last 30 days Overall leaderboard