Skip to main content
@frogbotai/piece-asana works with Asana through its REST API. Imports page through workspaces, teams, projects, sections, tasks, subtasks, dependencies, custom fields, comments, attachments and users; agents create tasks; triggers react to new, changed, completed and commented tasks.

Connect Asana

People connect with a pasted personal access token, with Sign in with Asana, or either:
Drop oauth and oauth: true to offer tokens only. Both kinds of token are sent the same way, as a bearer token. See factory options for the shared options.

Make a personal access token

  1. Sign in to Asana as the account FrogBot should act as, and open the developer console.
  2. Choose Create new token, name it, and copy it.
  3. Use it as auth.accessToken, or paste it when connecting.

Register an Asana app

  1. In the developer console, choose Create new app.
  2. Under OAuth, add the instance’s redirect URL: https://your-app.example.com/api/connections/asana/callback (use your instance slug).
  3. Under OAuth → Permission scopes, choose Full permissions.
  4. Copy the client ID and secret into oauth.
Sign-in uses PKCE. Asana’s access tokens last an hour, and FrogBot refreshes them with the stored refresh token. The connected account is named from the sign-in itself, with no extra call.

Actions

Inputs that name an Asana object take its gid, such as 1203456789012345.

Page through a workspace

These actions return one page at a time, for imports:
Each takes limit (1–100, default 50) and cursor, the previous page’s pagination.nextCursor, which is null on the last page. Keep the other inputs the same between pages. An attachment’s download_url lasts two minutes, so an import that pages through hundreds of attachments shouldn’t save the URLs for later. Call downloadAttachment per attachment instead: it fetches a fresh URL first.

Rate limits

Asana allows 150 requests a minute on free workspaces and 1,500 on paid ones. When Asana rate-limits a request, FrogBot waits for its Retry-After and retries up to 3 times, stopping early if the request is aborted. Errors keep Asana’s messages and status.

Triggers

Each takes a projectGid. The four webhook triggers each register an Asana webhook on that project, so the app needs a public serverURL (see Triggers). Asana checks the URL when it registers the webhook, and FrogBot answers that check before the subscription goes live. Every delivery is signed, and an unsigned or wrongly signed one is refused. Asana sends small events, so a webhook trigger fetches the full task (and comment) before emitting. When it can’t, for example because the task was deleted, it emits the event as Asana sent it, without task.

Credential

Triggers run with no signed-in person, so mount them on a separate instance with its own factory auth; the instance in your connection entry throws missing without a signed-in person. Asana ties each webhook to the token that created it. Give the instance a token, ideally for a dedicated Asana account:
Triggers see what that account can see.

Missed changes

Asana delivers each webhook event at most once, and deletes a webhook after 24 hours of failed deliveries, without telling FrogBot: the subscription still looks active. If the app may be down that long, for example while switching over from Asana, mount projectChanged too. projectChanged is a polling trigger on Asana’s Events API, every 5 minutes by default.
  • The first poll only records where to start.
  • Each poll reads up to 10 pages of events, and the rest wait for the next poll.
  • Events carry names (resource.name, user.name) but not the full record.
Asana’s position marker expires after 24 hours without a poll. The next poll then emits one { type: 'resync', projectGid, detectedAt } event. It means that changes may have been missed, so re-import the project.

Duplicates

A change can arrive twice: once from a webhook and once from projectChanged, or on both sides of a resync. Upsert everything by gid so a repeat is harmless.