Jump to content

marginwalker

Member
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by marginwalker

  1. @deanishe 

     

    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

     

     

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

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

     

×
×
  • Create New...