Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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!
 
  • fab_mue Profile Picture
    4 on at
    Re: Push A-Mail Attachment to Nextcloud, base64 decoded

    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?

  • v-xida-msft Profile Picture
    on at
    Re: Push A-Mail Attachment to Nextcloud, base64 decoded

    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
    Re: Push A-Mail Attachment to Nextcloud, base64 decoded
    Hi Alice, thanks for your reply!

    Here's a screenshot. Would be cool if you have an idea! Thanks in advance Fabian
  • v-yuazh-msft Profile Picture
    on at
    Re: Push A-Mail Attachment to Nextcloud, base64 decoded

     

    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

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >