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

Announcements

News and Announcements icon
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,501 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,501 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard