Find Workspace

Definition

This action retrieves the complete details for a specific workspace within Asana. By providing a unique workspace identifier, you can access all its associated information, such as its name, type, and whether it is classified as an organization.

  • Key capabilities:
  • Fetch a specific workspace by its unique ID.
  • Retrieve core details including the workspace name, type, and associated email domains.

This action is fundamental for automations that need to operate within a specific Asana environment, enabling subsequent steps to target the correct projects, tasks, and users.


Inputs

  1. Connection
  • Purpose: This field establishes an authenticated connection to your Asana account. It authorizes zenphi to securely access your Asana data on your behalf.
  • Practical Guidance: You must select a pre-configured Asana connection from the dropdown menu. If you haven't connected your Asana account to zenphi yet, you will be prompted to create a new connection. This is a one-time setup for each account you wish to use.
  • Use Case Context: You would use this field to tell zenphi which Asana account contains the workspace you are looking for.
  1. Workspaces
  • Purpose: This field is used to specify the exact Asana workspace you want to find information about.
  • Practical Guidance: After you select a connection, this field will populate with a dropdown list of all available workspaces associated with that account. You can simply select one from the list. Alternatively, you can provide the workspace's globally unique identifier (GID) as a static value by typing it in, or you can pass it in dynamically from a previous step using the token picker (e.g., using the Workspace ID from a "New Task" trigger).
  • Use Case Context: You would use this field to tell the action precisely which workspace's details you need to retrieve.

Outputs

  1. Id
  • Data Description: This output provides the globally unique identifier (GID) for the retrieved workspace.
  • Workflow Utility: This ID is essential for interacting with the workspace in subsequent Asana actions. For example, you would pass this Id to a "Create Project" or "List Users" action to ensure the operation takes place in the correct workspace.
  1. Name
  • Data Description: This is the user-friendly name of the workspace as it appears in the Asana interface.
  • Workflow Utility: The Name can be used in notifications, logs, or reports to provide clear context. For instance, you could use it in an email notification like, "A new task has been created in the 'Marketing Department' workspace."
  1. Type
  • Data Description: This output specifies the type of the workspace, such as "workspace" or "organization".
  • Workflow Utility: This information can be used in conditional logic within your flow. For example, you could build a flow that performs different actions based on whether the Type is an "organization" versus a personal "workspace".
  1. Is Organization
  • Data Description: This is a boolean (true/false) value that indicates whether the workspace is considered an organization in Asana.
  • Workflow Utility: Similar to the Type output, this provides a simple true or false value that is perfect for conditional branching. For example, "If Is Organization is true, then proceed with corporate compliance steps."
  1. Email Domains
  • Data Description: This output provides a list of email domains associated with the workspace (e.g., "yourcompany.com").
  • Workflow Utility: This list is useful for user management or validation tasks. You could use a "For Each" loop to iterate through these domains or use a "Contains" condition to check if a new user's email domain matches one of the approved domains before adding them to a project.

Example Use Cases

  1. Route Projects Dynamically Find the correct workspace ID based on user input or trigger data to ensure new projects are created in the appropriate department or team space.
  2. Validate User Access Retrieve the list of approved email domains for a workspace to verify if a user is authorized to be added to a project within that organization.
  3. Create Context-Aware Notifications Use the retrieved workspace Name in notification emails or messages to provide clear context, such as "A new task was added in the 'Marketing Team' workspace."
  4. Implement Conditional Workflows Branch a workflow based on whether the workspace Type is an "organization" or a personal "workspace" to apply different business rules or compliance steps.

Example

Scenario: An IT administrator needs to automate the project setup process. When a new project request is submitted through a company portal, a workflow must automatically create the project in the correct Asana workspace corresponding to the department that made the request (e.g., "Marketing," "Engineering"). Manually selecting the workspace for each request is time-consuming and prone to error.

Steps to Implement:

  1. Initiate the Flow: Start the workflow with a trigger, such as a zenphi Form submission, where an employee provides the new project's name and selects their department from a dropdown list.
  2. Configure the Find Workspace Action: Add the "Find Workspace" action to the flow.
  • Connection: Select your pre-configured Asana connection.
  • Workspaces: Use the token picker to dynamically insert the department name captured from the form submission trigger. This tells the action to search for the workspace whose name matches the selected department.
  1. Use the Output in Subsequent Steps: Add an Asana "Create Project" action next.
  • In the "Create Project" action, use the token picker to map the Id output from the "Find Workspace" action into the Workspace ID input field.
  • Use the Name output from the "Find Workspace" action to send a confirmation email, such as: "Your project has been successfully created in the '[Name]' workspace."

Outcome: The workflow is now fully automated. It dynamically identifies the correct Asana workspace based on the initial request form, eliminating the need for manual intervention. This ensures every new project is created in the right location, reduces setup time, and prevents organizational errors.


Best Practices

  1. Use Dynamic Inputs for Scalability Instead of hardcoding a specific workspace, use the token picker to pass in the workspace name or ID from a trigger or a previous action. This makes your workflow reusable and adaptable to different teams or departments without needing modification.
  2. Validate Before Proceeding After finding a workspace, use a conditional logic (If Condition) action to check the Name or Is Organization output. This confirms you have retrieved the correct workspace before executing critical actions like creating projects or adding users, preventing errors.
  3. Incorporate Error Handling Plan for scenarios where a workspace might not be found (e.g., a typo in the input data). Use zenphi's error handling branches to define an alternative path, such as sending a notification to an administrator to review the request manually.
  4. Leverage Outputs for Rich Context Use the Name output in all subsequent logging and notification steps. This provides clear, human-readable context in logs and messages, making it easier to track and troubleshoot the workflow's execution.