OpenFn adaptor for accessing objects in Asana
npm install @openfn/language-asanaLanguage Pack for connecting with Asana.
View all the required and optional properties for state.configuration in the
official
configuration-schema
definition.
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.
For API Reference docs
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._
``js`
getTask('1234', {
opt_fields: 'name,assignee',
});
`js`
getTasks('22889593722', {
opt_fields: 'name,notes,assignee',
});
`js`
updateTask('12344', {
name: 'test',
approval_status: 'pending',
assignee: '12345',
});
`js`
createTask({
name: 'test',
approval_status: 'pending',
assignee: '12345',
});
You can use a field name literal as externalId to match a specific task. Ifproject_id
the task does not exist, a new one will be created. The first parameter in this
function should be the .
`js`
upsertTask('12344', {
externalId: 'name',
data: {
name: 'A new task',
projects: ['12344'],
notes: 'This is a new task',
},
});
Clone the adaptors monorepo. Follow the
Getting Started guide inside to get set up.
Run tests using pnpm run test or pnpm run test:watch
Build the project using pnpm build.
To just build the docs run pnpm build docs`