Action Help for Prepend to a Specified Draft via a Menu

Help please, I’m looking for an Action that prepends the text entered into a new draft to another draft that can be selected from a list. I would also like to date stamp that entry.

What I am trying to achieve is a system where I can type a note regarding a client into a new draft and then send it to either a new draft or prepend to an existing draft if it exists for that particular client. I would like the date next to each entry. I would like the most recent entries to be at the top of the draft.

It’s basically a mini client information log/journal where I can send notes for each client (I have about 15) so that you end up with one long note for each client that has dated entries.

I was trying to adapt the prepend to draft action with the add to list action but failed miserably to get it working the way I wanted it to.

Please help!

This is totally achievable. I do this almost exactly. Originally I kept the longer notes in Ulysses, and have since moved them to simple text files in the file system. But you could just as easily keep them in Drafts. (I call these longer notes “comlogs”—short for “communications log”.)

Broadly speaking, I’d use tagging to designate all the comlogs in Drafts. Then you’d create an action that:

  1. Queries Drafts to get a list of all the comlogs (i.e. all Drafts tagged with comlog)

https://scripting.getdrafts.com/classes/draft#query

  1. Presents the list of comlogs in a menu

https://scripting.getdrafts.com/classes/prompt

  1. Prepends the draft, with a timeslip, to the selected comlog.

https://scripting.getdrafts.com/classes/draft#content

It’s worth diving in and trying a few things to make each piece of this work. Let us know if you have issues.

2 Likes