hi! I'm trying to build a workflow that automates an email when a row listed under a column in an excel file titled "Status" changes from Open to In Progress and In Progress to Completed. I've been watch tutorials and reading about this but am getting stuck in the condition step. I'd greatly appreciate any assistance. Thank you!
@Jonathan_Patton The way you're current flow is set up is that you will be sending an email any time a file is created or modified in the doc library you've specified in your Trigger. In Power Automate there aren't any Excel actions that will be able to check whether a column has been changed from one value to another. I've made a suggestion at the bottom of this post as to what additional actions you could add to your flow.
However, I'm not sure that this flow will perform the way you are expecting it to perform.
For clarification, this is what's going on in your flow currently.
Your flow will trigger whenever a file has been created or modified. Since the document library is only specified in the action, this flow will trigger anytime a new file is created in the doc library specified or updated. If you want to be even more specific—you'll need to use trigger conditions in your trigger to prevent the flow from triggering when you don't want it to trigger.
Alternatively, you can use a manual trigger to trigger the flow instead.
This action will get the rows of data in the table you specify.
The Filter Array action will check all the rows in your table and filter out the rows where the Status column is equal to Completed.
Add a Compose action after the Filter Array action to check how many items in your table have a Completed status. Please refer to this section of a YT Tutorial that I've uploaded.
The Compose action will return the number of items from your Filter Array action (the number of items that meet your filter conditions).
Add a Condition action to check if the number of items returned is not equal to 0. If true (this means that there are items in the table that have a Status of Completed. You can insert your Send an Email action into the YES branch. This means, the email will only be sent if there are Completed items in your table.
Remember, the Filter Array action can only Filter the rows with a Completed status. Not whether or not the row has changed from one status to Completed.
If you want a way to check whether or not a Completed status in a specific row has been recognized you'll have to include a way of marking the row. Either with a timestamp or a column that indicates an email has already been sent. Otherwise there is no way for Power Automate to determine if the status has been changed or not.
Hope this helps!
update: So I'm getting closer and am receiving a single email now using Filter array however, I'm also getting an email for every change made in the spreadsheet when I'm only trying to get one when a change has been made to the status column. Am I getting any closer or am I still way off?
thanks for the help. In my excel sheet when I change the status to Completed, I'm receiving a separate email for each instance of the word "Completed" so in this example, if I update row three, I'm getting two emails. I'm trying to get an email only when the status column is updated and only for that row. Hope that makes more sense.
@Jonathan_Patton The current logic of your flow is:
Can you clarify what you mean by "r..eceive a single notification when this change is made." Change made where?
Thanks for your help. I'm making progress and am now receiving automated emails when I change the cell to 'Completed" however, I'm getting a separate email for every instance on my excel sheet. Any advice on how to update this so I only receive a single notification when this change is made?
@Jonathan_Patton The dynamic content you've selected in the Condition is incorrect. You should be selecting the Status column dynamic content.
However, the way you've set up the flow is inefficient as it will currently go through each row in your Excel table and check which rows have a Status of Completed. Depending on how many rows your table has it would be unnecessary to do this. Instead, you should use a Filter Array action to filter out the rows of your table based on the Status column. Then, loop through those items only.
To learn more about how to use the Filter Array action, please refer to this recent YT Tutorial I uploaded.
Hope this helps!