Action

创建任务 Todoist

Last update about 6 years ago - Unlisted

Steps

  • script

    // See online documentation for examples
    // http://getdrafts.com/scripting
    
    var http = HTTP.create(); // create HTTP object
    var text = draft.content; //获取当前文本
    var response = http.request({
      "url": "https://todoist.com/api/v7/quick/add",
      "method": "POST",
      "data": {
        "token":"2566844be55805a383638c07efdccd3b9d766abe",
        "text":text
      },
      "headers": {
        "HeaderName": "HeaderValue"
      }
    });
    
    if (response.success) {
      var text = response.responseText;
      var data = response.responseData;
    }
    else {
      console.log(response.statusCode);
      console.log(response.error);
    }

Options

  • After Success Trash
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.