Question

Can I create a Zap (subroutine) that can be called by another Zap?

  • 1 March 2021
  • 7 replies
  • 730 views

Userlevel 1

I would like this to be a subroutine since it will likely change over time and will be called by a large number of different Zaps.  Is there anyway to do this?

 

 

 


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

7 replies

Userlevel 7
Badge +9

Hey @harvey,

So the way to do this is using Webhook/API. Here’s how you can achieve this:

  • Create a zap with Webhook by Zapier as a trigger, get the Webhook URL
  • At the bottom of the other Zap (that you’d like to wake up/trigger the new zap) add a webhook action > in the webhook action, add Post request> in the URL field paste the URL from 1st step > in the Data fields, type the variables and values that you want to pass to the new zap (1st step)

 

Userlevel 1

Hi @robschmidt , Is it possible for this webhook to return a result (basically some text string) back to the original Zap?  It doesn’t seem like the webhook has the ability to return a value back.  Many thanks in advance.

Userlevel 1

hey @harvey maybe add a delay step in the original zap after the webhook call has been run, then in the 2nd zap (subroutine) it stores the value somewhere, maybe Gsheets. 

 

After the delay, the original zap searches for the latest or the last value in that sheet. 

Userlevel 1

@Jhealyn Samson I see.  A bit inelegant, but I will give that a try.  Many thanks.

Userlevel 4
Badge +3

@harvey there’s a custom integration developed by @ikbelkirasan for exactly this use-case:

With the payload, you can return values to the original Zap

Userlevel 1
Badge

Maybe give 

 a try?

Userlevel 7
Badge +11

Hey @harvey,

Since it’s been a while, I wanted to check in to see if you’d managed to solve this or whether you still needed help here? 

Please let us know how you got on!