Functions are serverless deployments of your browser automations that can be invoked via API, scheduled to run automatically, or triggered by events.
What are Functions?
Functions turn your automation scripts into:- API endpoints you can call with HTTP requests
- Scheduled jobs that run on a cron schedule
- Reusable workflows accessible from anywhere
- Shareable automations for your team
- ✅ Run on Notte’s infrastructure (no servers to manage)
- ✅ Scale automatically based on demand
- ✅ Provide built-in logging and monitoring
- ✅ Can be invoked from any platform (Python, JavaScript, cURL, etc.)
- ✅ Support scheduling and automation
How Functions Work
1. Write Your Script
Create a Python file with arun() function:
basic_function.py
2. Deploy to Notte
Upload your script to create a Function:deploy_function.py
3. Invoke the Function
Call your Function as an API:Function Structure
The Handler Function
Functions must have arun() function that serves as the entry point:
- Named
run()- this is the entry point - Can accept parameters (passed as
variableswhen invoked) - Should have type hints for clarity
- Should include docstring documentation
- Returns a value (any JSON-serializable type)
Parameters
Define parameters as arguments to therun function:
Return Values
Functions can return any JSON-serializable data:Use Cases
1. Scheduled Scraping
Extract data on a schedule:2. API Endpoints
Expose automation as an API:3. Webhooks
Trigger automations from external events:4. Batch Processing
Process multiple items in parallel:How Functions Fit In
Functions are a deployment layer - they turn any automation into a reusable API.- Session - The cloud browser that runs everything
- Scripted Automation vs Agent - How you control the session
- Function - Deploys your automation as an API with scheduling, versioning, and sharing
- You need to run automation repeatedly
- You want to expose automation as an API
- You need scheduling capabilities
- You want to share automation with team or customers
Function Lifecycle
- Write - Create Python script with
run()function - Deploy - Upload to Notte (creates function ID)
- Version - Notte tracks versions automatically
- Invoke - Call via API, schedule, or webhook
- Execute - Runs on Notte infrastructure
- Monitor - View logs, replays, and results

