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 / Invalid Expression for...
Power Automate
Unanswered

Invalid Expression for Input Parameter

(1) ShareShare
ReportReport
Posted on by 6
I am trying to build a flow that runs once daily that checks the Due Date column in a SharePoint list for dates that are 10-days from today. The flow will then send an email to multiple people with the total number of items that meet that condition. Using Co-Pilot, I could get the flow to work without the total, thus receiving multiple emails. Whenever I add in the count, I get an error (see picture).
 
Does anyone have a Flow that will work? Or let me know what I can try to resolve the issue?
Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
    Hi
     
    Hmm, we would need to see the inputs and values in the Foreach action please.
     
    Thanks,
     
  • DM-11101456-0 Profile Picture
    6 on at
    Let me know if this provides what you need. Still new to Power Automate.
     
     
     
     
     
  • Expiscornovus Profile Picture
    33,853 Most Valuable Professional on at
    I see the expression of the Set Count action might be wrong. It looks like you used:
    add(variables_Count,1)
    The expression is trying to add a number to text, which will throw an error. Normally the valid way of writing that expression would be the below:
    add(variables('Count'),1)
    Based on your current expression it looks like you are trying to update the Count variable by incrementing the previous value with one.

    However, self reference is not supported when updating the value of variable like 'Count' in a set variable action.
     
    So, in your case try and replace the set variable action by a increment variable action with the below setup.
     
     
     
  • DM-11101456-0 Profile Picture
    6 on at
    That fixed that issue. Now, here is the last two things. On my list I have 3 items that meet the condition of the Due Date being 10-days from today. The flow is skipping the Item Count step stating, "the branching condition for this action is not satisfied." However, I did move the "Set ItemCount" to false, and the action succeeded.
     
    The second and final step is the body of the email is putting the formula to give the count, but not providing the count. Ideally, the body of the email will say something along the line of "There are XX calibrations due in 10-days."
     
        
     
     
          
     
     
     
  • Expiscornovus Profile Picture
    33,853 Most Valuable Professional on at
    In that case try adding this expression:
    concat('There are ', string(variables('ItemCount')), ' calibrations due in 10-days.')
     

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 582

#3
Haque Profile Picture

Haque 529

Last 30 days Overall leaderboard