cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
fab_mue
Level: Power Up

Push A-Mail Attachment to Nextcloud, base64 decoded

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!
 
4 REPLIES 4
Community Support Team
Community Support Team

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

fab_mue
Level: Power Up

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
Community Support Team
Community Support Team

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

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
fab_mue
Level: Power Up

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?

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors
Users online (4,606)