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. 

Link to comment
  • 5 weeks later...
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
Link to comment

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.

Link to comment

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? 

Link to comment
  • 2 weeks later...

Got this working today - thank you so much, it's great!

 

One quick thing I was wondering - is it possible to add the current clipboard as the description of the new task? I tried modifying the code myself, but was woefully unable to get it working. Any suggestions or tips would be greatly appreciated!

-Jason

Link to comment
  • 2 months later...

Hello I'm trying to install, I am quite a noob 🤓

 

I am using Alfred 4, but I don't see anything regarding Alfred in Application support.

 

Also I don't understand how to input the API key into akey? Do I replace akey with the api code? do I set the api code as the title or the subtitle? Do I have to input the token name anywhere?

 

Thanks for any help

 

Charles

Link to comment
  • 6 months later...

Hi I appreciate the ingenuity here and I have attempted to get this working on my own. I've run just about all of the commands to set everything up but keep running into this error when I try to add a task:

 

Quote

Asana QuickTask[Run Script] Passing output 'workspace: Not a Long: ' to Post Notification

 

I've also experimented with replacing all instances of 'id' with 'gid' in asana.php in hopes that that would work. I did this initially because I was receiving errors around project id not being valid and observed that there were a LOT of instances of 'id' looking through the file. I wondered if the move from id to gid was universally implemented beyond the aforementioned asana.php lines cited above.

 

Has anyone else run into these problems? If I have a solution I will update here. Thanks

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...