Set up dev/staging/prod environment separation for Navan integrations without a sandbox API.
Use when configuring multiple environments, building CI test pipelines, or setting up local development.
Trigger with "navan environments", "navan multi env", "navan dev setup", "navan mock server".
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Set up dev/staging/prod environment separation for Navan integrations without a sandbox API.
Use when configuring multiple environments, building CI test pipelines, or setting up local development.
Trigger with "navan environments", "navan multi env", "navan dev setup", "navan mock server".
allowed-tools
Read, Write, Edit, Bash(npm:*), Grep
version
1.7.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
["saas","navan","travel"]
compatibility
Designed for Claude Code
Navan Multi-Environment Setup
Overview
Navan does not offer a sandbox or staging API — every call hits production data with real corporate bookings and expense records. This creates risk for development and testing: a bug in a sync script could modify live itineraries, and CI pipelines cannot safely run integration tests. This skill implements environment isolation using separate OAuth apps, environment variable validation, a local development proxy, and a CI mock server.
Understanding of OAuth 2.0 client credentials flow (see navan-install-auth)
.env management tooling (dotenv, direnv, or cloud secret manager)
Instructions
Step 1: Create Per-Environment OAuth Apps
Create separate API credentials in the Navan admin dashboard for each environment. This provides natural isolation — the dev app can have read-only scopes while production gets full access.
A complete environment isolation strategy for Navan integrations: separate OAuth apps per environment with scoped permissions, an environment-aware client with write protection, a local dev proxy for request logging and mutation blocking, and a CI-ready mock server that eliminates production API dependencies from automated tests.
Error Handling
Error
Code
Solution
Missing env vars
N/A
Config loader throws on startup; check the correct .env.<environment> file exists
Write blocked in read-only
403
Expected in dev mode; switch to staging/prod for write operations
Mock endpoint not found
501
Add the endpoint to mock server; check test expectations match mock data
Proxy connection refused
502
Ensure the proxy server is running; check port availability
Wrong environment loaded
N/A
Verify NODE_ENV matches the intended .env.<environment> file
After setting up environments, see navan-security-basics for credential rotation across all environments, or navan-ci-integration for building the full CI/CD pipeline with Navan API tests.