Jump to content

Todoist Workflow


Recommended Posts

Hi Martien,

 

I faced with issue with project name in Cyrillic. Project fetching works as expected, however when I press Return it fails. Just in case, there is no such issue with project name with Latin symbols only.

 

Here is output from debugger:

[2019-03-14 00:55:50][ERROR: input.scriptfilter] Code 1: /Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:24645
            throw new Error(this.formatError(fallbackToken, "invalid syntax"))
            ^
Error: invalid syntax at line 1 col 7:
  Test #Проект
        ^
    at Lexer.next (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:24645:19)
    at Parser.feed (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:25344:30)
    at parser (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:25469:12)
    at init$1 (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46714:18)
    at Object.create (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46852:20)
    at Object.<anonymous> (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46928:10)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)

How could I fix it?

Link to comment
22 hours ago, Pavel A said:

Hi Martien,

 

I faced with issue with project name in Cyrillic. Project fetching works as expected, however when I press Return it fails. Just in case, there is no such issue with project name with Latin symbols only.

 

Here is output from debugger:


[2019-03-14 00:55:50][ERROR: input.scriptfilter] Code 1: /Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:24645
            throw new Error(this.formatError(fallbackToken, "invalid syntax"))
            ^
Error: invalid syntax at line 1 col 7:
  Test #Проект
        ^
    at Lexer.next (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:24645:19)
    at Parser.feed (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:25344:30)
    at parser (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:25469:12)
    at init$1 (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46714:18)
    at Object.create (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46852:20)
    at Object.<anonymous> (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.6B267314-FEF6-41BC-A780-F5C65CBB31AB/alfred-workflow-todoist.js:46928:10)
    at Module._compile (internal/modules/cjs/loader.js:799:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:810:10)
    at Module.load (internal/modules/cjs/loader.js:666:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:606:12)

How could I fix it?

 

Right now the parser only supports latin characters. I hadn't considered other scripts. Is there a non-capital and capital range that includes all characters (like `a-z` and `A-Z`)?

 

Edit: that would seem to be `а-я` and `А-Я` am I right?

Edit 2: or perhaps [Ѐ-Ӿ] (as recommended here)

Edited by Martien Oranje
Link to comment
1 hour ago, Martien Oranje said:

Edit: that would seem to be `а-я` and `А-Я` am I right?

 

If I've understood the problem, it's the project parser. Can you not extract projects and labels with, say, #(\S+) (i.e. every non-space character) or #\[[^\]]+\] (i.e. every character that isn't ])? Then you don't need to worry about alphabets.

 

FWIW, if you did want to use a regex to explicitly match the characters in the project, I think the "Letters" classes on the page you linked to are what you would want.

Edited by deanishe
Link to comment
21 hours ago, deanishe said:

 

If I've understood the problem, it's the project parser. Can you not extract projects and labels with, say, #(\S+) (i.e. every non-space character) or #\[[^\]]+\] (i.e. every character that isn't ])? Then you don't need to worry about alphabets.

 

FWIW, if you did want to use a regex to explicitly match the characters in the project, I think the "Letters" classes on the page you linked to are what you would want.

 

Yes I could do that, but I fear that some control characters like `,` and `:` and `;` might be problematic. I've opted for the long way. I've spun up a beta version  for @Pavel A to test. My Cyrillic literacy is not very good but seems to work. If you can confirm it works I'll merge the changes to master.

 

https://drive.google.com/file/d/1nmdTrYqpt7Ef1Dzt1k9PAA1oVPSMiwAh/view?usp=sharing

Link to comment
  • 2 weeks later...
On 3/9/2019 at 11:11 AM, ystian said:

