Create the function
Add a file under the integration’sactions/ folder:
github/actions/create-issue.ts
index.ts:
index.ts
For agents
For agents
Before generating an action function, collect the integration ID, connection ID for testing, provider endpoint, required input fields, expected output shape, and whether the operation is safe to retry.Prefer explicit Zod schemas and short provider response mapping. If the action performs writes, make the logic idempotent before using async execution or retries.
Test and deploy
Dry run the function with realistic input:Trigger synchronously
Synchronous execution is the default. The API or SDK call returns the function output.- TypeScript
- cURL
Trigger asynchronously
Use async execution for bulk writes, bursty work, or provider endpoints with tight rate limits. Nango queues the execution, applies retries, and lets you poll or receive a webhook when it completes.Execution timing for asynchronous actions is not guaranteed. Async actions are currently processed sequentially per environment, so completion time depends on how many actions are queued and how long each one runs. Design callers to handle delays by polling the result endpoint or listening for the completion webhook.
- TypeScript
- cURL
statusUrl and id. Poll GET /action/<ACTION-ID> for the result: 404 means the execution is still running, 200 returns the function output, and 500 returns the execution error.
To receive completion events instead of polling, configure webhooks from Nango to your app and enable the Async action completed webhook.