⚠️ MOVED TO OpenFn/adaptors! ⚠️
N.B.: New versions are available at: https://github.com/OpenFn/adaptors/tree/main/packages/asana
Language Pack for connecting with Asana.
{
"apiVersion": "1.0",
"token": "shhhhhhhh"
}
Using Asana's API requires having an API token. To generate that token, head to the Asana developer console and enter the Personal access tokens section.
There you can click on +New access token. A prompt will be opened allowing you to give the token a name and then create it.
Note: Treat your PAT like you would with a password. Do not share it or display it online.
getTask('1234', {
opt_fields: 'name,assignee',
});
getTasks('22889593722', {
opt_fields: 'name,notes,assignee',
});
updateTask('12344', {
name: 'test',
approval_status: 'pending',
assignee: '12345',
});
createTask({
name: 'test',
approval_status: 'pending',
assignee: '12345',
});
You can use a field name literal as externalId
to match a specific task. If
the task does not exist, a new one will be created. The first parameter in this
function should be the project_id
.
upsertTask('12344', {
externalId: 'name',
data: {
name: 'A new task',
projects: ['12344'],
notes: 'This is a new task',
},
});
Clone the repo, run npm install
.
Run tests using npm run test
or npm run test:watch
Build the project using npm run build
.