Is the Asana importer available in self-hosted instances?

I have just set up a self-hosted Taiga instance and would like to import tasks from an Asana project.

Migrate from Asana to Taiga mentions that there is an Asana importer, however, I only see it in the official tree.taiga.io instance, not in my self-hosted version.

The Taiga 30min Setup post explains how to set up GitHub, Jira and Trello importers, but sadly, Asana is not mentioned there.

I also found these two issues on GitHub that don’t really help me any further:

Therefore, my question: Is the Asana importer available in self-hosted instances? If so, what do I have to configure to enable it?

Thank you in advance for your time!

I figured this out: Yes, the Asana importer is available in self-hosted instances.

However, it is a bit tricky to set it up.

Step 1: Register your instance as an app in Asana

  1. Open the “My apps” view in Asana.
    • Direct link: https://app.asana.com/0/my-apps
    • Step by step: Log in, click on your profile picture, choose “My Settings…”, go to “Apps”, click on “Manage Developer Apps”
  2. Click “Create a new app”.
  3. Enter a descriptive “App name”. Asana will display this name on the authorization screen to all users who want to import projects from Asana, so choose something end-user-friendly.
  4. Choose if you want to subscribe to the newsletter, agree to the terms and conditions and click “Create app”.

You should be redirected to a screen showing you a Client ID and a Client secret. Those are important, we’ll need them later (you can come back to this screen at any time, so no need to copy them right now – I just wanted to mention them here so I can refer to it later).

  1. Go to the “OAuth” section.
  2. Click “Add redirect URL”.
  3. Enter https://[YOUR_TAIGA_DOMAIN]/project/new/import/asana. Replace [YOUR_TAIGA_DOMAIN] with wherever your Taiga instance is hosted. [1]
  4. Click “Add”.

You will need the Redirect URL later.

Step 2: Configure taiga-back

I used the dockerized 30 min setup as described in the forum. In this case, you need to adjust taiga- back, taiga-async and taiga-front. We start with the configuration of taiga-back.

The steps to follow are pretty similar to what you’d need to do to install the taiga-contrib-auth-ldap-ext LDAP plugin, so I won’t duplicate them here.

Follow the steps for taiga-back described in the linked document below, however, use the contents of the Dockerfile and custom-back/config.append.py provided below in this post.

:link: Configuration of taiga-back

custom-back/config.append.py

Click here to expand
IMPORTERS["asana"] = {
    "active": True,
    "callback_url": "[YOUR_REDIRECT_URL]",
    "app_id": "[YOUR_CLIENT_ID]",
    "app_secret": "[YOUR_CLIENT_SECRET]",
}
  • [YOUR_CALLBACK_URL]: Replace this with the Redirect URL mentioned above.
  • [YOUR_CLIENT_ID]: Replace this with the Client ID mentioned above.
  • [YOUR_CLIENT_SECRET]: Replace this with the Client Secret mentioned above.

custom-back/Dockerfile

Click here to expand
FROM taigaio/taiga-back:latest

# Insert custom configuration into the taiga configuration file
COPY config.append.py /taiga-back/settings
RUN cat /taiga-back/settings/config.append.py >> /taiga-back/settings/config.py && rm /taiga-back/settings/config.append.py

These instructions will copy the config.append.py file into the container, append its contents to the config.py and then delete the config.append.py file again because it is not needed any more.

Step 3: Configure taiga-async

taiga-async uses the same image as taiga-back and also needs to configured for Asana import.
You can luckily re-use the configuration for taiga-back, by simply changing the taiga-async section in the docker-compose.yml file:

There, replace image: taigaio/taiga-back:latest with build: ./custom-back. [2]

Step 4: Configure taiga-front

For the taiga-front configuration, you can again follow the steps described in the README for the LDAP plugin, as the only difference is the content of the configuration JSON file:

:link: Configuration of taiga-front

custom-front/conf.override.json

This file needs to contain (among the default options) the entry:

"enableAsanaImporter": "true",

  1. If you want to make sure the URL you entered is valid, go to Taiga, create a new project and choose the “Import project” option. Append /asana to the URL shown in your browser’s address bar. This is the URL you need to enter as redirect URL. ↩︎

  2. The specified entrypoint is what makes the container the taiga-async container, so it is not a problem that build still builds a taiga-back image. ↩︎

1 Like