Hi everyone,
I have a very interesting use case that some others might have run into as well. The use case is for Hubspot contacts and deals and updating these in a third party app or other database.
Here is the issue: There is no way to have a trigger that notices a change to hubspot associations. That is, if you change a contact associated with a deal - there is no trigger for that.
A workaround I have created is to use the trigger ‘update on property change’ and use the property change ‘last modified time’.
But now there are a LOT of triggers that are created. Every chat, conversation, email, phone call, everything is a trigger.
So then I dealt with it in three parts:
- A trigger system that sends a webhook
- A catcher system that sorts and filters these triggers and passes on to the actual updater
- The updater that updates the database with all sorts of interesting things (looping through associated contacts to get their details and update them for example) but this is not a concern for the time being.
The Trigger goes like this:
- Receive trigger
- create a key in storage by zapier with Key: CID_{Deal_ID}
- send webhook
The Catcher goes like this:
- Receive webhook with Deal_ID
- Go into delay by zapier queue with queue name Q_{Deal_ID}
- once out of delay use storage by zapier to find key CID_{deal_ID}
- Filter by zapier to continue only if a value is found at CID_{deal_ID}
- It runs some other checks (not important) before sending a webhook to the actual updater and then:
- Uses storage by zapier to erase the key and value at CID_{Deal_ID}
In theory what this should do is:
- Allow many triggers to be triggered
- Queue up those triggers
- Only allow the first trigger to actually move past the 4th step in the Catcher workflow
The issue I am having is this:
- The trigger system receives a trigger and stores a key and value. This key is CID_{deal_ID}
- A heap of these triggers run at say 04:15:00 - the last one finishes at 04:15:10
- A bunch of Catcher zaps begin running
- They all queue correctly, releasing every minute one by one from 4:16:00 onwards
- The first one is the only one meant to pass.
- It then sends a webhook to the actual updater, then clear the key and value at CID_{Deal_ID}
Unfortunately what is happening is for every single Catcher workflow is running and is finding a key and value at CID_{Deal_ID} when none should exist.
Is this a zapier caching issue? Is there another inbuilt delay? Are zaps that use a find storage step finding that storage value on zap initialisation instead of when the step actually runs (say, after a delay step)?
These are the only answers I have.
If anyone has any suggestions please hit me up.
If you have any suggestions about how to deal with a better trigger for updated associations for hubspot deals also please let know.