Jump to content

Recommended Posts

Everyone ending up here because Asana Quicktask is not working anymore with the API 1.0 Api key or has a broken Asana Quicktask Workflow because the workspace ID is not working anymore: 

 

API 1.0 key deprecated

The api key is deprecated, but you can replace this easily with a personal access token: https://app.asana.com/0/developer-console Use the token as you would have used the api key. 

 

Broken workspace id

Asana changed something in their API when it comes to id's and the 'id' is deprecated. They now use gid, which is easily fixed in the workflow. Go to asana.php line 440 (in version 2.2) and change $workspace['id'] into $workspace['id']. If you use a specific project instead of a space, probably the same happens on line 466 and 469. 

Share this post


Link to post
On 12/10/2019 at 8:05 AM, tmschltn said:

Everyone ending up here because Asana Quicktask is not working anymore with the API 1.0 Api key or has a broken Asana Quicktask Workflow because the workspace ID is not working anymore: 

 

API 1.0 key deprecated

The api key is deprecated, but you can replace this easily with a personal access token: https://app.asana.com/0/developer-console Use the token as you would have used the api key. 

 

Broken workspace id

Asana changed something in their API when it comes to id's and the 'id' is deprecated. They now use gid, which is easily fixed in the workflow. Go to asana.php line 440 (in version 2.2) and change $workspace['id'] into $workspace['id']. If you use a specific project instead of a space, probably the same happens on line 466 and 469. 

 

Great help and insight @tmschltn . To add to the the comment above the steps to get this working with Alfred 4 are as follows. 

 

1.  From @deanishe  - Download the zipped repo, extract it, then drag the folder into your workflows directory.

 

To quickly get to your workflows directory, open Alfred Preferences, right-click on any workflow and choose Open in Finder. Then go up one level to the directory named "workflows".

 

open-in-finder.thumb.jpg.0563f3ddc3a4254967260aa280d4f86f.jpg

 

 

2. If you have Alfred 4, Open the workflows.php folder and modify lines 41 and 42 to change Alfred-3 and Alfred 3 to just say Alfred (or whatever the path of your Alfred directory is in /Library/Application Support) :

 

$this->cache = $this->home. "/Library/Caches/com.runningwithcrayons.Alfred/Workflow Data/".$this->bundle;
        $this->data  = $this->home. "/Library/Application Support/Alfred/Workflow Data/".$this->bundle;

 

workflow-php_modification.thumb.jpg.8be2d25b2a9b755430579275d030a47a.jpg

 

 

3. Modify the asana.php file in your text editor of choice.

Go to asana.php line 440 (in version 2.2) and change $workspace['id'] into $workspace['gid']. If you use a specific project instead of a space, probably the same happens on line 466 and 469. Change id to gid.

 

 

4. While logged in to asana, create a personal access token - label it what every you'd like "Alfred Workflow" is fine : https://app.asana.com/0/developer-console

 

asana-personal-token.thumb.jpg.3dceabefd74c3afc198621011fd780a7.jpg

 

 

5. set your api key in the Alfred workflow by typing akey and pasting the personal access token code that you will copy when you create it. 

 

Everything should work after that.

Edited by Davejorg

Share this post


Link to post

Thanks for the guide @Davejorg!  This worked for me with one minor change.  

 

Quote

Go to asana.php line 440 (in version 2.2) and change $workspace['id'] into $workspace['gid']. If you use a specific project instead of a space, probably the same happens on line 466 and 469. Change id to gid.

 

I did not need to change line 469 to gid.  Just the change on line 466 is needed.

Share this post


Link to post

Thanks so much for the guide @Davejorg and @jeverest. I followed the instructions, but it seems like it's "stuck" on a certain workspace. (I am a member of multiple workspaces in my Asana account.) 

 

What I tried:

  1. Installed workflow & made the id changes above in asana.php & workflows.php
  2. Set my access token — it works and running 'aspace', the workflow can see all the workspaces and projects across those workspaces
  3. I can save assignees using 'aperson' keyword
  4. I set target to a certain project using the 'aproject' keyword
  5. When I try to add a task while running the debug mode in Alfred, I see this response in the logs: [12:28:41.154] Asana QuickTask[Run Script] Passing output 'assignee: Not a user in Workspace: andrew.skotzko@gmail.com' to Post Notification

 

Help? 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...