Writing a New Field to A Datastore After Completing Automation Run

I am trying to make a task in ClickUp every time a Wufoo form submits.

I can get the data
I can get the data based on the date today so that I am not creating additional tasks from past form submissions.
I want it to run every hour but I don’t want a form submission from earlier in the day to be created again.

My approach now is a datastore and my thought process was that after a task was created, write something to the datastore that says that the task was created and then filter on that going forward. Thoughts on another approach.

I’m assuming you have a reason for not simply running the automation and creating a database record at the time of the submission. Maybe the issue is that Wufoo doesn’t have an instant Trigger to kick off your seq, so you need to rely on time? (Suckage if so. I actually really had to work hard to come up with that scenario).

Not knowing much about wufu/datastore. I wonder if you could create Mailhook (I’ve seen but not tested Mailhook under Webhooks). Set Wufo to send form submissions to the mail hook email address. Surely mail hook is in instant trigger (fingers crossed). Alternatively, if Wufu is like Gravity Forms there maybe a web hook plugin that might get the job done better and without relying on the weak link of email deliverability. Webhooks are an instant trigger.

Another way to go might be to do what you have now… I’m guessing you may have 1+ records sitting in your seq waiting to be processed when your seq triggers based on clock time. Now here is the hard part that should be the easy part… Unlike zapier, I haven’t found much in the way of time calculation in Make. In a perfect world you’d add a clock calc module, map the form submission time and select “Add to SEQ if time is less than <4> hours old” - or however long the repeat interval you’ve set for your seq.

Sadly, this is not a perfect world. Here is a super lame hack I’ve been using to accomplish something similar and it does seem to work. Note success will be dependent on the format of the date field in wufu - over which you probably have some degree of control.

One of my modules provides a date in this format: December 2, 2022 2:32 PM

I run it through Text Parser Match Text module with “,” in the Pattern and the date mapped to the input. The result is: December 2 2022 2:32 PM

Next I take that output and map it to a SET VARIABLE module as TEXT in the following formula: (formatdate(TEXT;x)/1000-(formatdate(timestamp; x))

I arrived at this via trial and error so I can’t really recall why I need to divide by 1000 in one and not the other. But the point of this formula is to produce the time, in seconds, between the original event and now. (NOTE you can’t just freestyle this stuff like you can in excel. See screenshot to understand which items are MAKE operators).

If I haven’t lost you at this point you now have the age (in seconds) of your form submission. So to easily filter out submissions that are too old just convert your repeating period of your seq (say 4 hours) into seconds (60x60x4) and force your submissions to pass a filter you create limiting submissions to < 14,400 seconds. (Just using my example numbers).

Hopefully this helps. Even better, someone else wise replies with an easier method.


1 Like

Rereading this question, I wonder if I missed the point. Maybe the solution you seek is simply to add a final step to your seq to delete the document in the datastore in order to avoid duplicates.

@ryan_rockwood Thank you for replying. This is very helpful in my endeavor. I am going to investigate the timestamp scenario and see if there is a way to trigger wufoo without having the functionality check every hour as well.

1 Like

After walking away from it for a night, I was able to come back to it and figure it out. The timestamp hack you mentioned will definitely come in handy for future endeavors. Here is what I figured out.

  1. Get All the entries from Wufoo.
  2. Only Store the Data where the Date = Today
  3. Move the Data to an Array
  4. Only allow the Data where the field in the Datastore doesn’t Equal Yes to pass to Clickup
  5. Create the Clickup task
  6. Update the Record in the DataStore to Yes.

2 Likes

Well, I tried to replicate what I originally did and it didn’t work as it did in the above-mentioned scenario. My theory is that it worked originally because I created the field in the datastore that I was writing to in “update a record”. When I created everything from scratch I created the field upfront and if the form didn’t have a field to be written to it, it would overwrite it as empty. Here is what I figured out that does the trick.

  1. Starting with Wufoo, it has to pull all records. Ugh
  2. Filter to only pass form submissions = today
  3. Check to see if the records exist in the datastore
  4. Filter to only pass if record exists = false
  5. Added the record to the Datastore
  6. Created a Router and then filters based on a selection made in the form.

This seems to work as expected. My next objective is to try to figure out how to clean out yesterday’s records in the Datastore.

Loving Make.com. It is taking a lot to understand but automating my business processes is worth it.

2 Likes