Command
nylas webhook server
The nylas webhook server command starts a local HTTP server that receives webhook events from Nylas. It automatically creates a tunnel so Nylas can reach your machine. Use --port to choose a port. Events are logged to the terminal in real time, making it easy to debug webhook payloads during development.
Usage
nylas webhook server [--port PORT]Flags
| Flag | Description |
|---|---|
| --json | Output as JSON |
| --no-color | Disable color output |
| --verbose(-v) | Enable verbose output |
| --config | Custom config file path |
| --help(-h) | Show help for the command |
| --limit | Limit results (most list commands) |
| --yes(-y) | Skip confirmations |
| --port | Port to listen on (default: 4567) |
Examples
Start on default port
nylas webhook serverStart on a custom port
nylas webhook server --port 8080Troubleshooting
Port already in use
Choose a different port with --port, or stop the process using the default port (lsof -i :4567).
Tunnel fails to connect
Check your internet connection. If behind a corporate proxy, set HTTPS_PROXY. Try a different port.
Recommended guides
Extract OTP Codes from Email — Skip the Inbox
Pull 2FA verification codes from email without opening your inbox. nylas otp get copies the code to your clipboard. Works with Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP.
Test Email in CI/CD with PowerShell
Test email delivery and content in CI/CD pipelines using PowerShell and Nylas CLI. GitHub Actions and Azure DevOps examples with Pester assertions on email content.
E2E Email Testing with Playwright
Test password reset, invitation, and verification emails end-to-end. Poll with Nylas CLI, verify content in Playwright, and click links. No Gmail config needed.
Run nylas webhook server --help for full help output.