Asana query tutorial
Learn how to read and write data to Asana.
After setting up an Asana integration with Retool, your Asana resource is available to use in the query editor. Retool generates the available operations directly from Asana's OpenAPI specification, so you select an operation instead of writing a request from scratch.
Create a query
- Classic app
- Workflow or agent
Retool recommends using the new app builder so you can use natural language to build React-based apps using AI.
To create an Asana query in a Retool app:
- In the Retool app IDE, open the Code tab, then click + in the page or global scope.
- Select Resource query.
- Choose your Asana resource.
- Select an operation and configure its parameters.
Workflows and agent custom tools use the same Resource query block to query Asana.
- Add a Resource query block to your workflow or custom tool's function canvas.
- Choose your Asana resource.
- Select an operation and configure its parameters.
Custom tools use the same block-based canvas as workflows, so the steps are identical in either context.
Query configuration fields
Asana queries don't use fixed Retool action types. Instead, the query editor reads Asana's OpenAPI specification and exposes its operations and parameters directly.
Operation
Select the Asana API operation to call, such as retrieving tasks in a project or creating a task. Operations are grouped by the resource they act on (tasks, projects, teams, workspaces, and so on). Refer to the Asana API reference for the full list of available operations and what each one does.
Parameters
Once you select an operation, Retool displays the parameters that operation supports, grouped by where they belong in the request: path, query, or header. Required parameters are marked in the editor. Use embedded expressions to populate parameters dynamically.
{{ table1.selectedRow.data.gid }}
Request body
For operations that create or update data (such as creating a task), Retool displays a form generated from Asana's request schema. Fields marked required in the schema must be filled in before the query can run.
{
"data": {
"name": {{ nameInput.value }},
"notes": {{ notesInput.value }},
"projects": [{{ projectSelect.value }}],
"assignee": {{ assigneeSelect.value }},
"due_on": {{ dueDatePicker.value }}
}
}