{"id":8830,"library":"apache-airflow-providers-asana","title":"Apache Airflow Asana Provider","description":"The `apache-airflow-providers-asana` package, currently at version 2.11.3, provides operators and hooks to seamlessly integrate Apache Airflow with Asana. It enables users to programmatically manage Asana tasks (create, update, delete, find) and projects within Airflow workflows. As a community-managed provider, it's independently versioned and released from core Apache Airflow, offering flexible integration with the Asana work management tool.","status":"active","version":"2.11.3","language":"en","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/asana","tags":["Airflow","Provider","Asana","Workflow Orchestration","Task Management"],"install":[{"cmd":"pip install apache-airflow-providers-asana","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core Airflow dependency, minimum version >=2.11.0 for this provider version.","package":"apache-airflow","optional":false},{"reason":"Python client library for Asana API.","package":"asana","optional":false},{"reason":"Provides common compatibility features across providers.","package":"apache-airflow-providers-common-compat","optional":true}],"imports":[{"symbol":"AsanaCreateTaskOperator","correct":"from airflow.providers.asana.operators.asana import AsanaCreateTaskOperator"},{"symbol":"AsanaUpdateTaskOperator","correct":"from airflow.providers.asana.operators.asana import AsanaUpdateTaskOperator"},{"symbol":"AsanaDeleteTaskOperator","correct":"from airflow.providers.asana.operators.asana import AsanaDeleteTaskOperator"},{"symbol":"AsanaFindTaskOperator","correct":"from airflow.providers.asana.operators.asana import AsanaFindTaskOperator"},{"symbol":"AsanaHook","correct":"from airflow.providers.asana.hooks.asana import AsanaHook"},{"note":"The generic `AsanaOperator` is deprecated; use specific operators like `AsanaCreateTaskOperator`, `AsanaUpdateTaskOperator`, `AsanaDeleteTaskOperator`, or `AsanaFindTaskOperator` for your desired action.","wrong":"from airflow.providers.asana.operators.asana import AsanaOperator","symbol":"AsanaOperator","correct":"from airflow.providers.asana.operators.asana import AsanaCreateTaskOperator # or other specific operators"}],"quickstart":{"code":"import os\nfrom datetime import datetime\n\nfrom airflow import DAG\nfrom airflow.providers.asana.operators.asana import AsanaCreateTaskOperator\n\n# Configure your Asana Personal Access Token in an Airflow connection\n# with Conn Id 'asana_default' and 'Personal Access Token' as Login.\n# For production, consider using Airflow Secrets Backend.\n# Example values for workspace_id and project_id below are placeholders.\n# Replace 'your_workspace_id' and 'your_project_id' with actual Asana GIDs.\n\nASANA_CONN_ID = 'asana_default'\nASANA_WORKSPACE_GID = os.environ.get('ASANA_WORKSPACE_GID', 'your_workspace_id') # Asana Workspace GID\nASANA_PROJECT_GID = os.environ.get('ASANA_PROJECT_GID', 'your_project_id')   # Asana Project GID\n\nwith DAG(\n    dag_id='asana_task_creation_example',\n    start_date=datetime(2023, 1, 1),\n    schedule_interval=None,\n    catchup=False,\n    tags=['asana', 'example'],\n) as dag:\n    create_asana_task = AsanaCreateTaskOperator(\n        task_id='create_new_asana_task',\n        asana_conn_id=ASANA_CONN_ID,\n        name='Airflow-created Task',\n        task_parameters={\n            'workspace': ASANA_WORKSPACE_GID,\n            'projects': [ASANA_PROJECT_GID],\n            'notes': 'This task was created by an Apache Airflow DAG.',\n            'due_on': '2026-04-30' # Example due date\n        }\n    )\n","lang":"python","description":"This example DAG demonstrates how to create an Asana task using the `AsanaCreateTaskOperator`. It highlights the use of `asana_conn_id` to refer to an Airflow connection configured with an Asana Personal Access Token. Remember to replace placeholder GIDs with your actual Asana Workspace and Project GIDs."},"warnings":[{"fix":"Ensure your `apache-airflow-providers-asana` version is compatible with your installed Apache Airflow version. Refer to the official provider documentation for the exact compatibility matrix.","message":"Provider versions are tied to minimum Airflow versions. For example, provider `2.0.0` required Airflow `2.2.0+`, while the current `2.11.x` series requires Apache Airflow `>=2.11.0`.","severity":"breaking","affected_versions":"<2.11.0 (for current provider version)"},{"fix":"Replace `AsanaOperator` with `AsanaCreateTaskOperator`, `AsanaUpdateTaskOperator`, `AsanaDeleteTaskOperator`, or `AsanaFindTaskOperator` as appropriate for your task.","message":"The generic `AsanaOperator` class is deprecated. Users should use specific operators for distinct actions like creating, updating, deleting, or finding tasks.","severity":"deprecated","affected_versions":"All versions since 2.0.0 (where specific operators were introduced/emphasized)"},{"fix":"Ensure `pip install apache-airflow-providers-asana` is executed in the environment of all relevant Airflow components, especially in Docker/Kubernetes setups.","message":"The Asana provider package must be installed on all Airflow components (scheduler, webserver, and workers) for it to function correctly across the entire Airflow deployment.","severity":"gotcha","affected_versions":"All"},{"fix":"Create an Airflow connection of type 'Asana' in the Airflow UI. Set the `Conn Id` (e.g., `asana_default`) and paste your Personal Access Token into the 'Login' field. Ensure this `Conn Id` matches the `asana_conn_id` parameter in your operators.","message":"Authentication to Asana requires an Asana Personal Access Token configured in an Airflow connection. Incorrectly configured connections will lead to authentication failures.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Run `pip install apache-airflow-providers-asana`. If using Docker/Kubernetes, ensure the installation is part of your Airflow image build process and is present in all Airflow containers (scheduler, webserver, workers).","cause":"The `apache-airflow-providers-asana` package is not installed or not accessible to the Airflow component trying to run the DAG (e.g., scheduler, worker).","error":"ModuleNotFoundError: No module named 'airflow.providers.asana.operators.asana'"},{"fix":"Navigate to `Admin -> Connections` in the Airflow UI and create a new connection. Set the `Conn Id` to match the one used in your operator (e.g., `asana_default`), choose 'Asana' as the `Conn Type`, and provide your Asana Personal Access Token in the 'Login' field.","cause":"The Airflow connection ID specified in `asana_conn_id` does not exist or is misspelled in the Airflow UI.","error":"airflow.exceptions.AirflowException: The Asana connection 'asana_default' was not found."},{"fix":"Verify the Asana Personal Access Token in your Airflow connection (Admin -> Connections) is correct and active. Check your Asana account for token validity and ensure it has the necessary permissions for the tasks your DAG attempts to perform. Regenerate the token if necessary.","cause":"The Asana Personal Access Token provided in the Airflow connection is invalid, expired, or has insufficient permissions for the requested operation.","error":"asana.error.NoAuthorizationError: Not Authorized"}]}