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 / Push A-Mail Attachment...
Power Automate
Unanswered

Push A-Mail Attachment to Nextcloud, base64 decoded

(0) ShareShare
ReportReport
Posted on by 4

I am trying to build a flow that pushes every attachment received from a specific mailbox to a specific folder in our Nextcloud.

 

So far I got the flow to take any e-mail attachment and push it to the Nextcloud. (This works via http put to the WebDAV Endpoint of the Nextcloud) The only Problems: The Files pushed to the nextcloud are base64-encoded and so can't be read by anyone using the cloud.

 

There are the functions 

 

decodeBase64()

base64ToBinary()
 
within the functions for flows. The only problem: I can't get the Attachments to be pushed trough that function before pushing it to our cloud. When I enter those functions as dynamic content it's only offering me mail text, mail from eg. but not the actual mail attachment.
 
Any suggestions? Thanks in advance!
 
Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    Microsoft Employee on at

     

    Hi @ fab_mue,

     

    Could you please share a screenshot of your flow's configuration?

     

    I would work on it to figure out a way to solve your questions.

     

     


    Regards,

    Alice Zhang

  • fab_mue Profile Picture
    4 on at
    Hi Alice, thanks for your reply!

    Here's a screenshot. Would be cool if you have an idea! Thanks in advance Fabian
  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @fab_mue,

     

    I have made a test on my side and please take a try with the following workaround:27.JPG

    Within Body field of "HTTP" action, type the following formula:

    base64ToBinary(items('Apply_to_each')?['ContentBytes'])

    The flow works successfully as below:28.JPG

    The file opens well as below:29.JPG

     

     

    Best regards,

    Kris

  • fab_mue Profile Picture
    4 on at

    Hey Kris,

     

    thanks for your reply!

     

    Sadly that did not work. Template validation fails with the following message:

     

    The template validation failed: 'The repetition action(s) 'Apply_to_each' referenced by 'inputs' in action 'HTTP' are not defined in the template.'.

    It sais that the Apply_to_each is not defined. Do I have to define it somewhere then?

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 248 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 204

#3
Haque Profile Picture

Haque 179

Last 30 days Overall leaderboard