Add a "Delay" action to automations

Was surprised to not see a feature request for this already as it’s something I use constantly in other tools (Hubspot, is the major one) and it would come in very handy in Fibery!

One use case is waiting for a few minutes for a formula on an entity to calculate before using that value to filter the next step.

Another use case would be to delay an action from happening that was triggered by accident. i.e. Email the client a release summary when state = “Done”, but wait 5 minutes to make sure the state is still “Done” in case it was originally changed in error. Similar to how in Gmail you can set a small period of time between when you press “Send” and when the email actually gets sent, in case you change your mind or notice a typo. :slight_smile:

Would like to be able to set a pre-defined delay on certain actions, or be able to delay the next step of an automation until a dynamic date/time field.

Delay For Set Amount Of Time
[Number] of [Units Of Time] (minutes/hours/days/weeks/months)

or

Delay Until Specific Date/Time
[Date] and [Time] or [DateTime]

Most powerful would be combining the two, but I imagine at that point it becomes less of a “Delay” and more of an improved “On Schedule” automation trigger.

[Number] of [Minutes/Hours/Days/Weeks/Months] before [Date] and [Time] Fields
[Number] of [Minutes/Hours/Days/Weeks/Months] after [Date] and [Time] Fields

I have also created various clumsy workarounds to address similar needs.

If your required delay can be imprecise and can afford to wait an hour or more, you can leverage a time-based Fibery Rule that runs hourly.

Another approach is to trigger an external tool like make.io or n8n.io via http, which can send back a separate https request after some delay.

That would be really handy. I just had the same need!

Same! Even wait for a couple of seconds/minutes is already really helpfull. This will downsize the number of workarounds to prefend the system from looping or running to often.

2 Likes

A Delay Action would come in very handy.

I just tried to implement it using the Script Action in order to give you a workaround, but it turns out that the setTimeout function is not available inside the Script Action :frowning: Otherwise, I could have offered you the following workaround:

// Wait 5 seconds
await new Promise(resolve => setTimeout(() => resolve(), 5000));

By the way, there will be a dedicated Delay Action in Fiberflow :wink:

Cheers,
Ben

I think there are situations where a delay could address some challenges with the current flow of automations, but it’s also worth thinking about the possible negative implications. For example, what happens if a collaborator in the workspaces makes a change in the period between the automation triggering and the execution of the actions because of the delay period.
In some cases, I could imagine users being confused as to why the automation wasn’t behaving in the way they were expecting.

With respect to the use cases for allowing a delay, I think there may be better solutions, e.g.

For this

it could be solved by allowing formulas in the construction of the automation rule filter (so that it wasn’t dependent on the asynchronous formula service execution speed).

For this

it could potentially be solved using the existing ‘scheduled automations’ (as @Matt_Blais mentioned) i.e. check the Done state every hour. This could be combined with the ability to cap the number of times an automation can be executed i.e. the automation called ‘Email summary to client’ can only run max once per entity.

Perhaps the cap would also address the non-specific issues mentioned by @Marloes

I think it’s be cool to look at other example use cases, try to understand the real need, and then brainstorm ideas for ways to do it.

3 Likes

I have a very simple use case for this, in that when an entity is created i want to update the team on slack with a summary of info, but the slack message sends before the formulas have updated so information is missing.

I love Fibery but it can cause a lot of frustration when trying to setup such simple things and adding a delay, which seems like it is available in every other piece of automation software, isn’t available. Things like this could harm adoption by larger markets of users.

I know it is a bit clunky, but maybe you could create a meta-formula checkbox field, which determines if the fields necessary for inclusion in the slack message have been correctly populated, and then trigger the automation when this field becomes true.

I agree it’s not as simple as just adding a 10 second delay, but until delays are available, maybe it helps

1 Like

I couldn’t find a related old post I was looking for, which lamented the lack of any ability to synchronize and sequence different Rules.

I have built some crazy contraptions to work around these issues :grimacing:

1 Like

Hey everyone,
I’ve built a Fiberflow delay endpoint that everyone can use to delay the execution of a Fibery automation:

Add a script action with the following code:

let delay_ms = 5000; // Adjust this to the desired delay (in milliseconds)

// Fibery HTTP timeout is 20 seconds, script action timeout is 60 seconds
while (delay_ms > 0) {
  await context
    .getService("http")
    .postAsync("https://api.fiberflow.io/api/action/delay", {
      body: { delay_ms: Math.min(delay_ms, 10_000) },
    });

  delay_ms -= 10_000;
}

Note that the maximum time that a script action can run is 60 seconds, so if you need a longer delay you have to use multiple script actions with 60 seconds each. Also note that Fibery automations run one by one. Adding delay naively may cause slowdown for some big workspaces, so stay safe out there!

Cheers,
Ben

3 Likes