tmschltn Posted December 10, 2019 Share Posted December 10, 2019 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. Davejorg 1 Link to comment
Davejorg Posted January 10, 2020 Share Posted January 10, 2020 (edited) 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". 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; 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 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 January 10, 2020 by Davejorg jeverest 1 Link to comment
jeverest Posted January 14, 2020 Share Posted January 14, 2020 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
skotzko Posted January 21, 2020 Share Posted January 21, 2020 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: Installed workflow & made the id changes above in asana.php & workflows.php Set my access token — it works and running 'aspace', the workflow can see all the workspaces and projects across those workspaces I can save assignees using 'aperson' keyword I set target to a certain project using the 'aproject' keyword 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
jeverest Posted January 25, 2020 Share Posted January 25, 2020 I'm not sure @skotzko. I did set a user using apeople, adefault, and aperson commands. Maybe one of those will help get past this issue? Link to comment
skotzko Posted January 28, 2020 Share Posted January 28, 2020 (edited) Ah, thanks @jeverest. Adding the adefault makes it work. When I remove the default, it fails, but with it, it works. Edited January 28, 2020 by skotzko Link to comment
Jschleifer Posted February 6, 2020 Share Posted February 6, 2020 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
goblbotch Posted April 16, 2020 Share Posted April 16, 2020 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
Bryce Thompson Posted November 15, 2020 Share Posted November 15, 2020 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now