Fantastical and it's inability to stop duplicating entries

So close to deleting Fantastical from my life. I sync it with my macOS calendar, which reads event tasks from omnifocus using the script @RosemaryOrchard shared. the Calendar has no problem, but fantastical is constantly choking up duplicate entries. does Fantastical not have the ability to see that there are two events with the same name at the same time and remove one?

What is the script? Happy to test it on mine.

The script is not the problem. It works as expected between Omnifocus and Calendar. Fantastical syncing with the macOS Calendar seems to be the issue. Here is the script.

https://rosemaryorchard.com/blog/using-keyboard-maestro-to-create-an-always-up-to-date-task-calendar-from-my-omnifocus/

Nothing wrong with Fantastical in this regard. However, your calendar event would benefit from having a UID. Matching is done on UID, not on title.

Have a look at the CalDAV specification for more details.

thanks for the response. where would the UID be assigned? in the creation of events in macOS Calendar?

In the script. I’m not familiar with OF, but I assume each task has some unique identifier too. So in the part where it gets all the task details, it also needs to get that unique ID.
Something along the lines of

set task_id to id of the_task

Please note: the above code snippet is an example! I do not own nor use Omnifocus.

And when the calendar event is created, that ID should be set. It’s in the event class of Calendar:

uid (text, r/o) : An unique event key.

So that should be added to the make new event with properties part.

So contrary to what you mentioned, the script is the problem. :wink:

1 Like