List Tasks
Definition
The List Tasks
action for Asana allows you to retrieve a collection of tasks from a specified workspace. You can apply various filters to narrow down the results, such as retrieving tasks assigned to a specific user, tasks within a particular project, or tasks that have been completed or modified since a certain date.
- Key capabilities:
- Fetch tasks from a specific workspace and project.
- Filter tasks by the assigned user.
- Refine the list based on completion or modification timestamps.
This action is fundamental for creating automated workflows that involve reporting on project progress, syncing task data with other applications, or managing user workloads.
Inputs
-
Connection
- Purpose: This field establishes a secure, authenticated connection to your Asana account.
- Practical Guidance: Select an existing Asana connection from the dropdown menu or create a new one. This is a required step that authorizes zenphi to access your Asana data on your behalf.
- Use Case Context: You would use this field to grant zenphi the necessary permissions to pull task information from your organization's Asana workspace.
-
Workspace
- Purpose: This field specifies the exact Asana workspace from which you want to retrieve tasks.
- Practical Guidance: After you select a connection, a dropdown list of available workspaces will automatically populate. You must select one from this list.
- Use Case Context: You would use the 'Workspace' field to ensure your flow is searching for tasks in the correct high-level container, such as your company's main marketing or development workspace.
-
Get by Assignee
- Purpose: This toggle allows you to choose whether to filter tasks based on the person they are assigned to or by the project they belong to.
- Practical Guidance: This is a boolean switch. Enabling it will reveal the
Assign to user
field, while disabling it will show theProject
field. You can only use one of these two filtering methods at a time. - Use Case Context: You would enable this switch if you need to build a report of all tasks currently assigned to a specific team member.
3.1. Project (This field appears when 'Get by Assignee' is disabled)
- Purpose: This field specifies the project from which to list tasks.
- Practical Guidance: You can select the project from a dropdown list that populates after the workspace is chosen. Alternatively, you can provide a Project ID dynamically by using the token picker (chain icon) to insert an ID from a previous step in your flow, such as from a 'Create Project' action.
- Use Case Context: You would use the 'Project' field to get all the tasks related to a specific initiative, like a product launch or marketing campaign.
3.2. Assign to user (This field appears when 'Get by Assignee' is enabled)
- Purpose: This field identifies the specific user whose assigned tasks you want to retrieve.
- Practical Guidance: Choose a user from the dropdown list or provide a User ID dynamically using the token picker. Using a token is useful when the user is determined by an earlier step, like a form submission or a manager specified in a Google Sheet.
- Use Case Context: You would use the 'Assign to user' field to automate a daily digest of all open tasks for a particular employee.
-
Section
- Purpose: This field allows you to filter tasks to only those that exist within a specific section of a project.
- Practical Guidance: You must provide the name of the section as a static text value. For this filter to work, you must also have the
Project
field selected and configured. - Use Case Context: You would use the 'Section' field to retrieve only the tasks that are in the "To Do" or "In Progress" column of a project board.
-
Completed Since
- Purpose: This field filters the results to include only tasks that have been marked as complete since the specified date and time.
- Practical Guidance: You can set a fixed date by clicking the calendar icon. For dynamic workflows, use the token picker to insert a timestamp from a previous action, such as the start time of the flow, to find all tasks completed since the flow began.
- Use Case Context: You would use the 'Completed Since' field to generate a weekly report of all tasks that were finished in the last 7 days.
-
Modified Since
- Purpose: This field filters the results to include only tasks that have been modified (e.g., description changed, due date updated) since the specified date and time.
- Practical Guidance: Use the calendar icon for a static date or the token picker for a dynamic value. This is useful for syncing task updates with another system.
- Use Case Context: You would use the 'Modified Since' field to trigger a notification to a project manager whenever any task in their project has been updated.
Outputs
- items
- Data Description: This is a list containing all the tasks that matched the filter criteria defined in the inputs. Each item in the list is a complete task object with detailed properties.
- Workflow Utility: This list is most commonly used in a 'For Each' loop to process each task individually. For example, you could loop through the list to copy each task's details into a Google Sheet or to create a corresponding event in Google Calendar.
- Task id
- Data Description: The unique identifier for the Asana task.
- Workflow Utility: This ID is essential for interacting with the task in later steps. You would pass this token to an 'Update Task', 'Add Comment to Task', or 'Delete Task' action to specify exactly which task to modify.
- Name
- Data Description: The title or name of the task.
- Workflow Utility: This can be used in notifications or reports to provide a human-readable reference. For example, you could include the task 'Name' in the subject line of an email notification.
- Created At
- Data Description: The exact date and time when the task was created.
- Workflow Utility: This is useful for reporting and analysis, such as calculating how long a task has been open.
- Modified At
- Data Description: The date and time the task was last modified.
- Workflow Utility: This timestamp can be used in conditional logic. For example, you could check if a task has been modified in the last 24 hours before sending a reminder.
- Completed
- Data Description: A boolean value (
true
orfalse
) indicating whether the task is marked as complete. - Workflow Utility: This is perfect for routing your flow. You can use a condition to perform one set of actions if a task is complete and another if it is still open.
- Data Description: A boolean value (
- Assignee Status
- Data Description: The status of the task in the assignee's "My Tasks" list (e.g.,
inbox
,today
,upcoming
). - Workflow Utility: This provides context on how the assignee has triaged the task and can be used in custom reports for managers.
- Data Description: The status of the task in the assignee's "My Tasks" list (e.g.,
- Completed At
- Data Description: The date and time when the task was marked as complete.
- Workflow Utility: This is crucial for calculating task completion cycle times and for creating performance reports.
- Due on
- Data Description: The date on which the task is due (without a specific time).
- Workflow Utility: This can be used to send reminders. For example, you could trigger a flow that runs daily, lists all tasks 'Due on' today's date, and sends a chat message to the assignee.
- Due At
- Data Description: The specific date and time (in UTC) when the task is due.
- Workflow Utility: This provides a more precise deadline than 'Due on' and can be used to create calendar events with exact times.
- Start on
- Data Description: The date on which work for the task is scheduled to begin.
- Workflow Utility: This is useful for resource planning and can be used to create project timelines or Gantt charts in other systems.
- Start At
- Data Description: The specific date and time on which work for the task is scheduled to begin.
- Workflow Utility: This allows for precise scheduling and can be used to block out time on an assignee's calendar.
- Permalink Url
- Data Description: A direct web link to the task in the Asana user interface.
- Workflow Utility: This is extremely useful for notifications. You can include this URL in an email or chat message to give the recipient a one-click way to navigate directly to the task.
- Description
- Data Description: The detailed notes or description content of the task.
- Workflow Utility: This content can be logged in other systems or used to provide full context in detailed reports or notifications.
- Workspace
- Data Description: An object containing the ID and Name of the workspace the task belongs to.
- Workflow Utility: The
Workspace ID
can be passed to other Asana actions if you need to perform operations within the same workspace context.
- Assignee
- Data Description: An object containing the ID and Name of the user the task is assigned to.
- Workflow Utility: The
Assignee ID
is very powerful. You can use it in a subsequent step to assign another task to the same person or to look up their user details in another system.
- Projects
- Data Description: A list of objects, where each object contains the ID and Name of a project the task is associated with.
- Workflow Utility: The
Project ID
from this list can be used to add a new, related task to the same project, ensuring organizational consistency.
Example Use Cases
- Generate Weekly Progress Reports Automatically retrieve all tasks completed since a specific date within a project to compile and email a weekly status update to stakeholders.
- Monitor User Workloads Fetch all tasks assigned to a specific user to create a daily digest or report on their current assignments and upcoming deadlines.
- Send Overdue Task Reminders List all tasks in a project, then use conditional logic to identify tasks where the due date has passed and send automated reminders to the assignees.
- Sync Task Data to External Systems Use the "Modified Since" filter to get a list of recently updated tasks and sync their details to a Google Sheet, BI tool, or another project management application.
Example
Scenario: A project manager needs to create a weekly report every Friday that summarizes all tasks completed in the "Q4 Product Launch" project over the past seven days. Manually compiling this list is time-consuming and prone to errors. The goal is to automate this report and have it saved in a Google Sheet for review.
Steps to Implement:
- Set Up a Scheduled Trigger: Start the flow with a "Scheduled Flow" trigger configured to run every Friday morning. This will initiate the report generation process automatically each week.
- Calculate the Start Date: Use a "Date Calculator" action to subtract 7 days from the current date. The output of this action will be used to find tasks completed within the last week.
- Configure the "List Tasks" Action: Add the Asana "List Tasks" action to the flow with the following settings:
- Connection: Select your authenticated Asana connection.
- Workspace: Choose the company's primary workspace where the project resides.
- Get by Assignee: Ensure this toggle is disabled to filter by project.
- Project: Select the "Q4 Product Launch" project from the dropdown list.
- Completed Since: Use the token picker to insert the calculated date from the "Date Calculator" action in the previous step.
- Process the Tasks: Add a "For Each" loop action to iterate through the
items
list returned by the "List Tasks" action. - Populate the Report: Inside the "For Each" loop, add a "Google Sheets - Add a Row" action. Map the task properties (e.g.,
Name
,Completed At
,Assignee.Name
) from the loop's current item into the columns of your designated report spreadsheet.
Outcome: The project manager no longer needs to spend time manually tracking and compiling completed tasks. The workflow automatically generates an accurate and up-to-date report in Google Sheets every Friday, ensuring stakeholders receive timely updates and freeing up the manager to focus on strategic project activities.
Best Practices
- Always Filter Your Queries: Avoid listing tasks without specific filters like
Project
orAssign to user
. Retrieving all tasks from an entire workspace can be slow, consume unnecessary API calls, and return an unmanageably large amount of data. - Use Dynamic Date Tokens: For recurring reports or syncs, leverage dynamic tokens for the
Completed Since
andModified Since
fields. Use zenphi's built-in date functions or the "Date Calculator" action to create rolling time windows (e.g., "last 24 hours" or "last 7 days"). - Process Tasks with a 'For Each' Loop: The
items
output is a list of tasks. To perform actions on individual tasks, such as sending notifications or updating a spreadsheet, you must process this list using a "For Each" loop. - Include the Permalink URL in Notifications: When sending emails or chat messages about a task, always include the
Permalink Url
output token. This provides a direct link to the task in Asana, allowing users to navigate to it with a single click for immediate context.
Updated about 10 hours ago