Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Getting "InvalidTemplate" error on any kind of "create file" actions - Sharepoint, SFTP, OneDrive

I'm trying to create a flow that simply uploads a csv file attachment to a server via sftp.
Since Thursday I can't get any 'create file' actions to run without error. I have deleted and recreated a number of flows to try an alternative way to getting the files to where I need them to go.
The most recent attempt has the flow ID: 4fe94282-df5d-4fc1-8a61-483ebfce2add
Same issue with this flow ID: bec8eddd-6f5f-49b7-bb85-a5420314bcf3
(The only difference is the 'name' of the file - one names it with the original attachment name, the other with the subject of the email - my desired option).
I have also attempted similar flows using Sharepoint and OneDrive for Business as the targets with identical errors. In fact, the only success I've had in recent times was creating a flow from template to upload email attachments to Sharepoint. This worked once.. until I then edited the flow to use "subject" as the name of the file instead of "name" and it began failing again.
The error message I'm getting every time is as follows:
  • Code
  • Message
    Unable to process template language expressions in action 'Create_file' inputs at line '1' and column '11': 'The template language function 'base64ToBinary' expects its parameter to be a string. The provided value is of type 'Null'. Please see for usage details.'.
Community Support Team
Community Support Team

Re: Getting "InvalidTemplate" error on any kind of "create file" actions - Share

Hi Learnerlink,


I have seen a similar thread in another thread and I suggested the customer to send a feedback.


The thread is:


I also found that the file can be saved from SharePoint Online library to OneDrive, or from OneDrive to Google Drive with a flow. As a workaround, you can save files to SharePoint library, then use a flow to save it to OneDrive or other destinations.


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.
Level: Powered On

Re: Getting "InvalidTemplate" error on any kind of "create file" actions - Sharepoint, SFTP, OneDrive


Helpful resources


Power Automate Community User Group Member Badge

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


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,645)