Question

Catch and combine multiple api calls

  • 21 April 2023
  • 1 reply
  • 107 views

Hi there,

I am trying to create a zap that gathers extra information via gongs apis when a new gong call is recorded. I use the gong trigger to wait for a new call, then when triggered I send a post webhook to get the extensive call info. I send another post webhook request with a zapier webhook url to send to another zap. I do these last two steps again for the transcript api (different address). In a separate zap I start with the catch raw webhook action. How can I wait for both payloads being sent to this address from the same zap, and how can I reference both separately in the next trigger? I need the raw payload from each request as a separate variable. Thanks!


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 6
Badge +8

I haven’t tested this specifically, but I’d imagine you could use a Storage by Zapier action for this (or the store client in a Code by Zapier action).

Do the two payloads have any shared unique identifier (or at least a fairly distinct one - so that you don’t risk the same identifier running at the same time - like if you’d taken multiple calls in a matter of a few minutes)? These might include time of call, phone number, etc.

Assuming this shared identifier, I would check if that exists as a key in storage. If not, I would use it as the key with the payload as the value, and then use a filter to stop the Zap run. If the key does already exist, that means we now have both payloads and can proceed with the Zap past the filter step and both payloads in hand. (If you need to access both payloads in yet another Zap, you’ll also want to be sure to save the second to storage).

Assuming you used a completely unique identifier, no further action would be needed. If you used something like a phone number (which could theoretically have another call in the future), you’ll want to be sure to delete both key/value pairs from storage so that the Zaps are ready to process that identifier the next time the Zaps run.