Triggers: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 354: Line 354:
var commands='[{"uuid":"' + guid() + '","temp_id":"' + guid() +
var commands='[{"uuid":"' + guid() + '","temp_id":"' + guid() +
     '","type":"item_add","args":{"content":"' + entry().field("Task") + '"}}]'
     '","type":"item_add","args":{"content":"' + entry().field("Task") + '"}}]'
// Execute the HTTP request. An attribute called '''token''' is used for authorization in Todoist. It is available in the Todoist Account setting.
// Execute the HTTP request. An attribute called '''token''' is used for authorization in Todoist.
// Since the text of the task can include symbols not allowed in a URL request, use the standard function encodeURIComponent() to filter them out.
// It is available in the Todoist Account setting. Since the text of the task can include symbols not allowed in a URL request,
//    use the standard function encodeURIComponent() to filter them out.
result = http().get("https://todoist.com/API/v7/sync?token=15281e8e4d499dаff817af0b14112eac3176f9dc&commands=" +
result = http().get("https://todoist.com/API/v7/sync?token=15281e8e4d499dаff817af0b14112eac3176f9dc&commands=" +
     encodeURIComponent(commands))
     encodeURIComponent(commands))