An example of using Sub-Zaps by Zapier (to retrieve an access token)

  • 12 August 2021
  • 1 reply
An example of using Sub-Zaps by Zapier (to retrieve an access token)
Userlevel 7
Badge +11

Heyo Zappers! This week's Workflow Wednesday post will be a pretty quick one. I wanted to show an example of a way to use Sub-Zaps by Zapier in order to simplify a tedious process.

The Challenge 

Sometimes an app integration doesn't do what you need it to, so you venture into API territory. In this example I'm using Webhooks by Zapier and I need an access token when making an API call. 

Tedious Way #1

You could copy some master Zap that contains the exact Webhooks step you need, then change the other steps in the Zap as you see fit. It's better than option 2:

Tedious Way #2

Recreate the Webhook step each time, by looking at a Zap or something in a document you've saved. Yes, the rest of the steps will be exactly what you need, but there's a whole bunch of manual work.

A Better Solution

Wouldn't it be great if you could build a Zap that only retrieves the access token, then plug that value into the other Zaps that need said token? 

Enter Sub-Zaps by Zapier. They exist as standalone Zaps to which you can send data, process it in the sub-Zap, then send it back to the parent/main Zap. I have another Zap that goes through the process of creating and communicating with Sub-Zaps:

You can check that one out for a more detailed look. For the purpose of this article I'm going to explain my specific use case.

Our Community Platform's Integration Doesn't Have What I Need

We use a platform called inSided, and though they've got a Zapier integration and it's capable of doing some common things, it can't do all of the complex stuff that I sometimes come up with.

Check the API Documentation

I can see in their API docs that in order to authenticate with them, an access token is required:


Getting the Access Token

Based on what they show in their documentation…


I can do the following in my Sub-Zap:


Sending the Token to the Main Zap

This is how it looks in the Zap, when I use the output of that Webhooks step to send the token back my main Zap:


Meanwhile, in the Main Zap

You can see the Sub-Zap and the next step, in which I will use the token that was retrieved by the Sub-Zap:


Then I map the output of that Sub-Zap like this:


Beyond Just Personal Use

One of the beautiful things about a Sub-Zap is that if I make it a shared Zap, then other members of my team can use it to get an access token. It's one less thing they have to worry about, and all of the requests for tokens can come from that single Zap (instead of however many Zaps we build that need the token).

In Conclusion

I hope this has shown you one way that you can take advantage of Sub-Zaps by Zapier, to make building your Zaps just a little bit easier. Until next time, happy Zapping!

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 1

What if you have an application grant type and need to use a redirect uri?  Would that be possible to set up using a sub-Zap?  Seems like maybe not since you have a browser interaction involved, but thought I’d ask.