Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 1VES33kW7Tw3YkOgv4F3WD
Power Automate - General Discussion
Suggested answer

Struggling with my first ever flow - Input parameters are invalid

Like (1) ShareShare
ReportReport
Posted on 29 Jul 2024 15:41:04 by 81
I am using Power Automate for the first time. I want to create a flow that will send me a reminder 3 days before the due date of an item from Microsoft Lists. I am getting this message: 
The input parameter(s) of operation 'Foreach' contains invalid expression(s). Fix invalid expression(s) for the input parameter(s) of operation 'Foreach'.
 
In the flow:
 
1. Recurrence: (once per day).
 
2. Get items (): from my personal Sharepoint site, List Name of Current Tasks chosen from dropdown.
 
3. For each: body/value from previous steps is chosen as Output from previous steps. 
 
4. A condition that matches the one desribed by -dun- in this post: https://www.reddit.com/r/MicrosoftFlow/comments/19ecu5h/send_email_when_column_due_date_in_sharepoint/
 
My understanding is that body/value means pull in everything from my list items. How can that be invalid? Weirdly, when I copied the steps described by -dun-,  the flow ran just fine.  The Flow Checker found no issues, and I was able to successfully execute a test flow. Then I changed the -1 to a -3 so I'd get a reminder 3 days in advance. And somehow that seems to be breaking the earlier Foreach step, which is very confusing. Reverting the -3 to a -1 does not fix the error, even though the flow is identical to the state it was in when it worked. 
 
Before trying to copy what -dun- provided, I tried creating the condition myself. And asking the built-in Copilot assistant to create a condition did what I needed. And asking copilot to build a whole flow from scratch that would accomplish my task. And asking Chat GPT to walk me through the steps. In all cases, it always tells me my input parameters contain invalid expressions and no further detail is provided. 
 
Any insight or advice you can provide would be greatly appreciated. 
Categories:
  • Suggested answer
    David_MA Profile Picture
    10,826 Super User 2025 Season 1 on 29 Jul 2024 at 18:07:21
    Struggling with my first ever flow - Input parameters are invalid
    Since you said your flow was working, I am going to guess that it was. Although I looked at the link you provided and am not sure it would since the dates are not formatted as ISO8601 dates. But I will take your word that it worked. Since you say you want to get items where the date expires in three days, you need to add three days to your expression rather than subtract. Otherwise, you will be checking items that have already been expired for three days.
     
    If you still get the error, format the date in the expressions so it returns it in the format yyyy-MM-dd instead of MM/dd/yyyy. The form yyyy-MM-dd is the ISO8601 date format Power Automate expects. That could be your issue as well, but it wouldn't explain why it was working.
  • creativeopinion Profile Picture
    10,406 Super User 2025 Season 1 on 29 Jul 2024 at 17:53:33
    Struggling with my first ever flow - Input parameters are invalid
    You might be interested in these YT Tutorials linked below. If you are still running into issues, ensure that if you are using the new designer, you toggle it off first, click on all actions to expand them and upload a screenshot of your flow in EDIT mode.
     
    Send Emails Based on a 📆 Date Column in SharePoint with Microsoft Power Automate
    In this Microsoft Power Automate tutorial, I’ll show you how to build a flow that will send a Happy Birthday email to a user based on a date column in a SharePoint list. The SharePoint list also contains a column with a Manager’s name which we’ll use to send a three-day and day of reminder to the user’s manager.

    This automation will use the Filter Array action to filter out all SharePoint list items where the user’s birthday is today or in three days. This flow can apply to a variety of scenarios such as:

    đź“… Student Birthdays
    đź“… Project Due Dates
    đź“… Contract/Membership Renewals
    đź“… License Expirations
    đź“… Client Anniversaries
    ---
    IN THIS VIDEO:
    âś… How to Send an Email based on a Date Column in SharePoint
    âś… Using the Recurrence Trigger in Power Automate
    âś… How to Use the Filter Array Action with multiple conditions
    âś… How to Get Dynamic Content from a Filter Array Action
    âś… How to Get a Date Three Days from Today
    âś… How to Create a Dynamic Date Based on utcNow()
    âś… How to Return a Count of Items
    âś… How to initialize and set a variable
    âś… How to use the Send an Email (V2) action
    âś… How to send test emails
     
    ---
     
    How to Work with 📆 Dates in Power Automate | Example Scenarios and Tips & Tricks
    Are you easily stumped when working with Dates in Power Automate? In this Power Automate tutorial, I’ll show you how to compose an expression that will return a future date, a past date, how to count the number of days between two dates, how to check for a birthdate and anniversary date as well as tips and tricks when working with dates in Power Automate. 

    I’ll cover some common use cases and concepts that can help you to build better Power Automate flows. Feel free to skip ahead using the timestamps listed below. I’ve also linked a few other tutorials that you might be interested in as well.
    IN THIS VIDEO:

    âś… 4 Date Functions You Need to Know
    âś… How to use the Convert Time Zone Action
    âś… How to Get a Future Date
    âś… How to Get a Past Date
    âś… How to Return SharePoint Items Due in a Number of Days
    âś… How to Return SharePoint Items Due within a Date Range
    âś… How to write a Filter Query for SharePoint Items Due in 30, 60 and 90 Days
    âś… How to Calculate the Number of Days between Two Dates
    âś… How to Check for a Birthdate and Anniversary Date
    âś… How to work with Dates and Times in Excel
    âś… How to use a Manual Trigger with Date Input
    âś… How to Output Dynamic Text with an Expression
    âś… How to Check if a Date Falls on a Weekend


    Hope this helps!

    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • AnthonyAmador Profile Picture
    2,544 Super User 2025 Season 1 on 29 Jul 2024 at 17:39:03
    Struggling with my first ever flow - Input parameters are invalid
    Hi,
     
    I don’t think the body/value is the problem. It’s probably something wrong with the expression you are trying to use in the condition. Can you share a screenshot of how you are setting it up?
     
    Thanks,
    Anthony

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - General Discussion

#1
David_MA Profile Picture

David_MA 8 Super User 2025 Season 1

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 8 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 7 Super User 2025 Season 1

Overall leaderboard
Loading started