for taking minute notes I use th Action: meeting template. It works great, but there is one issue: I wont make it to add sutomatic tags. When i start this action it would be great to have already a specific tag
Thanks a lot
Can you please post a link to the action you are using?
There are several ways templating drafts can be achieved, the ones I’d typically expect to see are based around the following.
If the template is duplicating an existing draft, then you would add the tags to that draft.
If the template is based on the fle template option (see Templates and Tags - Utility Tags, then I think you would need to programmatically add the tags.
If the template is generated programmatically through some scripting (eg. based on your current calendar event), then again I think you would need to programmatically add the tags.
Other ways to do this could involve URL schemes and external apps (e.g. Shortcuts), but these are less likely to be triggered by a Drafts action).
Adding new tags programmatically is quite straight forward. Here’s a bit of script that can be added to a script step that adds a tag ‘meeting’ to the current draft and updates the draft to in effect apply the tag:
Hope that helps, but seeing the action means people may be able to advise further.
I use this action: Meeting template
I tried to edit with a step scripting, but I dont get it …
Ah okay, it looks like Tim used the clipboard and a URL call on that one for some reason.
I’ve built a new action for you that builds on and hopefully improves that previous one a little bit. There are other ways to do it, but I think this one will probably work best for you.
- First of all I’ve done away with the URL call which overall gives a bit more scope for what can be done.
- I’ve removed the reliance on the clipboard. Building the new template will leave your clipboard intact.
- I’ve replaced the standard prompt with a script built prompt - this allows you to set the meeting name field to have the cursor in it when it appears so that you can start typing straight away without having to tap in the field.
- Finally I’ve also added in something to let you specify the tags using the script approach I referenced previously.
When you get the action, open it for editing and select the second script step, highlighted in red here.
You could just have one scrip step, but I’ve broken it into three so that you don’t get distracted by the non-tag related lines of script. The second script step containss the following:
// Edit this script area to add tags to the draft // Simply add/remove/amend tags as you like // We created the new draft as 'newDraft' so using that rather than 'draft' to ensure the new draft gets the tags newDraft.addTag("meeting"); newDraft.addTag("example tag 1"); newDraft.addTag("example tag 2");
Remove, duplicate and amend the lines tto include the tags you want. The lines above add three tags to the meeting draft - meeting, example tag 1, and example tag 2.
Here’s a link to the Drafts action.
Hopefully that should match your needs perfectly.
This is more than great!! Thank you very very much. It works perfect.
Of course there a number of ways to do this, for the record, the URL can also accept a tag parameter. Tim’s original action could be modified to include the tag in the URL as well, like:
(Where “meeting” is the tag name)
See URL scheme docs for details.