Create a Shortcut Using a Drafts Template

I have been trying to figure out how to develop an IOS shortcut that could use a Drafts template. For example, I go to many meetings a day and have created a Drafts meeting notes template that I use to track information with clients and then send out after each meeting. I have tried several things but can’t make it work, and my searches for information on this topic here and elsewhere, and I can’t seem to find a definitive answer to this question. Any help would be appreciated. Thanks

What do you want to do exactly?

For example:

  1. You could use a shortcut to populate a meeting template in Drafts based on information in your calendar and questions that you are prompted to answer.
  2. You could pull content from a draft into Shortcuts to use as a template to create your meeting notes.

There are lots of variations around this and I’m sure more besides. Can you provide some more detail of how you want it to work and maybe what sorts of things you tried. You may find you were closer than you think and just need help solving an error message.

1 Like

Are you just wanting to create new drafts based on a template? If yes, this post would likely be helpful.

If not, some more detail on the goals would help for sure.

1 Like

Thank you for your help. I have set up several templates following the instructions from the post that @agiletortoise pointed out. That specific post was the tutorial that got me started. I am a real novice when it comes to adding more features and complexity. However, I would like to get better at using Drafts and automating as much as possible this year. I had used TextExpander for years but decided to use a Drafts template over the last couple of years. It has been great for productivity and professional enhancement of my work.

My main goal at this point is to pull a blank template quickly using IOS shortcuts. If I had access to this template on the fly, I would be able to do a better job of paying attention to my client in those moments where I am facilitating a meeting, trying to be engaged, and also find myself the only one taking notes. It happens a lot, and fumbling around and trying to multi-task is not ideal.

My template is rather simple, as you can see at this point.

I want to add more features and refine further and learn how to populate with calendar information and answer questions but to start with quickly pull up the template.

To summarize my goals (the main goal is number 1)

  1. Set up an IOS shortcut for the meeting notes template only.
  2. Create an IOS shortcut that would let me choose all of my templates.
  3. Add more features such as pulling calendar information, start time, and end time.
  4. Perhaps add questions in terms of attendees or other items. I am open to ideas, best practices, and any creativity.
  5. Mail out in markdown with proper subject heading and information
  6. Automate notes to be filed or associated with a specific client or other activities in Drafts with a workspace.

Thanks in advance for your help.

I think I answered your questions and could use some help. Thanks.

maybe look at this post her,
I set up templates just in drafts (without using the Shortcuts integration) - you can define custom fields and type the information while running the replaceShortcuts action.
The link is to my reply in a longer post where I combined the actions mentioned there. I hope it still works :slight_smile:

1 Like

Thanks for your help @FlohGro . I think I might need a bit more instruction and a step by step basis to make this work.

did you read the first post there? Simple shortcut replacement

you can setup “shortcuts” like described there.
What I did then is to combine theses shortcuts with the possibility to add custom “fields” in a template.
An example draft template to communictate my address to somebody could look like this (the title line will not be included in the result after running the replace shortcuts action).

# Address to somebody
Hi [[name]],
my address is:
.address
you can park directly in front of the house.

when I run the replace shortcuts action on this template draft it will search my defined shortcuts and will replace “.address” with my real address. The action will then create a prompt where it asks for the user defined fields for a text input (name).
you can still use the standard templates from drafts like “[[date]]” and so on.

1 Like

@FlohGro thanks for your help on this but I think I am still a bit confused. I was looking for help in developing an IOS Shortcut (Workflows) automation to quickly select between templates. I typically use Textexpander snippets for Drafts to quickly type regular text or the actual template to make it happen.

i know - i just pointed to this post because maybe you won’t need a shortcut at all.
but if you want to do this with shortcuts, I’d add a tag to your template drafts and then do the following actions in shortcuts to retrieve your template:

  1. search drafts (insert your tag in the parameters)
  2. select from list

the “chosen item” will contain the information you need to either just open the template in drafts or retrieve the content and do further operations in shortcuts.

I personally use the mentioned action and can share the template right out of drafts - therefore I dont have a shortcut for that…

@sylumer I was hoping to hear back from you once I answered your questions. I still don’t have a clear idea of how to do this. Thanks in advance.

Sorry, I thought that from the rest of the thread you had an approach you were taking.

If you want to manage the templates from and within Shortcuts rather than using the actions and templating options built into Drafts, a basic shortcut like this should give you the basis for covering points 1 through 4 from your list.

  • Download: Templates for Drafts example.
    • Template 1 is static.
    • Template 2 prompts you for a title.
    • Template 3 includes an example that incorporates some upcoming event information.

Point 5, I would imagine you would want to do after completing the details in Drafts and so would either be a separate shortcut, or you could use one of the Markdown mail actions in the Drafts directory. I’d consider using the latter as that’s already prebuilt and you can simply tweak it to meet any supplementary needs you might have.

I set my workspaces up using tags and maybe you have yours set up with client tags? For point 6, if you modify your creation shortcut to specify the tags in the Drafts creation action, that would meet this requirement presumably. I would suggest using a choose from list or menu in your shortcut that is then used to set one or more tags for the template being created.

I hope that helps and covers all of your points in enough depth for you to make a start on setting this up.

@sylumer Thank you so much for taking the time to get back to me and put together a shortcut for me. So there is no command using shortcuts to select an existing Drafts template? I thought there might be a way to do so. I really appreciate your help.

Well, take note I started with an “if”.

So clarity of your template solution/preference is key. Are you talking about Drafts templates in iCloud Drive/Drafts/Library/Templates, several independent drafts you reuse, a set of drafts you reuse that you have tagged or spec’d in some way, a set of actions that insert or create boilerplate text drafts, or something else?

There are ways to interact from Shortcuts via shortcut actions, URL schemes and even via a call of Drafts actions. What you really want is almost certainly possible, but to explain a way to do what’s necessary we first need to understand exactly what you have to work with in regards to templates.

Mark, I think I was looking for the same task.
Here’s my approach:

  • Create your template(s) as described by Greg
  • Install the „New Draft with Template“ action
  • In the shortcuts app, create a shortcut with two steps:
  1. Open App
    Choose „Drafts“

  2. Run Action on Text
    Here enter „New Draft with Template“ and set „with <text>“ to an empty string („“)

Now, when you run the Siri shortcut and you have several templates defined in Drafts, the „New Draft with Template“ action asks you to choose which template to use.

Choose the one you want and you get a new draft based on that template.