A Python script that monitors Auth0 organizations and sends notifications to Slack when new organizations are created.
- Monitors AuthBan organizations every minute
- Detects newly created organizations
- Enriches organization data with member information
- Sends notifications to Slack
- Persists organization data between runs
- Clone the repository:
git clone https://github.com/fern-api/neworgs.git
cd neworgs
- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Create a
.env
file with your credentials:
AUTH0_DOMAIN=your-tenant.auth0.com
AUTH0_API_TOKEN=your-auth0-api-token
SLACK_WEBHOOK_URL=your-slack-webhook-url
Run the script:
python3 get_organizations.py
The script will:
- Check for new organizations every minute
- Send notifications to Slack when new organizations are found
- Display information in the console
- Can be stopped with Ctrl+C
- Create a new project on Railway.app
- Connect your GitHub repository
- Add the following environment variables in Railway:
AUTH0_DOMAIN
AUTH0_API_TOKEN
SLACK_WEBHOOK_URL
- Deploy the project
The application will run as a worker process on Railway, continuously monitoring for new organizations.
- Python 3.11+
- requests
- python-dotenv