I like this action for sending a task to Things 3 - https://actions.getdrafts.com/a/1HS. What I am missing is adding a link back to the draft. I couldnt figure a way how to amend the script to automatically add the link into the note section of the task. Could somebody please help me with that (I am completely new to Drafts β¦)?
This is the line in the script which creates the βnoteβ value which is sent to Things:
const notes = (prompt.fieldValues.notes || '').trim();
That could be altered to the following to append the link to the current draft at the end of the notes:
let notes = (prompt.fieldValues.notes || '').trim();
notes = notes + "\n" + draft.permalink;
A couple of minor notes:
- Be sure to change the
const
tolet
so that the value can be changed. - More properties of the draft as documented on the reference site
2 Likes
Thanks Had to add the βsβ to notes = notes + β\nβ + draft.permalink; and it works
Oops. Coding without a net. Fixed.
1 Like