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.
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:
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.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 targetIt sounds like you're the right track! If this doesn't quite cover your use, email partners@zapier.com and we can discuss in more detail how we might be able to support your case.