Help

Discover what data silos are costing your org in our commissioned Forrester study. Learn more

Trigger script at end of day IF new form submitted

Topic Labels: Automations
187 1
cancel
Showing results for 
Search instead for 
Did you mean: 

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!

image

1 Reply 1

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”