Zapier event based on date field

Hi guys,

did you do notifications in Zapier based on date field in Fibery? We wanted to send an email two days before some date.

@mdubakov Am I understand correctly it is not possible because current app supports only the following events:

1 Like

I haven’t used Zapier specifically, but I assume it is similar to Integromat. I’m guessing they aren’t using a date at all, but are hooked into some underlying event system for the entity anytime it is updated. There is likely a webhook setup so that when the change happens, they instantly trigger the automation in Zapier by posting the data to some endpoint. The issue is that you aren’t necessarily going to have any changes on those entities to utilize.

So, what you want to do instead is create an automation to search every N minutes for the entities with your due date field populated (ex. 60 minutes), that are due between 2 days in the future and 2 days -<your interval (N)> in the future. Then, for each that is returned, you send the notification through zapier/integromat. You’ll have to adjust the interval to balance the usage and delay you are ok with.

One extension to this, is you could possibly do this in a custom API call across multiple types, where you have the same kind of Due Date field. This would reduce the number of individual automations you’d have to setup for each Type you want to enable this behavior for.

I’m not really a Zapier user, but could you not make use of the ‘Entity updated’ trigger by having a boolean formula field that changes when the current date is 2 days prior to the trigger date.
This would mean that when this formula update occurs, Zapier would send an email. You’d also need to have a flag field (‘Email sent’) which gets set by Zapier and some logic to ensure that any updates for other reasons don’t cause an email to get sent.
Of course, this assumes Zapier triggers on formula field updates, which I don’t know is necessarily the case because I don’t use it :-/

Thanks guys, I will try this weekend and let you know if it works! :muscle:

The entity updated trigger would only trigger if the data associated with the entity was changed in some way. In this case, the entity isn’t guaranteed to change 2 days prior to the due date. If I understand correctly, the entity is set with a due date field and @Eugene_Vabishchevich is wanting a notification 2 days before that date.

So, imagine you have a task we create today with a due date of 1 month from now. When the due date is set, or description is filled in etc today, that is likely going to be the last entity changed event until the notification is desired in about 28 days. So, the only way I can see to trigger this is with a scheduled recurring timer.

If you add a fomula field that was something like:
if(ToDays(DueDate-Today())<2,true,false)
then this field would change 2 days of ahead of the due date.

That’s why I asked if Zapier is triggered when a formula field changes…
Does Zapier not trigger on derived fields?

I assumed it wouldn’t because if that does trigger updates, it would require some very careful handling. I also didn’t realize there is no Now() function, which is surprising. So, if formulas do trigger updates, adding a Now() function would have to be done very carefully. You also couldn’t ever add a Random() function.

I definitely could be wrong, but if I were working on a system like this, I’d update all dynamic calculations anytime someone accesses the entity directly, through a view, or through the API.

@Polina_Zenevich, do you have any idea?

Yes, good point.
There’s no point updating a formula until it is accessed.

“if a tree falls down in a wood…”
“if a formula updates in an entity…” :slightly_smiling_face:

It does raise the general question about spontaneous triggering of Zapier etc without polling…

Assuming that calculated fields are updated anytime the entities are accessed, one option that might be easier from an implementation standpoint would be to run a query to selectively search for entities with due dates in the future every N minutes. If they are updated by querying them, then the act of querying them will cause an entity change event.

So, you’d still have to query them, but you might be able to still have the Entity Change event automation that handles sending the notification for each entity that does change separate. Setting up the automation that way would be more simple, rather than having to iterate over the array of search results.

Hi!
If I got your idea correctly, Zapier, for now, is not the best variant of handling this case :disappointed_relieved:
You can configure this via Zapier, but it will be required to update/check every task separately, you can set a scheduler like this

Integromat will work much better (and we even have a tutorial!) - is Zapier usage a must-requirement?

But for sure this has to be handled out-of-the-box :bulb:

1 Like

My question was more specifically, how do formulas influence entity updates? If a calculated field has the today() function used, would fibery generate an entity update event every day? Would it trigger an entity update event at all?

The same thing could be considered in context of auto related entity fields that leverage formulas.

It’s not clear in the documentation what should or shouldn’t happen.

2 Likes

Hi guys!

I decided to use integration Integromat with Fibery. Basically it’s just a function addMonths/addYears in date field. Function runs every day. Instead of email I uses Slack direct message. I guess Zapier uses very similar approach.

1 Like