Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here
May 02, 2022 09:26 AM
I have a script to trigger a netlify build at midnight every day, but I would like to customize it further to only trigger if a new form was submitted that day. So the trigger would look something like: If form is submitted in either Table 1 or Table 2, then trigger script to run the build hook at midnight.
Or if this trigger doesn’t exist, maybe I can house the build hook in an if statement within the script. Trigger every day at midnight: if a new form was submitted, run build hook?
Thank you!
May 02, 2022 11:55 AM
Add a Find Records step that looks for records from Table 1 where the created time is today and the created by is “Anonymous” (since all forms are reported that way). If you don’t already have a “created by” and “Created time” field in Table 1, add them so you can do this.
If you also need to check for something similar in Table 2, repeat that^ with another Find Records step.
Move your Run a Script action to the “Conditional Actions” portion of the automation. Set the condition to be “If length of Found Records is at least 1”