web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / InvalidTemplate: The t...
Power Automate
Answered

InvalidTemplate: The template language function expects its first parameter to be of type string.

(0) ShareShare
ReportReport
Posted on by 14
Hi, 
 
I have designed this flow so when a Plumsail form is filled out it gets generated into a pdf and sent to an email address. 
 
The flow was successfully working for two days and then I started to receive the following:
InvalidTemplate. Unable to process template language expressions in action 'Start_document_generation_process_with_json' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'
 
As you can see I have tried to set an 'Initialize Variable' but it has not worked.
 
There is multiple dates to fill out throughout the form so I am thinking the issue lies within that.
 
Any help is much appreciated.
 
 
 
 
 
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    It might not even be related to your EOWD variable. Because it is referring to the formatdatetime function within your Start document action.
     
    I see you are using a formatdatetime function for the Mon.Date property. Can you share the expression you used over there?
     
    The error suggest you are using an empty value in the first parameter of that function and it is failing because of that.
  • VB-08010839-0 Profile Picture
    14 on at
     
    Thanks for reaching out. The expression for Mon.Date is - formatDateTime(triggerOutputs()?['body/Mon.Date'],'D')
     
    I have been using this expression for each of the dates within the template data.
  • Verified answer
    Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at
     
    It might have an issue with the field name, specifically the '.' (dot character) between Mon & Date.
     
    Normally that is interpreted as a reference to a separate nested field in expression language. In other words, it might think you are looking for the below: 
    triggerOutputs()?['body/Mon/Date']
    And that field doesn't exist.
     
    Do you have the option to rename the Mon.Date field to a name without a dot?



    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • VB-08010839-0 Profile Picture
    14 on at
     
    This has worked perfectly and now my flows are running.
     
    Thanks very much for your help!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard