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

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.

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

Helper I
Helper I

I have the exact same problem.

Anonymous
Not applicable

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'.

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?  

Frequent Visitor

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,
Regular Visitor

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.

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,
Regular Visitor

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.

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,

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!

FYI,

A colleague found a workaround:

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

Thanks for the feedback, appreciated !

I hope this helps,

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

Frequent Visitor

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (9,411)