Add to calendar on Mac

Can anyone share a script for adding the current draft to calendar on Mac? The action should ask me to choose the start dateAndTime and end dateAndTime. I know that there is a calendar page but since I have no experience on coding, its a bit different to correct the script in the way I want. Cheers!!

If you just use the Event action step, that requires no coding. When it runs with the default setting it should pop up the calendar even pre-populated with your draft content, and with the option to fill in additional details such as times. I think that on its own provides everything you are looking for.

Hi Sylumer,

It seems the Event action step is unavailable for Mac.

You might want to look at something like the Fantastically Good Event Parser action for both platforms. Lets you just type the event details in natural language and it converts it to the appropriate event fields.

The Event step does not work on Mac, that is true. Apple does not provide a similar API on Mac at this time.

It is possible to create a similar (though more limited) thing with prompts and scripting in Drafts, but I haven’t seen any examples…and the natural language approach tends to be a lot less clunky in practice once you get accustomed to it.

Hi agiletortoise,

I figure out the coding and the action I built works fine. Thanks for the reply!

1 Like

You’re absolutely right. I’d quickly tried it on my phone and not looked at the availability tag for it in the docs :confounded:

image

1 Like

Cool! Would you share your script?

Sure, here it is!

1 Like