What This Workflow Does
It syncs contacts from a Apple Contacts group named “Shortcuts demo” with Obsidian.
The end result will be a single note for each contact, with up-to-date contact details in the frontmatter. When the workflow is run again, it’ll find existing notes and update them. If it finds contacts without a note, it’ll create a new one.
The entries in Contacts will gain a clickable link to the Obsidian note.
Please note: The workflow assumes there’s a current daily note.
Download
Download the Sync Contacts with Notes.shortcut
workflow. Double-click the downloaded file to install the workflow in Shortcuts.
Requirements
- Actions for Obsidian
- Apple Contacts (Address Book)
- Obsidian
Workflow Screenshot
Workflow history / Change log
2023-03-17
Adds support for contacts that have more than one phone number or mail address. Numbers and addresses are added to the front matter as YAML lists ([1, 2, 3]
) now.
2023-02-09
Updated the downloadable workflow with a correctly Apple-signed version. Same workflow, just installable now. Sorry for the hiccup!
2023-02-03
Hey Carlo, super Sache!!! Genau was ich gesucht habe!
Wie kann ich den Workflow erweitern, damit auch Geburtstag, Adresse etc. mit übertragen werden?
Hey Carlo, great stuff!!! Exactly what I was looking for! How can I extend the workflow so that birthday, address, etc. are also transferred?
Welcome to the forum! I’ll answer in English, okay?
First, in the part that creates the body of the new note, add your new properties:
It’ll look like this:
---
contact_id: Contact ID
phone: [Combined Text]
email: [Combined Text]
birthday: [Birthday]
---
The [Birthday]
part is a property of the contact, so start with inserting the contact variable there, then tapping the contact variable, which will give you the list of all its properties, where you can pick the birthday.
In the part which updates the note, duplicate the “Search and replace” actions and update the properties as needed. The search term in the screenshot means “find the bit that says phone:
and the rest of its line”, so sticking to the birthday example, you’d use /birthday: .*/
here.
Hope that helps!
Thank you!!! That helps a lot!!!
1 Like
It throws an error of the type: "Contacts got an error: Can’t get person {“Name”} of group “Contacts”. Does that mean this person is not in the group? It got a first person just fine but then stopped.
Which of the Applescripts is raising that error, i.e. which block?