Jump to content

Todoist Workflow


Recommended Posts

Hi Martien

 

Thanks agian for getting back to me.

 

With your further advises I removed again the workflow and re-installed it fresh once again.

 

I was able to insert the token as advised and noted that the workflow both accepted and registered the token.

 

All good so far.

 

Until that is I try to use the workflow - failure errors persist !!!

 

What to do now ?

 

Kind Regards
Paul
Link to comment

 

Hi Martien

 

Thanks agian for getting back to me.

 

With your further advises I removed again the workflow and re-installed it fresh once again.

 

I was able to insert the token as advised and noted that the workflow both accepted and registered the token.

 

All good so far.

 

Until that is I try to use the workflow - failure errors persist !!!

 

What to do now ?

 

Kind Regards
Paul

 

 

Hi Paul,

 

I guess we are making progress. What I need to know to help you is what you are doing that is producing the errors (the process and commands) so hopefully I'll be able to recreate the error you are getting. Also, wat is the exact error you are getting?

 

Martien

Link to comment
Hi Martien

 

Here we go in order of commands :

 

Option / spacebar

 

Enter T into Alfred dialogue bar

 

Click Enter to activate “Add Task To Inbox”

 

Add any text to Alfred dialogue Bar

 

Press Enter

 

System Notification Reads

 

“Failure” Error Invalid argument value, command type “.” “item_add”,”error_code”:20,”http_code”:400

Link to comment

 

Hi Martien
 
Here we go in order of commands :
 
Option / spacebar
 
Enter T into Alfred dialogue bar
 
Click Enter to activate “Add Task To Inbox”
 
Add any text to Alfred dialogue Bar
 
Press Enter
 
System Notification Reads
 
“Failure” Error Invalid argument value, command type “.” “item_add”,”error_code”:20,”http_code”:400

 

 

 

Hi Paul,

 

It sounds like you may be using weird characters (or maybe still some of your edits in the "Add todo" script) but I can't be sure unless I know what you are typing. I just redownloaded version 3.1.2 on a different device but I can't find anything out of the ordinary.

Try this:

 

1. type the following in the alfred search bar

todo test

Still the same error?

 

2. check the files at:

~/Library/Application Support/Alfred 3/Workflow Data/com.alfred-workflow-todoist

~/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.alfred-workflow-todoist

 

Anything out of the ordinary here?

 

Martien

Link to comment

 

Martien

 

I receive the exact same error applying "test" as advised.

 

Have checked the Library locations and found nothing obviously wrong.

 

Totally baffled !!

 

Kind Regards
Paul

 

 

Hmm something just hit me, do you have node.js installed? It should work without but I haven't properly tested that.

 

Try this debug version, but be warned don't repost your token information. It will log your everything to the debug console in alfred, but I guess you know how to handle that.

 

Martien

Link to comment

I have no idea what a debug version is and am not entirely sure what you are suggesting I do nor the risks involved !!

A debug version dumps a lot more logging information than a normal version to describe exactly what it's doing, making it easier to track down errors. This makes it slower, which is why you don't do it by default.

The only "risk" is that some private information (your API access token in this case) can be in the log, so remove it before posting your log somewhere public (like on this forum).

Edited by deanishe
Link to comment

Hi Martien

 

Thankds for the advise and clarification.

 

Below is the debug info obtained from running a simple 'add task' command :

 

Starting debug for 'Alfred Workflow Todoist'
 
