Skip to main content

Integration Functions

Functions are Nango’s TypeScript runtime for building custom integrations. You write integration logic in TypeScript and deploy it to Nango. Functions execute with built-in access to authenticated APIs, retries, storage, and observability. Functions are a flexible primitive that you can use to build any integration use-case, from simple API actions to complex data syncs, RAG pipelines & real-time webhook ingestion. Pair Functions with the AI integration builder to generate and maintain integration code faster: combine the speed of AI with human-reviewable code you fully control.

How it works

1. Define a function
export default async function run(nango: Nango) {
    const { owner, repo, title, body } = nango.input;

    const response = await nango.post({
        endpoint: `/repos/${owner}/${repo}/issues`,
        data: { title, body }
    });

    return response.data;
}
You can find many examples of Functions in our integration templates GitHub repo.
2. Deploy the function Deploy your function to Nango using the CLI:
nango deploy
3. Trigger the function Call the function via Nango’s API using the connection ID and function name:
const result = await nango.trigger({
    integrationId: 'github',
    connectionId: connectionId,
    functionName: 'create-issue',
    input: {
        owner: 'acme',
        repo: 'my-repo',
        title: 'Bug report',
        body: 'Something is broken'
    }
});

Capabilities

Runtime and execution

  • Runs inside Nango
  • Isolated execution per customer and per run
  • Elastic scaling & fast startup time (less than 100ms)
  • Flexible use-cases: long-running syncs, rapid-fire actions, etc.
  • Triggered by API calls, schedules, webhooks, or life-cycle events

Developer experience

  • TypeScript-first, but compatible with any code base (HTTP API)
  • Generate & maintain integration code with your favorite AI models
  • Local development, local dry runs & testing framework
  • CLI-based workflow & CI/CD integration
  • Code lives in your own Git repository

Runtime SDK

  • Authenticated API requests
  • Retries & rate-limit handling
  • Sync engine with caching & checkpointing for ETL & RAG
  • Data transformation utilities
  • Runtime and compile-time data validation & auto-completion

State and configuration

  • Per-customer configuration & logical branching
  • Per-customer key-value storage
  • Compose functions into workflows

Observability

  • Execution & custom logs
  • Metrics and monitoring
  • Debuggable failures
  • OpenTelemetry export

Use cases

Functions are a powerful & flexible primitive to support any complex integration use-case:

Proxy

The Nango Proxy is an alternative to Functions for ad-hoc, real-time API requests. Instead of deploying integration logic, you send requests directly to Nango — same HTTP method, path, parameters, and body as the target API — and Nango injects credentials and forwards the request. When to use the Proxy:
  • You need a quick, one-off API call without deploying a Function
  • Your integration logic lives in your application code rather than Nango
  • You want authenticated passthrough with centralized logging and retries
See the Proxy implementation guide for details.

Next step

Set up functions

Learn how to set up and deploy Nango Functions.

Implement a proxy request

Learn how to implement a proxy request using Nango.