Functions are TypeScript code that you write to define how your integrations work.Functions run in Nango’s infrastructure and give you deep control over your Syncs, Actions, or Webhook processing.They typically cover:
Functions are defined by you and run in the Nango infrastructure
Your Functions define the business logic (API requests, transformations, etc.) of your integration
All Functions in Nango are written in TypeScript. You can use any language in your own backend
The code of your Functions is stored in a nango-integrations folder in your codebase (e.g., in your monorepo)
You can test Functions locally with the CLI
You deploy your Functions to your Nango account with a CLI (or CI/CD of your choice)
Functions are deployed to an Environment within your account (e.g., dev, staging, prod, etc.)
Within Functions, you have a Nango SDK available. The exact features of this SDK depend on the context of your Function (sync execution, webhook handler, etc.)
Functions always run in the context of a Connection
The SDK helps with: External API requests, pagination, Connection info, logging, data validation, storing data in the cache, etc.
All inputs and outputs of Functions are strictly typed
Your Functions execute on an isolated runner with dedicated resources (memory, CPU, etc.)