Is there a specific process to have Staging and Production Zapier apps?
Asked Answered
K

1

6

We are about to start entering the beta process of our Zapier app and I have this question which I couldn't find an answer in the Zapier documentation:

The problem is regarding the staging and production environments. We have 2 Zapier apps setup, one for each environment. The production application is the one obviously intended to go beta and public eventually, but all the development is done in the second app, the staging one.

Our clients, even the ones we need to invite to enter beta, do not have access to staging accounts, and most of our developers do not have access to production accounts as well.

Each of those applications are also supposed to connect to different base domains, the staging Zapier application, of course, connects to one of our staging servers, and the production Zapier application will need to use another base domain, the same our clients use.

What I am trying to find is a mechanism in the Zapier API that will allow me to conditionally select which base domain to use based on something that can tell me which environment this app is supposed to use.

If the whole idea of 2 Zapier applications is also not the recommended way, I am open to directions of how we are supposed to be doing this.

Kileykilgore answered 11/1, 2019 at 10:17 Comment(0)
S
8

David here, from the Zapier Platform team. This is a great question!

The short answer is that we don't have any specific guidance on how to do this. What's going to work for you really depends on the specifics of who has access to what. Luckily, we do have some tools that are helpful for this sort of task, such as:

  • environment variables (accessed using zapier env) are great, because you can change the server an app uses on the fly. Or, you can specify a test server for unit tests. This might be weird for actual users if their creds only work in one of staging / prod
  • 2 apps isn't too bad if you've got tools to manage them. The .zapierapprc file is json that stores the app's id, which it sends to the Zapier server to identify itself. In the past, I've set it up with 2 similar files names .stagingrc and .prodrc. Then, i've got a command that can set the mode to "prod" by running cp .prodrc .zapierapprc. This will give you one codebase, but easily let you switch between apps if you need to have one set with a different target

It sounds like you're the right track! If this doesn't quite cover your use, email [email protected] and we can discuss in more detail how we might be able to support your case.

Sock answered 11/1, 2019 at 21:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.