Jump to content

Add calendar events with (mostly) natural language


Recommended Posts

Posted

Hey there! 👋

 

I made a small workflow to add events to the calendar (stock Calendar app) with "natural language" (well... not really super sophisticated, but it feels "natural" to me in the sense that it's similar to how I create calendar events), similar to what Fantastical does. It works pretty good for me, and I thought to share it in case it can be useful for someone else as well :)

 

It's nothing fancy obviously, at the moment it can do some simple things like this:

 

  • "cal buy groceries tomorrow at 5pm"
  • "cal meeting next wednesday for 3 hours at 3pm PDT"
  • "cal in 2 hours get a break for 10 minutes"

 

calfred.gif

 

A couple notes:

  • it supports only 1 target calendar at the moment, with the name specified in the `calendar` workflow variable
  • it's written in Go (with `awgo`, thanks @deanishe!), for no particular reason rather that it's what I usually use for my projects, which means that it's compiled and it will bring up the annoying "verified developer" popup on macOS 10.15+
  • it should work on M1 via Rosetta, but I don't have a M1 Mac to make sure myself. I also thought about bundling the arm version with the workflow and/or creating separate downloadable workflows, if somebody is interested I can do something for that :)

 

Here's the link -> https://github.com/ruggi/calfred/releases/latest

 

Stay safe!

  • 1 month later...
Posted

This is working great for me on an M1. The only issue is that the time does not appear to be writing correctly to the calendar, but the day does. There is nothing in the time field when written to Calendar. I am using an M1 MBA if that helps. Thanks for contributing this!

Posted

Hi there, many thanks for this. I have only just installed Alfred for the first time, so I'm pretty sure I'm doing something wrong. 

 

I installed your workflow, changed the calendar name to my own calendar name. Then when I create an event, it shows fine in Alfred, but nothing appears in my calendar. 

 

Could you point me in the right direction? I'm running macOS 11.4 (intel). 

 

Many thanks. 

Posted (edited)

@federico thanks for making this but it doesn't seem to work with me - I get the error below.

 

Could this be something to do with the region? I'm in the UK - BST.

 

453492674_Screenshot2021-07-16at08_56.44@2x.thumb.jpg.fd207263fca268ccf967399a4621f064.jpg

 

image.thumb.png.3f60eae6a54d066cdc807e1fd3d4cbc9.png 

Edited by alfredpanda
Posted

Can't seem to get it to link to a calendar. I've tried changing the calendar variable (like in the example on the GitHub page). Any ideas? 

Posted
On 7/23/2021 at 11:23 PM, Slatts said:

Can't seem to get it to link to a calendar. I've tried changing the calendar variable (like in the example on the GitHub page). Any ideas? 

 

31 minutes ago, stachmou said:

I can't get it to work ! Query is launching fine but nothing appears in the calendar app... any help is appreciated

 

 

It would be helpful if you both attached a screenshot of the debug log to see if it shows an error?

 

Open the workflow, click the debug button, test the command in Alfred as you would and then see if there are any red errors in the log.

Post them so the OP can help out.

 

2006804442_Screenshot2021-07-26at12_26.24@2x.thumb.jpg.e09ff9c976a9c0adfea687a80dac6e66.jpgdebu

Posted
32 minutes ago, alfredpanda said:

 

 

It would be helpful if you both attached a screenshot of the debug log to see if it shows an error?

 

Open the workflow, click the debug button, test the command in Alfred as you would and then see if there are any red errors in the log.

Post them so the OP can help out.

 

2006804442_Screenshot2021-07-26at12_26.24@2x.thumb.jpg.e09ff9c976a9c0adfea687a80dac6e66.jpgdebu

there it is

Screenshot 2021-07-26 at 14.00.28.png

Posted
1 hour ago, stachmou said:

there it is

Screenshot 2021-07-26 at 14.00.28.png

 

Have you correctly set your Calendar name?

 

Go here:

 

1765616790_Screenshot2021-07-26at14_24.38@2x.thumb.jpg.f401b9f5b0a899cbd83b8c2541d50104.jpg

 

1810336821_Screenshot2021-07-26at14_25.10@2x.thumb.jpg.420163431272a4ff96a0d3996b0f0227.jpg

 

Make sure this exactly matches the name of your calendar in Mac's Calendar app:

 

1093147076_Screenshot2021-07-26at14_26.09@2x.jpg.723271e1eb49729504c33ef13c19305e.jpg

  • 2 weeks later...
Posted

My Mac (M1 MBA) won't let me run the workflow. Never had this before with an Alfred workflow downloaded from GitHub. Any suggestions?

 

 

Screen Shot 2021-08-06 at 7.41.30 AM.jpg

  • 2 months later...
Posted

I installed the Workflow and it works beautifully in most cases.

 

However, if today is a Monday, when I type "next Thursday" it gives me tomorrow's date instead of next Thursday's date. Next seems to trigger the day that is coming up. 

In fact, if today is a Monday, when I type "next Monday", the helper does not change the date to next Monday's date and I am thus unable to enter a date.

Is it todo with my timezone? I am in GMT +8.

Thanks in advance!

  • 3 months later...
Posted

Hey there,

 

could someone please help me to fix the character encoding? Using some of the Czech characters like: ěščřžýáíé results in weird behavior.

image.png.3e970a1bed1131e7891c7610297e4b13.png

 

Many thanks in advance!

  • 11 months later...
  • 3 weeks later...
  • 2 months later...
  • 2 weeks later...
Posted

Hi @federico -

This is such a cool workflow but .... nothing gets added to my calendar.

  • I see no (red) errors in the debug mode when using cal workflow.
  • I've also set my destination calendar name exactly as it appears in the calendar ("Homer") in the workflow variables panel.
  • I restarted both calendar and Alfred.
  • When I type in your example: buy flowers next wednesday at 3pm - it appears to take but nothing actually shows up on the calendar.

 

Running OS Catalina. Is the OS too old? Or is it just dumb user error? 

 

Thanks in advance for any tips.

Aster

 

 

alfred-debug.png

  • 1 month later...
  • 1 month later...
  • 5 months later...
Posted

Yeah, I got the very same error. Any luck on resolving this?

 

On 6/19/2023 at 2:13 PM, madhurcchauhan said:

I am seeing this error after setting up the variables as described above. 

 

CleanShot2023-06-19at12_42.46@2x.thumb.png.daaeac03420f05ebb47e98b015083a97.png

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...