Help

Re: Webhook triggered automation - fires before record created by separate webhook

2063 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Donna
4 - Data Explorer
4 - Data Explorer

Hi, 

I am trying to find a workaround for an issue I have with an AT automation that is triggered by a webhook. 

I am using 2 system webhooks (I can't control when they trigger) from ActiveCampaign. One is for 'deal created' which I am using as the trigger to create an airtable record. The second is 'deal updated' which I am using to update the airtable record (the aim is to keep the deal stage in the AirTable up to date). 

I am getting automation errors in AirTable because the deal updated webhook also fires in the same minute as the deal created webhook fires which means that the AT 'deal updated' automation runs an error with the update record upon most new deals. 

I am planning a workaround and wonder is it possible to restrict the conditions in the AirTable (deal updated) automation to end if an additional condition (field value in the webhook body) to the webhook trigger is not in place, or proceed if that data point exists? I have set-up an automation in ActiveCampaign to update a deal field 5 minutes after the deal creation which I know would then trigger the 'deal updated' webhook to run.  

I would also love to know if there are any other potential workarounds. Thanks! 


2 Replies 2
ScottWorld
18 - Pluto
18 - Pluto

You might be able to do what you're looking to do with Airtable's conditional groups of automation actions, so you may want to play around with that.

However, I would highly recommend taking a look at Make's ActiveCampaign automations, which gives you much more control over all of this because it gives you the ability to filter on every webhook that gets fired.

Even better, though, is that Make gives you the ability to "upsert" records in Airtable. What this means is that it will do exactly what you want without any workarounds at all on your end. "Upserting" means that it will create a record in Airtable if the record doesn't already exist, but it will update the record in Airtable if it does already exists.

I talk a little bit about upserting in this recent BuiltOnAir podcast (but not in the context of ActiveCampaign).

There can be a bit of a learning curve with Make, which is why I created this basic navigation video for Make, along with providing the link to Make’s free training courses.

Also, if you have a budget for your project and you’d like to hire an expert Airtable consultant to help you with this, please feel free to contact me through my website: Airtable consulting — ScottWorld

Yeah, the "Find records" action shows as successful because it ran successfully, it just didn't find anything.  (Slightly misleading, I know)

You're going to need to check how many records that "Find records" action found, and if it found one record then you can add an "Update record" action to it, and we do that by using the "length" property:

Screenshot 2023-07-26 at 1.08.20 PM.png

Screenshot 2023-07-26 at 1.11.24 PM.png

Screenshot 2023-07-26 at 1.08.53 PM.png
And so if length = 1, update, if length = 0 (i.e. no record was found), then create

Link to base