cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
yoshihirok 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
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
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

yoshihirok 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

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

yoshihirok 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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

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

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Users online (6,512)