What you can do with functions
- Call external systems: Integrate with approved external APIs using a network allowlist
- Run on events: Trigger functions from automations using user lifecycle events, access changes, or schedules
- Implement custom business logic: Write your organization’s unique workflows in TypeScript
- Access C1 data: Query users, apps, and entitlements through type-safe APIs
Key features
Functions provide a secure, managed environment for running custom code.TypeScript runtime
- Modern TypeScript with async/await support
- Import external npm packages dynamically using
npm:prefix @c1/functions-sdkprovides pre-authenticated access to C1 APIs
Security and isolation
- Each function runs in isolation in a sandboxed environment
- Functions authenticate to the C1 API as a service principal — its role bindings determine what the function can do at runtime
- Network allowlist controls which external domains functions can access
- Secrets management stores API keys securely, accessible via
functions.getConfig() - Execution logs capture
console.logstatements and stream back to the UI
Where functions run
Once you’ve written and published a function, it can be invoked in multiple ways:Automation steps
Functions can run as steps in automation workflows, triggered by:- User lifecycle events (created, updated, deactivated)
- Access events (grant created, revoked)
- Review events (completed, decisions made)
- Schedule triggers (daily, weekly, custom)
Manual invocation
You can run functions on-demand from the C1 web UI:1
Navigate to Workflows > Functions and select your function.
2
Click Run.
3
Provide input JSON.
4
Click Run. The function executes and returns output JSON.