it seems not working ... :(

 

did i miss any setup?

297761385_CleanShot2019-03-09at11_08.45@2x.thumb.png.5dbc69e10de9f7fcc617e29cea868774.png

 

I have the same problem. When I open Alfred and type "todo", it offers 4 options, including "Create a task". But as soon as type another character, say "123", it switches to Search Google for 'todo 123'.

Link to comment

Ah, debugger revealed that I had not installed node.js. I installed it, and now I get a different error:

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS 10.14.3
query: {"content":"Test due today","priority":1}
node.js: v10.15.3
alfred: 3.8.1
workflow: 5.7.0
Stack: HTTPError: Response code 400 (Bad Request)
    at EventEmitter.emitter.on (/Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.5BC07328-B48C-43CD-AD42-CA3A1224A3A2/alfred-workflow-todoist.js:35720:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
', {}

 

Link to comment

Thanks for the help (and for the error message update).

 

It seems like tasks are not added to projects correctly. When I type "todo Test #collateral, thursday" Alfred appears to register "Collateral" as a project (see attached screenshot), but the task is still added to Inbox.

 

If I type same thing within Todoist, it correctly adds to the project.

Screen Shot 2019-03-26 at 5.55.09 PM.png

Link to comment

Yes, I did have the project already.

 

I think there's an issue with projects and case sensitivity. If I type "todo Test #collateral" and hit enter, Alfred corrects "#collateral" to "#Collateral " which is not behavior I'd expect because the documentation says that the project can be case-insensitive. If I then hit enter a second time, the task is correctly sent to Collateral.

 

So basically I have to hit enter twice in order to add to projects correctly.

 

If I want to add a due date, I must enter the project with correct case, which is not what the documentation implies. Nothing else I've tried works, not even the following:

 

"todo Test #collateral"

Hit enter, which then corrects to "todo Test #Collateral "

", today"

 

I get an HTTP Bad Gateway request when trying to do the above.

Link to comment

It seems like typing speed affects output. Since my main use for an Alfred workflow is to enter things very quickly (almost stream of consciousness) the workflow is not as useful for me if I am required to type slowly. From the debug output it looks like operations are happening after every keystroke.

 

The first time I typed quickly and got an error. Debug output below:

[2019-03-27 13:55:14][input.scriptfilter] Queuing argument 'T'
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Te'
[2019-03-27 13:55:15][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:15][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: T","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"T\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Tes'
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Test'
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Test '
[2019-03-27 13:55:15][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:15][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Te","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"Te\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Test #'
[2019-03-27 13:55:15][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:15][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Test #c'
[2019-03-27 13:55:15][input.scriptfilter] Queuing argument 'Test #co'
[2019-03-27 13:55:16][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:16][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Inbox","subtitle":"Move task to Inbox","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Inbox "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:55:16][input.scriptfilter] Queuing argument 'Test #col'
[2019-03-27 13:55:16][input.scriptfilter] Queuing argument 'Test #coll'
[2019-03-27 13:55:16][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:16][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:55:16][input.scriptfilter] Queuing argument 'Test #colla'
[2019-03-27 13:55:16][input.scriptfilter] Queuing argument 'Test #collat'
[2019-03-27 13:55:16][input.scriptfilter] Queuing argument 'Test #collate'
[2019-03-27 13:55:16][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:16][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:55:16][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:16][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:55:17][input.scriptfilter] Queuing argument 'Test #collater'
[2019-03-27 13:55:17][input.scriptfilter] Queuing argument 'Test #collatera'
[2019-03-27 13:55:17][input.scriptfilter] Queuing argument 'Test #collateral'
[2019-03-27 13:55:17][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:17][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:55:17][input.scriptfilter] Queuing argument 'Test #Collateral '
[2019-03-27 13:55:17][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:17][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:55:17][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:17][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:55:18][input.scriptfilter] Queuing argument 'Test #Collateral ,'
[2019-03-27 13:55:18][input.scriptfilter] Queuing argument 'Test #Collateral , '
[2019-03-27 13:55:18][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:18][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:55:18][input.scriptfilter] Queuing argument 'Test #Collateral , t'
[2019-03-27 13:55:18][input.scriptfilter] Queuing argument 'Test #Collateral , to'
[2019-03-27 13:55:18][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:18][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:55:18][input.scriptfilter] Queuing argument 'Test #Collateral , tod'
[2019-03-27 13:55:18][input.scriptfilter] Queuing argument 'Test #Collateral , toda'
[2019-03-27 13:55:19][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:55:19][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL          ⧖ to","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"due_string\":\"to\",\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:55:19][input.scriptfilter] Queuing argument 'Test #Collateral , today'
[2019-03-27 13:55:19][input.scriptfilter] Processing output of 'action.script' with arg '{"content":"Test","priority":1,"due_string":"to","project":"Collateral"}'
[2019-03-27 13:55:25][action.script] Processing output of 'utility.debug' with arg 'HTTPError: Response code 400 (Bad Request)

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS 10.14.3
query: {"content":"Test","priority":1,"due_string":"to","project":"Collateral"}
node.js: v10.15.3
alfred: 3.8.1
workflow: 5.7.1
Stack: HTTPError: Response code 400 (Bad Request)
    at EventEmitter.emitter.on (/Users/androhsu/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.5BC07328-B48C-43CD-AD42-CA3A1224A3A2/alfred-workflow-todoist.js:35720:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
'
[2019-03-27 13:55:25][utility.debug] 'HTTPError: Response code 400 (Bad Request)

ALFRED WORKFLOW TODOIST
----------------------------------------
os: macOS 10.14.3
query: {"content":"Test","priority":1,"due_string":"to","project":"Collateral"}
node.js: v10.15.3
alfred: 3.8.1
workflow: 5.7.1
Stack: HTTPError: Response code 400 (Bad Request)
    at EventEmitter.emitter.on (/Users/androhsu/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.5BC07328-B48C-43CD-AD42-CA3A1224A3A2/alfred-workflow-todoist.js:35720:19)
    at process._tickCallback (internal/process/next_tick.js:68:7)
', {}

The second time I typed exactly the same thing but slowly, and the task successfully added to the project with the due date. Debug output below:

 

[2019-03-27 13:56:45][input.scriptfilter] Queuing argument 'T'
[2019-03-27 13:56:45][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:45][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: T","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"T\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:56:45][input.scriptfilter] Queuing argument 'Te'
[2019-03-27 13:56:45][input.scriptfilter] Queuing argument 'Tes'
[2019-03-27 13:56:45][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:45][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Te","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"Te\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:56:45][input.scriptfilter] Queuing argument 'Test'
[2019-03-27 13:56:46][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:46][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Tes","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"Tes\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:56:46][input.scriptfilter] Queuing argument 'Test '
[2019-03-27 13:56:46][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:46][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:56:46][input.scriptfilter] Queuing argument 'Test #'
[2019-03-27 13:56:46][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:46][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"INBOX","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1}","type":"default","valid":true}]}
[2019-03-27 13:56:47][input.scriptfilter] Queuing argument 'Test #c'
[2019-03-27 13:56:47][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:47][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Inbox","subtitle":"Move task to Inbox","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Inbox "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Website","subtitle":"Move task to Website","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Website "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Research","subtitle":"Move task to Research","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Research "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"General","subtitle":"Move task to General","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #General "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"60-Day Goals","subtitle":"Move task to 60-Day Goals","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #[60-Day Goals] "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"90-Day Goals","subtitle":"Move task to 90-Day Goals","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #[90-Day Goals] "}]}
[2019-03-27 13:56:47][input.scriptfilter] Queuing argument 'Test #co'
[2019-03-27 13:56:47][input.scriptfilter] Queuing argument 'Test #col'
[2019-03-27 13:56:47][input.scriptfilter] Queuing argument 'Test #coll'
[2019-03-27 13:56:47][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:47][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "},{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Research","subtitle":"Move task to Research","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Research "}]}
[2019-03-27 13:56:48][input.scriptfilter] Queuing argument 'Test #colla'
[2019-03-27 13:56:48][input.scriptfilter] Queuing argument 'Test #collat'
[2019-03-27 13:56:48][input.scriptfilter] Queuing argument 'Test #collate'
[2019-03-27 13:56:48][input.scriptfilter] Queuing argument 'Test #collater'
[2019-03-27 13:56:48][input.scriptfilter] Queuing argument 'Test #collatera'
[2019-03-27 13:56:48][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:48][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:56:48][input.scriptfilter] Queuing argument 'Test #collateral'
[2019-03-27 13:56:49][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:49][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:56:49][input.scriptfilter] Queuing argument 'Test #Collateral '
[2019-03-27 13:56:49][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:49][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"Collateral","subtitle":"Move task to Collateral","icon":{"path":"icon.png"},"type":"default","valid":false,"autocomplete":"Test #Collateral "}]}
[2019-03-27 13:56:50][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:50][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:50][input.scriptfilter] Queuing argument 'Test #Collateral ,'
[2019-03-27 13:56:50][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:50][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:50][input.scriptfilter] Queuing argument 'Test #Collateral , '
[2019-03-27 13:56:51][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:51][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:51][input.scriptfilter] Queuing argument 'Test #Collateral , t'
[2019-03-27 13:56:51][input.scriptfilter] Queuing argument 'Test #Collateral , to'
[2019-03-27 13:56:52][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:52][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL          ⧖ t","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"due_string\":\"t\",\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:52][input.scriptfilter] Queuing argument 'Test #Collateral , tod'
[2019-03-27 13:56:52][input.scriptfilter] Queuing argument 'Test #Collateral , toda'
[2019-03-27 13:56:52][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:52][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL          ⧖ to","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"due_string\":\"to\",\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:52][input.scriptfilter] Queuing argument 'Test #Collateral , today'
[2019-03-27 13:56:52][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:52][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL          ⧖ toda","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"due_string\":\"toda\",\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:52][input.scriptfilter] Script with argument '(null)' finished
[2019-03-27 13:56:52][input.scriptfilter] {"items":[{"uid":"693e9af84d3dfcc71e640e005bdc5e2e","title":"CREATE: Test","subtitle":"COLLATERAL          ⧖ today","icon":{"path":"icon.png"},"arg":"{\"content\":\"Test\",\"priority\":1,\"due_string\":\"today\",\"project\":\"Collateral\"}","type":"default","valid":true}]}
[2019-03-27 13:56:54][input.scriptfilter] Processing output of 'action.script' with arg '{"content":"Test","priority":1,"due_string":"today","project":"Collateral"}'
[2019-03-27 13:57:01][action.script] Processing output of 'utility.debug' with arg 'ALFRED WORKFLOW TODOIST: ✓ Happy days!

Task added

'
[2019-03-27 13:57:01][utility.debug] 'ALFRED WORKFLOW TODOIST: ✓ Happy days!

Task added

', {}

 

Link to comment
  • 4 months later...
33 minutes ago, beetlefrosch said:

The Workflow works for me only without a date!

 

The  problem is the comma. Anything after the comma is expected to be the date so it needs to be the last thing you specify.

 

The reason for this is that multilanguage date string  parsing is hard, and Todoist has already solved this problem. But in order to have Todoist read  the date I need to to send it a string that holds just the date (string). I do this by having the date string between a comma and the end of the string.

 

This used to be better documented but I guess I took that out with the last rewrite.

 

Hope that helps,

 

Martien 

Link to comment
1 minute ago, beetlefrosch said:

Mh, also "todo test #Arbeit p1 @test, today", "todo test #Arbeit p1 @test, heute", "todo test #Arbeit p1 @test, 2019/07/28" does not works for me … 😞

 

Do you have the language set to German? Check out the docs to see how that would work.

 

If that doesn't  work see if you can find an error log for me.

Edited by Martien Oranje
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...