I want to delay when submission-created function runs

Hi, is there a way to delay when the submission-created function runs? For example if we wanted the function to run a few minutes AFTER the form submission has been received?

The reason being one of our integrations (Segment and Intercom) takes a few minutes for data to become available (creating a user and then trying to search for the user based on on form submission data). Because of the 10sec function execution limit putting a sleep in my function doesn’t work :S ideally I’d like the submission-created to run a few minutes (say 5??) after form submission event occurs.

Any advice appreciated!

Hmmmm… good question. I can’t think of a super straightforward way to do that, so my next thought is: does the function running have to be tied to the submission time at all? If you can process/use the data later, maybe Netlify’s public API would be useful:

Let us know what you think or if you’ve thought of something better in the meantime!

Thanks for your response! It’s on the backburner for now as we’ve had to implement logic in one place (vs two) so there is no longer a need to delay running code (for now…)

1 Like