cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Memorable Member
Memorable Member

Error at Mail attachment file to create a file in File System.

I want to save attachement file from a new mail to File System.

 

My Flow:1.png

 

 

 

- Trigger : Outlook for Business - When a new mail arrives

- Apply to each - attachements

  - Action: Microsoft Teams - Alert the team ( message : Subject )

  - Action: File System - Create file ( file name : Name, file content : Content )

 

Error details:

Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '2086': 'The template language function 'base64ToBinary' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#base64ToBinary for usage details.'

2.png

 

 

 

I want to save attachment files to on-premises file server.

 

Regards,

Yoshihiro Kawabata

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Automate
Power Automate

Re: Error at Mail attachment file to create a file in File System.

Hi @yoshihirok,

 

In addition to "Has Attachment" you're also going to want to check "Include attachment."

 

"Has attachment" makes it so that the flow only triggers on emails that have attachments. This is good to have for your use case since you're only interested in emails with attachments and you don't want to trigger a bunch of flows for things you don't care about.

 

"Include attachment" is what actually includes the attachment content. Without that you just get some metadata about the attachments, not the actual content.

 

Hope this helps!

 

Best,

Travis

View solution in original post

4 REPLIES 4
Highlighted
Microsoft
Microsoft

Re: Error at Mail attachment file to create a file in File System.

Hi @yoshihirok,

 

Did you specify that you wanted to include attachments in the trigger? If no, please try that. If yes, could you try adding a condition to skip the attachment if it is null?

 

Thanks,

Shubham

Highlighted
Memorable Member
Memorable Member

Re: Error at Mail attachment file to create a file in File System.

Hi @ShubhamGogna

 

I re-check this issue with "Has Attachement" = "Yes" in Trigger "When a new mail arraivs".

1.png

 

and Error happened. 1.png

 

 

 

 

 

 

and by dump the attachement from Microsoft Teams - Alert the team.
"Attachments" propertys is 
  "Has Attachment" = True,
  "Name" = 1.png,
  "Content-Type" = image/png.

What can I do for figure out this issue ?

Regard,
Yoshihiro Kawabata

Highlighted
Power Automate
Power Automate

Re: Error at Mail attachment file to create a file in File System.

Hi @yoshihirok,

 

In addition to "Has Attachment" you're also going to want to check "Include attachment."

 

"Has attachment" makes it so that the flow only triggers on emails that have attachments. This is good to have for your use case since you're only interested in emails with attachments and you don't want to trigger a bunch of flows for things you don't care about.

 

"Include attachment" is what actually includes the attachment content. Without that you just get some metadata about the attachments, not the actual content.

 

Hope this helps!

 

Best,

Travis

View solution in original post

Highlighted
Memorable Member
Memorable Member

Re: Error at Mail attachment file to create a file in File System.

Thank you, Great Thank you @TravisB, I can create a file from mail attachment.

"Has Attachment" = Yes, and "Include Attachment" = Yes.

 

1.png

 

 

 

I share this Tips at this community.
"Tips: Save mail attachment file to File System "
https://powerusers.microsoft.com/t5/General-Flow-Discussion/Tips-Save-mail-attachment-file-to-File-S...

 

Now I can do more with Mail attachment and Microsoft Flow.

 

Regards,

Yoshihiro Kawabata

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Kudoed Authors
Users online (3,880)