Hello,
I have a problem that branches out to many flows that I'm creating. Maybe if I simplify my problem I can apply it to the other flows.
What I want to do: When a file is created or modified, check that 3 custom columns in the sharepoint folder gets filled and then send email based on the value of a choice type item. (Before the choice column is filled, there must be edits made to the uploaded excel file)
The flow I have is working, HOWEVER...
The problem: Every changes made to the excel file that is uploaded, an email will be sent, causing to flow to trigger again and again. Even if the choice type column is one of two values or none, any changes made to the excel file online is triggering the flow.
How do I solve this problem, please help.
Solved! Go to Solution.
Hi @davaakhuu ,
When the file is changed, Flow will be triggered and will pass the trigger conditions check. You didn't change other field values, so the execution result of Flow is similar to the last time. Power Automate currently has no way to monitor whether only the contents of the file have been changed or the value of the custom/specified field has been changed.
The method that can be considered is to add an additional field to distinguish whether the file content or field value has been changed, and manually change the value of this field when the file content or field is changed. You can set the field type to Yes/No.
And add a condition in the trigger conditions to determine the value of this field, only trigger Flow when this value meets expectations.
Hope that makes sense.
Best Regards,
Thank you very much for your reply. After about a week of frustration on flows. I have managed to more or less achieve what I wanted to do based on your helpful reply. Posting my results and logic here for anyone else that is looking for solutions.
Firstly, I used trigger conditions on the settings of the main trigger. @not(empty(triggerbody()?['ColumnName'])) to ensure that certain columns get filled before the trigger is fired.
Secondly, as you suggested I used a Yes/No column to check that the email has been sent. This took me to 3 tries to get it right.
If the value of the column "Mail Sent" is "Yes", to terminate the flow and if its "No" to send email and update the file properties of the 'Mail Sent' column to "Yes" based on a value of another column choice column called "Submit".
Feeling very happy to have accomplished this as a newbie to flow. Hope others find this useful.
Hi @davaakhuu ,
When the file is changed, Flow will be triggered and will pass the trigger conditions check. You didn't change other field values, so the execution result of Flow is similar to the last time. Power Automate currently has no way to monitor whether only the contents of the file have been changed or the value of the custom/specified field has been changed.
The method that can be considered is to add an additional field to distinguish whether the file content or field value has been changed, and manually change the value of this field when the file content or field is changed. You can set the field type to Yes/No.
And add a condition in the trigger conditions to determine the value of this field, only trigger Flow when this value meets expectations.
Hope that makes sense.
Best Regards,
Thank you very much for your reply. After about a week of frustration on flows. I have managed to more or less achieve what I wanted to do based on your helpful reply. Posting my results and logic here for anyone else that is looking for solutions.
Firstly, I used trigger conditions on the settings of the main trigger. @not(empty(triggerbody()?['ColumnName'])) to ensure that certain columns get filled before the trigger is fired.
Secondly, as you suggested I used a Yes/No column to check that the email has been sent. This took me to 3 tries to get it right.
If the value of the column "Mail Sent" is "Yes", to terminate the flow and if its "No" to send email and update the file properties of the 'Mail Sent' column to "Yes" based on a value of another column choice column called "Submit".
Feeling very happy to have accomplished this as a newbie to flow. Hope others find this useful.
Power Automate User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
User | Count |
---|---|
57 | |
44 | |
44 | |
35 | |
34 |
User | Count |
---|---|
75 | |
69 | |
59 | |
58 | |
52 |