Need help with Drafts Script to save to particular document (not inbox)

Hi. I often save things directly to the Drafts app on iOS/MacOS and then move it to Dynalist later via a very useful Drafts action which can save directly to my inbox. However, I have a lot of items I would like to save to a document that isn’t my inbox and I am having difficulty editing the Drafts Action to do this. I tried reading the API documentation, but my scripting skills are too rudimentary to figure it out on my own. Maybe someone here can help?

Here is the code of the current action:

var credential = Credential.create("Secret Token of Dynalist", "Dynalist");
credential.addPasswordField("token", "Secret Token");

var http = HTTP.create();
var response = http.request({
  "url": "",
  "encoding": "json",
  "method": "POST",
  "data": {
    "token": credential.getValue("token"),
    "index": "-1",
    "content": draft.processTemplate('[[title]]'),
    "note": draft.processTemplate('[[body]]'),

var rText = JSON.parse(response.responseText);

if (response.success) {

  if (rText._code == 'Ok') {
   // app.displaySuccessMessage('Posted to Dynalist successfully.');
  } else {
    alert(rText._code + '\n' + rText._msg);

} else {

  alert(response.statusCode + '\n' + rText._Code + '\n' + rText._msg)