@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
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
- Sign in to Asana as the account FrogBot should act as, and open the developer console.
- Choose Create new token, name it, and copy it.
- Use it as
auth.accessToken, or paste it when connecting.
Register an Asana app
- In the developer console, choose Create new app.
- Under OAuth, add the instance’s redirect URL:
https://your-app.example.com/api/connections/asana/callback(use your instance slug). - Under OAuth → Permission scopes, choose Full permissions.
- Copy the client ID and secret into
oauth.
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: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 itsRetry-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 factoryauth; 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:
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, mountprojectChanged 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.
Duplicates
A change can arrive twice: once from a webhook and once fromprojectChanged, or on both sides of a resync. Upsert everything by gid so a repeat is harmless.