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 / Possible to save varia...
Power Automate
Unanswered

Possible to save variable to local folder?

(0) ShareShare
ReportReport
Posted on by 391

Hi, I have a power automate cloud flow that triggers a PAD flow when an email arrives. 

 

Is there a way for us to save the variable %Attachment% into a local folder? The %Attachment% is a PDF file.

nicklim_1-1693452817773.png

 

 

 

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The %Attachment% is an object that contains the file contents as binary data. You should be able to use %Attachment.ContentBytes% in the Convert binary data to file action to save it as a file on your machine.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • nicklim Profile Picture
    391 on at

    @Agnius 

     

    This is what I got when I tried to hardcode it

     

    nicklim_0-1693456327375.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you view the %Attachment% value during runtime? Can you share it in a screenshot?

     

  • nicklim Profile Picture
    391 on at

    @Agnius 

     

    It's not really helpful as I can't really see the value in Power Automate Cloud, do note that the variableName is changed to %Attachment% now instead of %GetAttachment_V2Response% 

     

    nicklim_2-1693457201164.png

     

     

  • nicklim Profile Picture
    391 on at

    @Agnius 

     

    Some progression, so now I save the attachment into a document library with PA cloud instead. I removed the Get attachment action in PAD since it is not working for me.

    nicklim_0-1693459548644.png

     

     

    In PAD, I get the file content using SharePoint connector and then successfully convert binary data to file. Managed to merge the PDF files as well.

    nicklim_3-1693459943131.png

     

     

     

    However, in "Get file content" when I change the hardcoded file name 31-test.pdf

    nicklim_4-1693460158479.png

     

     

    to %AttachmentName%, it breaks. %AttachmentName% has the exact same value which is 31-test.pdf.

    nicklim_5-1693460363133.png

     

    Get file content output value of the successful flow

    "value""%252fShared%2bDocuments%252fPlant%2bStreet%252fSigned%2b-%2bContract%2bof%2bSale%252f31%2b-%2bContract%2bof%2bSale%2b-%2b1%2 ...",
     
     
    Get file content output value of the failed flow:
    "value""/Shared Documents/Plant Street/Signed - Contract of Sale/31-test.pdf",
     

     

    I need the File Identifier to be dynamic

  • nicklim Profile Picture
    391 on at

    @Agnius 

     

    Just noticed there's another SharePoint connector called "Get file content using path". That solved my problem, thanks for taking your time

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You could also use the File system connector to create your file directly into your local file system from the cloud, so you wouldn't need to use SharePoint at all.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

     

  • nicklim Profile Picture
    391 on at

    @Agnius 

     

    That might be another solution. Is the File system connector within PAD? I can't seem to find it. Do you mind sharing a sample of the workflow using the File system connector?

     

    nicklim_0-1693476074419.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    The File system connector is only in cloud flows. Since you are using a cloud flow to create a file in SharePoint anyway, using the Create file action of the File system connector is easier.

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

     

  • nicklim Profile Picture
    391 on at

    Interesting, I’ve never heard of that connector before. I’ll check it out tomorrow morning as it’s getting late here.

     

    thanks for the suggestion!

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 378

#2
Valantis Profile Picture

Valantis 329

#3
David_MA Profile Picture

David_MA 283 Super User 2026 Season 1

Last 30 days Overall leaderboard