marginwalker
-
Posts
9 -
Joined
-
Last visited
-
Days Won
1
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by marginwalker
-
-
I used the "write text file" functionality like this - ({clipboard}, {time}, {date} and {query} all ignore the single quote rules)
(My query was copied to the clipboard in the previous step
curl "https://beta.todoist.com/API/v8/tasks" \
-X POST \
--data '{clipboard}' \
-H "Content-Type: application/json" \
-H "X-Request-Id: {time}{date}" \
-H "Authorization: Bearer {var:bearer}"The output is "task.txt"
Then I use bash task.txt
It runs
-
3 hours ago, vitor said:
Like so: --data "{\"project_id\": 2187691249, \"content\": \"{query}\", \"due_string\": \"$xyz\", \"due_lang\": \"en\", \"priority\": 4}"
Nevermind - FINALLY got this to work... Thanks for the help...
However, I am curious - I actually quite like my workaround - What would be a reason not to use it?
-
3 hours ago, deanishe said:
It doesn't need single quotes. Use double quotes and escape the other double quotes within them.
I swear - as soon as I use double quotes, even with hard-coded values, I'm getting an error. Change back to single - No error.
-
@vitor Thanks for that. I tried it your way - Unfortunately, the input needs single quotes, so escaping just isn't working. I'm getting errors every way i try.
Instead what I did was build out the query with the variables using "write text file", and run it using bash. I'm not sure why you're upset that it works, but it does.
-
Workaround found - Exported to a text file, and then ran bash file.txt - Thanks for the help
-
Thank you @deanishe - Unfortunately it needs single quotes, are there any known workarounds to this?
-
Hi @vitor - It's not really the workflow I need help with - I just don't know how to call variables into a bash script.
If I have variable 'xyz' how would I call that into a bash script?
-
Hi there, I have the following workflow, and I can get the global variable "bearer" (in green) to work, but using a variable defined in args and vars (in red), I can't seem to pass it through - Any ideas?
curl "https://beta.todoist.com/API/v8/tasks" \
-X POST \
--data '{"project_id": 2187691249, "content": "{query}", "due_string": "$xyz", "due_lang": "en", "priority": 4}' \
-H "Content-Type: application/json" \
-H "X-Request-Id: $(uuidgen)" \
-H "Authorization: Bearer $bearer"Would be keen to find out what I'm doing wrong here, as I can't seem to get it to work
Add tasks in Tick Tick
in Share your Workflows
Posted
This is great! Saved me a bunch of work and time. Thank you @jacoblo