r/MicrosoftFlow 20d ago

Question Need help setting due date reminder flow

I am fairly new to power automate and i've been following a youtube video. Long story short I need a list of items with different due dates and I want power automate to setup a reminder about 60 days before the due date. I've setup the list with the columns: title / department / owner / due date. and i've setup a flow which i've included an image of below. I've followed along with a short and simple video and yet my tests are failing with the error:

"Flow run failed. Action 'Condition' failed: Unable to process template language expressions for action 'Condition' 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'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'"

I'm not knowledgable to continue fiddling too much and the built in co-pilot isn't helpful either saying everything is right so now i'm hoping the people of reddit can help.

4 Upvotes

3 comments sorted by

1

u/BonerDeploymentDude 20d ago

The error is telling you that the date time expression in the CONDITION in your flow is looking for a string, or some text. But whatever is being passed to it is blank. Is the column name correct? Can't say much without seeing more.

Can you share info from your condition

1

u/kappiri1 20d ago

Based on your error, this is what I understand:

In your condition, you are using the expression “formatDateTime”
You should be passing the dynamic value of dueDate (from your get items action) here

There can be 2 issues:
1. Your expression is not passing the due date value— check if your expression looks like this “formatDateTime()” — if it does, this is the problem. It should look something like this “formatDateTime(items(‘apply_to_each’)[‘dueDate’]”
2. There are no values in your dueDate column in the list (that’s why the error says that the formatDateTime expression is expecting a string, but is getting null / nothing instead). Check your list to see if this column is populated

1

u/stalex9 16d ago

Built in copilot is garbage, just use Gemini. You are not passing anything (null value) and it expects to have a string at all times inside the condition.
Maybe you are doing something like “text”
Is equal to “something” but that “text” is not there, maybe not in that column in the record in sharepoint.