Goals migration scripts for migrating Ally.io OKR goals data from a CSV into an Asana workspace (domain). You can also use this script for other goals from other systems, if formatted as a CSV matching the one provided as an example in goals.csv
The script is designed to migrate goals from a CSV file and load them into the Asana Goals API. It reads goal mappings, handles CSV column names, and performs API operations to create or update goals in Asana.
Before you begin, ensure you have the following:
Python 3.6+
Asana API token - we recommend using a service account
Required Python packages (asana, pandas, numpy)
Step 1: Clone the Repository
git clone https://github.com/Asana-Technical-Services/goals-migrator.git
cd goals-migrator
Step 2: Install Requirements pip install -r requirements.txt
Step 3: Set Environment Variables Export the required environment variables
export ASANA_TOKEN=your_asana_token
export WORKSPACE_GID=your_workspace_gid
export SUPER_ADMIN_GID=your_super_admin_gid
Alternatively, you can use a .env file to load these variables.
To run the script, navigate to the src directory and use the following command:
python migrator.py
To process all goals regardless of previously processed entries, add an optional flag:
python migrator.py --all