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 Automate
Answered

Issue with expression

(0) ShareShare
ReportReport
Posted on by 12

Seeing this error on an expression I am using in Power Automate. 

 

Unable to process template language expressions for action 'Condition' at line '0' and column '0': 'The template function 'dayOfWeektriggerOutputs' is not defined or not valid.'.

I created an expression to check the day of the week using the Received Date and time of an email. I checked this expression, and I saw that it returned a numeric value based on the day of the week the email was received.  

 

I want the flow to proceed only on emails that were received on Tuesday, Wednesday, Thursday, Friday & Saturday

Snag_b1cfc6.png
Snag_b3d3c4.png
Categories:
I have the same question (0)
  • Verified answer
    shoog Profile Picture
    2,164 on at

    You have some parenthesis missing there, it should be

    dayOfWeek(triggerOutputs()['body/receivedDateTime'])
  • Verified answer
    SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @aravind_p_m ,

     

    I have made a test on my side and it works fine for me. I am using the below expression.

     

    dayOfWeek(triggerOutputs()?['body/receivedDateTime'])

     

    If this helps please accept this as a solution.

     

    Thanks,

    Sanmesh

  • aravind_p_m Profile Picture
    12 on at

    I used this expression in another flow. It is working. 

     

    I used this expression on the flow that I am working on. It is a scheduled flow, so I will have to wait for some time to test the execution in the flow that I am working on. I will post a comment once I am done testing. 

    Thanks for the solution. Weirdly, the error was because of something so trivial, and I checked the expression before using it. 

  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    You don't have to wait for a scheduled flow to run to test it. You can click Test up by the Save button. Then click Automatically with a recently used trigger, and it will run the flow with the last used trigger.

     

    Whatever your flow does, it will do in the test. So if it created a new item the last time the flow ran, it will create a new item with the test, so you have to be aware of that. 

    However, you can add an additional step or something that blocks creating the new item. Run the test. See if it works, and if it works, just delete the block or whatever and have the flow saved again.

     

     

    wskinnermctc_0-1685469931829.png

     

     

  • aravind_p_m Profile Picture
    12 on at

    Thanks for the tips. I already tested the expression on two separate flows I am working on. I tested using a trigger for previous success and got the needed output. 
    I had another reason to use this expression on my main flow and wait for the full flow to execute, and I saw the output. Thanks for all your tips and suggestions. 

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 375 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 269 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 127 Most Valuable Professional

Last 30 days Overall leaderboard