cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Invalid Template error using create file from email attachment

Hi,

I have been using this successfully however the flow that I had created has now started giving the error shown below:

 

  • Code
    InvalidTemplate
  • Message
    Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '11': 'The template language function 'concat' parameter values is out of range: evaluating the function would result in a literal of length '1988897' which exceeds the limit of '131072'. Please see https://aka.ms/logicexpressions#concat for usage details.'.

Does anybody have any ideas about this?

15 REPLIES 15
Highlighted
Community Support
Community Support

Re: Invalid Template error using create file from email attachment

Hi Rajephcote,

 

Where did you intend to save your email attachment(SharePoint Online or OneDrive, etc.)? How was your flow created? What kind of file did you attach in the email? To reproduce this issue, please provide a screenshot of your flow.

 

I created a flow “on new email, create file in SharePoint Document library”, then when I received an email with an attachment(the attachment file was an Excel file), the attachment was saved to my SharePoint Document library. Here is a screenshot of my flow for your reference.

save attachment to sharepoint document.PNG

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
New Member

Re: Invalid Template error using create file from email attachment

Hi Mabel

I have also experienced this issue with saving attachments into a Sharepoint Online library.

I used the available flow template of saving attachments from email to Sharepoint.

Sometimes the flow works and other times it doesnt, depending on the attached file size/type.

It seems only that PDF or Word docs with a small number of total characters get saved.

 

Is there a limit on character concatenation that will be eventually removed?

 

Thanks,

Fiona

Highlighted
Helper I
Helper I

Re: Invalid Template error using create file from email attachment

I have the exact same problem.

Highlighted
Anonymous
Not applicable

Re: Invalid Template error using create file from email attachment

I'm also having the exact same problem. Saving files attachments under 100kb in a document library works. When the attachment is heavier it gives the invalide template error on 'Create_file'.

Highlighted
Helper I
Helper I

Re: Invalid Template error using create file from email attachment

A collegue of mine got it to work by specificing the name of the file, for example: "test.xlsx" and file content "test.xlsx". 

When I try the same work-around the request time-out and the status is set to "failed" without any error.


Can you try it as well and share the result?  

Highlighted
Frequent Visitor

Re: Invalid Template error using create file from email attachment

Anyone find a work around ? This used to work when  the preview came out. I remember testing it, but spent all morning on it today, can't get it to work. 

I hope this helps,
Highlighted
Regular Visitor

Re: Invalid Template error using create file from email attachment

I am also experiencing the same issue, but my attachments are .csv files. The Flow was working last week but hasn't worked since Friday (8/19/16). I also created several new Flows attempting to copy Outlook attachments to OneDrive for Business and they all result in the same error.

Highlighted
Frequent Visitor

Re: Invalid Template error using create file from email attachment

I tried sending an email with an audio attachment, couldn't get it to work either. It's as if, the attachment objects are not being handled properly by the Flow service.

 

I'll try adding items to a a SharePoint List when email is received, will let you know how it goes 😉 Hopefully, when we get attachments out of the picture we can get some stuff to work.

I hope this helps,
Highlighted
Regular Visitor

Re: Invalid Template error using create file from email attachment

I found what I think is a related discussion:  Re: FIle size limits when copy an attachment from an email to SharePoint (sorry, don't know how to link to this)

 

Unfortunately the last reply in the post says:

 

         Re: FIle size limits when copy an attachment from an email to SharePoint

             Issue has been located and fixed. This should is currently scheduled to be rolled out by the second week of September.

Highlighted
Frequent Visitor

Re: Invalid Template error using create file from email attachment

I have the same problem when trying to add an item to a SharePoint List from an email:

 

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

 

Basically, nothing I've tried around emails has worked 😞 

I hope this helps,
Highlighted
New Member

Re: Invalid Template error using create file from email attachment

That's interesting! Will schedule a calendar reminder for mid-sept and see whether the issue has been resolved or not! It's definitely a very useful automation to get working properly!

Highlighted
Helper I
Helper I

Re: Invalid Template error using create file from email attachment

FYI,

A colleague found a workaround:

By using "Create from blank"  select Outlook.com instead of O365, the flow worked perfectly.

Highlighted
Frequent Visitor

Re: Invalid Template error using create file from email attachment

Thanks for the feedback, appreciated !

I hope this helps,
Highlighted
Frequent Visitor

Re: Invalid Template error using create file from email attachment

did not work for me.  still getting the "invalid template" error.  meh.  time to spin up Azure Logic Apps for testing.

Highlighted
Frequent Visitor

Re: Invalid Template error using create file from email attachment

I managed to get round this fairly easily using two flows: one to save the file to OneDrive and then another to push it to SharePoint once it's created.

 

solution1.JPGsolution2.JPG

 

 

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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!

Users online (1,280)