[2016-09-05 16:00:51][ERROR: input.scriptfilter] Code 127: /Users/paulrowe/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/A1BD754D-1A17-4886-8EFF-74527B4DA4FD: line 68: /usr/local/bin/node: No such file or directory
[2016-09-05 16:01:00][input.keyword] Processing output of 'action.script' with arg 'buy milk'
[2016-09-05 16:01:06][ERROR: action.script] /bin/bash: line 51: /usr/local/bin/node: No such file or directory
/bin/bash: line 52: /usr/local/bin/node: No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:04 --:--:--     0
100   565  100   308  100   257     53     44  0:00:05  0:00:05 --:--:--    58
100   565  100   308  100   257     53     44  0:00:05  0:00:05 --:--:--    72
/bin/bash: line 69: /usr/local/bin/node: No such file or directory
[2016-09-05 16:01:06][action.script] Processing output of 'utility.junction' with arg 'IMPORTED SETTINGS
Token: My Token Info Removed (private information)
Language: en\n
QUERY
buy milk\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "A84E02BB-D9AB-4D01-903B-9DAC7EE59C47", "args": {"content": "buy milk", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
[2016-09-05 16:01:06][utility.junction] Processing output of 'utility.filter' with arg 'IMPORTED SETTINGS
Token: My Token Info Removed (private information)
Language: en\n
QUERY
buy milk\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "A84E02BB-D9AB-4D01-903B-9DAC7EE59C47", "args": {"content": "buy milk", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
[2016-09-05 16:01:06][utility.filter] Processing output of 'output.notification' with arg 'IMPORTED SETTINGS
Token: My Token Info Removed (private information)
Language: en\n
QUERY
buy milk\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "A84E02BB-D9AB-4D01-903B-9DAC7EE59C47", "args": {"content": "buy milk", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
[2016-09-05 16:01:06][utility.junction] Processing output of 'utility.filter' with arg 'IMPORTED SETTINGS
Token: My Token Info Removed (private information)
Language: en\n
QUERY
buy milk\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "A84E02BB-D9AB-4D01-903B-9DAC7EE59C47", "args": {"content": "buy milk", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
Link to comment

Martien

 

I upgraded the installation - ran the workflow and received the following failure  debug code :

 

[2016-09-06 10:42:51][ERROR: input.scriptfilter] Code 127: /Users/paulrowe/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Scripts/4F72A8A3-9C21-479B-86C0-96B87CF7E6AB: line 68: /usr/local/bin/node: No such file or directory
[2016-09-06 10:42:59][input.keyword] Processing output of 'action.script' with arg 'thailand'
[2016-09-06 10:43:02][ERROR: action.script] /bin/bash: line 51: /usr/local/bin/node: No such file or directory
/bin/bash: line 52: /usr/local/bin/node: No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100   565  100   308  100   257     91     76  0:00:03  0:00:03 --:--:--    91
/bin/bash: line 69: /usr/local/bin/node: No such file or directory
[2016-09-06 10:43:02][action.script] Processing output of 'utility.junction' with arg 'IMPORTED SETTINGS
Token: My Token (private information)
Language: en\n
QUERY
thailand\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "1DEBC1DE-E36A-435B-AA35-CBBFC7FAA719", "args": {"content": "thailand", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
[2016-09-06 10:43:02][utility.junction] Processing output of 'utility.filter' with arg 'IMPORTED SETTINGS
Token: ae3a0d50b1c45c4629a731de4019f31371a12e15 (private information)
Language: en\n
QUERY
thailand\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "1DEBC1DE-E36A-435B-AA35-CBBFC7FAA719", "args": {"content": "thailand", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
[2016-09-06 10:43:02][utility.filter] Processing output of 'output.notification' with arg 'IMPORTED SETTINGS
Token: My Token (private information)
Language: en\n
QUERY
thailand\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "1DEBC1DE-E36A-435B-AA35-CBBFC7FAA719", "args": {"content": "thailand", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
[2016-09-06 10:43:02][utility.junction] Processing output of 'utility.filter' with arg 'IMPORTED SETTINGS
Token: My Token (private information)
Language: en\n
QUERY
thailand\n
TODOIST CALL
[{"type": "item_add", "temp_id": "", "uuid": "1DEBC1DE-E36A-435B-AA35-CBBFC7FAA719", "args": {"content": "thailand", "date_string":"", "project_id":"", "labels":"", "priority":"1", "date_lang": "en"}}]
Error: Invalid argument value","command_type":"item_add","error_code":20,"http_code":400}},"temp_id_mapping":{},"seq_no'
Link to comment

The label feature, with node.js installed you would have gotten an empty array (a list) back. But since you don't have node.js installed that array (or the array representation "[]") wasn't returned. The todoist API didn't accept an empty string "" instead of "[]" for an empty set of labels so returned an Error that an invalid value was entered. I wish they had listed which value, so I would have been on the right track much sooner. Thanks for helping me figure this out.

 

Martien   

Link to comment
  • 4 months later...

Hello Martien,

 

I am having an issue with this workflow. I have installed Brew, have installed node.js, fixed an issue with the symlinks (all seems well with node now), the node -v command returns a "7.4" string - so all is well, correct?

 

Not quite... for any feature which requires node, I get an error or a failure (without an error). For example, when I use this syntax with Alfred (todo my task, tomorrow @ 9, Single actions - {with Single actions signifying the Project} ), I get an error - and the task is not entered. If I stay away from project entry and only try to use a label (@my_label), the task enters just fine in the Inbox (as expected), but the label is not added.

 

Here's the debug log:

 

[2017-01-29 01:27:42][input.keyword] Processing output of 'action.script' with arg 'walk the dog, tomorrow @ 7, Single actions'

[2017-01-29 01:27:45][ERROR: action.script] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

100   545  100   263  100   282    557    597 --:--:-- --:--:-- --:--:--   598

[2017-01-29 01:27:45][action.script] Processing output of 'utility.junction' with arg 'Error: Invalid temporary id","command_type":"item_add","error_code":16,"http_code":400}},"temp_id_mapping":{},"seq_no'

[2017-01-29 01:27:45][utility.junction] Processing output of 'utility.filter' with arg 'Error: Invalid temporary id","command_type":"item_add","error_code":16,"http_code":400}},"temp_id_mapping":{},"seq_no'

[2017-01-29 01:27:45][utility.filter] Processing output of 'output.notification' with arg 'Error: Invalid temporary id","command_type":"item_add","error_code":16,"http_code":400}},"temp_id_mapping":{},"seq_no'

[2017-01-29 01:27:45][utility.junction] Processing output of 'utility.filter' with arg 'Error: Invalid temporary id","command_type":"item_add","error_code":16,"http_code":400}},"temp_id_mapping":{},"seq_no'

 

Could the issues I am having be somehow related to node.js? All seems to be well with it (judging from the output from node -v). Is it possible the workflow is not fully compatible with the latest update to MacOS Sierra (I am running 10.12.3)?

 

Can you please advise? I like this workflow very much, however - sadly - I cannot take advantage of the inclusion of Projects or labels.

 

Please and thanks!

 

Best,

Rique

Edited by Rique
Clean-up
Link to comment

Hi Rique,

 

Sorry for not replying. I'm not able to commit any time to this right now as I have a newborn to take care of. I hope someone else might have some free time to dive into this. From looking at your error I can however tell you that spaces in your labels (ie Single actions instead of for example single_actions) are a problem, see if things work without them.

 

Martien

Link to comment
4 minutes ago, Martien Oranje said:

Hi Rique,

 

Sorry for not replying. I'm not able to commit any time to this right now as I have a newborn to take care of. I hope someone else might have some free time to dive into this. From looking at your error I can however tell you that spaces in your labels (ie Single actions instead of for example single_actions) are a problem, see if things work without them.

 

Martien

 

Martien,

 

First of all - congratulations! I hope you are getting some sleep. Often, that's a problem. :)

 

Secondly - I will try your suggestion. I've just torn my Todoist setup down recently and am starting anew with a very different configuration than I'd used before. The timing is good to rename things. I will check back in and report my results. Thanks!

 

Rique

Link to comment

Martien, the errors seem to have been largely eliminated. I was able to get it to throw an error by mixing the order of things up (putting priority after the task, then label, then time for example) - but if I am disciplined in how I enter the order of things, I don't get errors anymore.

 

I still cannot, however, get labels or priority to work. There are no error messages, there is no indication of poor syntax or anything like that, it's just that those values are not captured by Todoist. I've even tried entering just a task name, followed by priority (or followed by a label) - still no joy.

 

Task name, time assigned and project assigned all work consistently well - so changing the names has helped a bit. But I'm not "there" yet with regards to priority or label. Priority is not that big a deal (I use it rarely), but labels are. 

 

Given Martien is otherwise occupied with the important task of parenting, is there anyone out there who can perhaps help with this? Please? Thanks!

 

Rique

Link to comment

Hello Martien, 

I've been using your workflow, love it. However, I seem to have issues adding tasks to specific projects, and I have same issue regarding labels. I've tried changing it to lower case, no spacing, and even trying same name as yours (shop and home) but without success. 

When for instance anding this string in alfred: Todo TestToDo, Today, project1 @label1 !!3

The only thing that will be added is TestToDo with a priority of !!3 today in the inbox. It is like it isn't registrating project1 and @label1
 

I am using Version 851 of Todoist and using your 3.1.4 version workflow. 

Any ideas what I am doing wrong?

P.S I've installed node.js and it didn't change anything.

/Chris

 

Link to comment
  • 2 months later...
On 2/1/2017 at 7:12 PM, Rique said:

Martien, the errors seem to have been largely eliminated. I was able to get it to throw an error by mixing the order of things up (putting priority after the task, then label, then time for example) - but if I am disciplined in how I enter the order of things, I don't get errors anymore.

 

I still cannot, however, get labels or priority to work. There are no error messages, there is no indication of poor syntax or anything like that, it's just that those values are not captured by Todoist. I've even tried entering just a task name, followed by priority (or followed by a label) - still no joy.

 

Task name, time assigned and project assigned all work consistently well - so changing the names has helped a bit. But I'm not "there" yet with regards to priority or label. Priority is not that big a deal (I use it rarely), but labels are. 

 

Given Martien is otherwise occupied with the important task of parenting, is there anyone out there who can perhaps help with this? Please? Thanks!

 

Rique

 

How did you fix the errors? I seem to be getting the same ones...I don't really use the priority/label fields so that's not a big deal to me, but I do need to be able to set the project appropriately...

Link to comment

Upon playing with the workflow & Todoist further (I'm new to Todoist), it looks like it works just fine for me except:

  1. I can't get the workflow to properly set the priority. Everything else - project, label, due date - works, but the priority setting will not go through properly. The command completes successfully, and the task is added along with the right project, label, and due date, but it will not have any priority set. 
  2. Even when it works, It spits out an error whenever I add a task, even if I add it with no special options (ie. running the command: 'todo create test task in inbox' still spits out an error). Here's what I get from the Alfred debugger:
[2017-05-12 13:01:05][ERROR: action.script] % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   516  100   239  100   277    359    417 --:--:-- --:--:-- --:--:--   417
100   516  100   239  100   277    359    417 --:--:-- --:--:-- --:--:--   416

Any ideas what this means?

Link to comment
  • 5 weeks later...

Hi Martien,

 

Apologies if I haven't read this thread closely enough but I wasn't sure if you had thought of incorporating in the todos call an option to display your todos by #project or #inbox or #today in order to selectively display certain to-do lists? This would be a great feature if it's not already part of the workflow.

 

Best,

Nate

 

 

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...