Sep 03, 2024 12:25 AM - edited Sep 03, 2024 12:25 AM
Hello,
I set up an automation to check a record within a certain timeframe from the job date, and if the record field was not up to date, then an email would be sent to the two people in charge of that data entry. It is basically:
If the job date is 7 days from now, and the field X is showing Y, then send an email to Bob and Jim that says "enter this data".
I have attached screenshots of the set up. I can't work out what I have done to make it think it must send the same email 500 times. Any help appreciated. I am new to automations
Sep 03, 2024 02:00 AM
Hm, if the intent is for an email to be sent for the triggering record, then try removing the Find Record action as well as the repeating group after that? That way you've set it up now it's sending one email per record in the 'Key Data Collection' view in 'Orders'
Sep 03, 2024 04:37 AM
If i remove the find records section I can't figure out how to make it look for the right record?
Sep 03, 2024 05:50 AM
Ah sorry. You mentioned the "job date is 7 days from now" thing and that looked similar to what you had in your automation trigger, and that's why I was asking whether you want to send an email for the triggering record
Given that you do not want to send an email about the triggering record, I would investigate your automation triggers to check whether you've got multiple records triggering the same automation. Maybe a bunch of records are meeting the condition at the same time and thus sending emails out to all the records in your view
Sep 03, 2024 12:01 PM
Hi,
instead of using data from Find records loop, you need to use data from triggering record
it seems like at some point in time every day X records trigger automation at the same moment. Then it loops through Y records in a view and you have X*Y emails
I don't understand why do you need to use different filters like Conditions and View. Can you use 'when record enters view' instead?
Sep 04, 2024 12:39 AM
Hello,
what do you mean from triggering record? I think I understand what you mean about why it is triggering multiple emails, but still don't understand it well enough to fix it.
The confusing part is when I run the test as configured, it all works perfect and I only get one email per record. But then when it happens in real life over night it sends duplicates.
I will try when a record enters a view and see if that works better but I won't know until tomorrow once the automation runs overnight.
Sep 04, 2024 01:06 AM
I have just tried the "when record enters view" and it doesn't work when I try enter conditions.
Looking at the information about "when record enters view" it doesn't look like it would be right for our set up anyway.
Basically, I just need certain staff to request information (antifouling cert) if what we have is not up to date but they don't ever check themselves and they often forget but it is information we need in place before we do our operation. So I need it to check a week ahead if a service is a specific type, and it hasn't been cancelled, and that a field is showing as "request antifouling cert", and if so send an email to certain staff members to enter the data. I will then have a back up automation with the same checks in place but 3 days from the operation.
It seems like it shouldn't be that complex but here I am haha
Sep 04, 2024 08:16 AM
No I just wanted to understand your actions and explain a bit, but it seems like I made the explanations even more complicated.
The confusing part is when I run the test as configured, it all works perfect and I only get one email per record. But then when it happens in real life over night it sends duplicates.
Yes, that's because you are testing it for one record. And at night, right at 00:00 (considering timezone) it runs for several records. Check history to see how much.. Or just group by {Calculated days...}. If I understand correctly, it's a number increasing by 1 each night. So, all records having 6 there now will run their automations tonight.
what do you mean from triggering record? I think I understand what you mean about why it is triggering multiple emails, but still don't understand it well enough to fix it.
I mean instead of this
You should do this
I have just tried the "when record enters view" and it doesn't work when I try enter conditions.
Of course it's not because a view already has the set of conditions in it's filter.
I didn't mean switching to "when record enters view" will fix your case. The Set of Conditions or View is just different ways to do the same thing.
Conclusion:
Problem is that you have X*Y mails at night, where X is a number of records simultaneously triggering automation and Y - number of records in a view of Find records.
The first step to do is to remove Find records. You need only trigger and Send Mail. and have X mails at night.
On your place, I would schedule a single daily automation (nightly, in fact. or you can set it to the morning time). trigger is time, then Find Records, then conditional logic => if the Length of Find Record list is >0 , send mail with a table or list of those records. When Find Records is empty it does nothing.
You can set your Conditions in Find Records, or you can use them in a view filter and then use that view in Find Records - both options are OK.
And yes, indeed is very simple. you added unnecessary complexity in your automation