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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Saving Gmail attachmen...
Power Automate
Unanswered

Saving Gmail attachments based on their size and type

(0) ShareShare
ReportReport
Posted on by 7

I have flows that save attachments from my Gmail account. A lot of useless files are saved.
Please help me to adjust the flows so only big enough files with proper extensions would be saved.

Categories:
I have the same question (0)
  • Guriga Profile Picture
    188 on at

    Hi,

    Can you share the screenshot(s) of the flows, please?

    or check this solution:

    https://powerusers.microsoft.com/t5/Building-Flows/Flow-to-Save-Email-Attachments-based-on-size/m-p/860594

  • OlafBond Profile Picture
    7 on at

    OlafBond_0-1643214040414.png

    Here is my one step flow

  • Verified answer
    v-LilyW-msft Profile Picture
    on at

    Hi @OlafBond 

    I set up a flow, you can refer to below screenshots.

    Assume the file is pdf or docx and the size exceeds 50kb, the attachment will be saved.

    vLilyWmsft_1-1643251708070.png

    Add a judgment condition, if the file is pdf or docx and the size exceeds 50kb, the attachment will be saved.

    You can modify it according to your actual needs

    vLilyWmsft_10-1643254135457.png

    Expression:

    div(items('Apply_to_each')?['Size'],1024)

    vLilyWmsft_11-1643254153088.png

    vLilyWmsft_8-1643252868616.png

    Save and test the flow.

    When I receive an email like below.

    vLilyWmsft_5-1643252374257.png

    After flow runs, test7.8-1 will be created in my Google Drive.

    vLilyWmsft_9-1643254020970.png

    Hope the content above may help you.

    Best Regards

    If my answer helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • OlafBond Profile Picture
    7 on at

    Thank you. It helped. Everything works great.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard