Automations
Write, test, and deploy scripts that run on a schedule or webhook trigger
Automations
Automations let you write TypeScript scripts that run in the cloud on a schedule
or in response to a webhook. They use the same secure credential system as
unscrambled curl, so your automations can call any authenticated API without
managing tokens.
Create an automation
This scaffolds a new automation project:
Write the code
The generated action.ts gives you a starting point:
The unscrambled.curl() function works exactly like the CLI command — it uses
your stored credentials automatically.
Configure the automation
Edit action.config.ts to set the schedule and other options:
Test locally
Run your automation in the development sandbox:
The test environment uses your real credentials but marks requests so downstream services can distinguish test from production traffic.
Deploy to production
When you're happy with the automation, deploy it:
Your code runs in an isolated Lambda sandbox. Each execution gets its own environment with no shared state.
Schedule options
Cron expressions
Set or update the schedule from the CLI:
Common patterns:
| Cron | Description |
|---|---|
0 9 * * * | Every day at 9am |
0 9 * * 1-5 | Weekdays at 9am |
*/15 * * * * | Every 15 minutes |
0 */6 * * * | Every 6 hours |
0 0 1 * * | First of every month |
Webhook triggers
Instead of a schedule, trigger your automation via webhook:
Send a POST to this URL to trigger the automation. The request body is available
as context.payload in your code:
Manual triggers
Run a deployed automation on demand:
Managing automations
List automations
View run history
View run logs
Pause and resume
Delete an automation
Environment variables
Automations can use environment variables for configuration that isn't a credential:
Access them in your code:
Execution environment
- Runtime: Node.js 20
- Timeout: Configurable, default 60 seconds, maximum 15 minutes
- Memory: 256 MB (configurable up to 1 GB)
- Sandbox: Each execution runs in an isolated Lambda environment
- Networking: Outbound HTTPS only, through Unscrambled's proxy for credential injection