Automating contact information updating

I’d like to do more scripting and automating with contacts.

But at the moment, only Pythonista seems to have complete access to the Contacts database. I’ve created a Python script that adds notes to a given Contacts notes field. But I’d like to accomplish the same thing using just Drafts or just Shortcuts or just Scriptable.

Is there some reason these other tools don’t have the same access that Pythonista is able to get?

1 Like

Taking each app you mentioned in turn:

Shortcuts (née Workflow)

Whilst the app does have the ability to read data from contacts, it is lacking the ability to update or create contacts. At a guess this has been most likely because the developers (Workflow -> Apple) have prioritised other features and integrations. Other factors may of course be at play such as whatever the level of complexity is for working with the contacts API for updates. I’m pretty sure the focus since joining Apple will have been around things like figuring out what integrations can be retained (legally), designing and building all of the Siri frameworks and no doubt settling into the new organisation. In would imagine that creating and updating contacts is on the roadmap for Shortcuts, and it will come to the app at some point.

Right now I think the developers will be tackling the usual slew of oddities that occur from dramatically stepping up the user population.

But Apple will no doubt continue to be a fruity company who push what they believe you need next rather than necessarily what people want now. But there’s a pretty big intersection I’d guess.

Drafts

Whilst Drafts is on it’s fifth incarnation, Drafts 5 only came along this year, and it is with this latest release that things have picked up significantly around the programmability of the application. As such I think it is fair to say that this is still a relatively new app and the functionality is simply not there yet in terms of integrating and interacting with contacts. But it is on Greg’s future roadmap for the app.

Scriptable

You’re not going to find many apps much newer than this. v1.0 has been released with the rollout of iOS12. Simon has stated in several places on this very forum areas he would like to expand the app into, but for v1.0 there simply hasn’t been the time for him to develop everything he’d like to see in the app. I suspect that we’ll see this in time.

Pythonista

Pythonista is a full fledged development application. Scriptable will hopefully get to the same level one day, but Ole has been developing Pythonista for over six years now I think. Drafts and Shortcuts are not development apps and so they have a broader/looser focus. As a result I would simply state that Pythonista is more mature. In fact Python’s been around longer than JavaScript so the foundation’s the oldest too. This level of maturity and the amount of time it has been purely focussed on programming and programming integrations means that it passed the point on the roadmap some time ago where contacts updating was a thing.

You have a solution that works in Pythonista that can be called by any of the other apps indicated. So whilst you may want to incorporate it directly into the other solutions for the sake of efficiency, as it stands you do at least have the option to interact between systems; or you could of course look at developing all of your solutions solely in Pythonista (not an option you listed previously).

Hope that helps explain some potential reasons as to why this functionality isn’t available in the app(s) you would like it to be.

At the end of the day, if there’s something you want, then maybe find the channel to let the developers know.

  • Apple I believe take feedback from various places online (their support forums for one) and potentially through radars if I’ve read some social media postings from iOS developers correctly.
  • Drafts has it’s own dedicated forum and an area on there where you can request features. Scriptable’s developer Simon (@simonbs), is active on this forum and so will likely spot your post.
1 Like

If you have a version of Interact, by Agile Tortoise, maker of Drafts, then it can indeed do a lot with contacts (though not precisely what you are looking for). The app is no longer for sale, but the good news is I’ve heard that the roadmap for Drafts may well include building in at least a few features from Interact which would likely help you!

3 Likes

Thank you both.

I’ve long used Interact. It was Interact’s inability to modify or add to a Contact’s note field that first launched my quest for a means of doing so. My current solution is a Drafts action that calls a Pythonista script. I’m looking forward to Greg adding contact support in D5, but I worry that some of Interact’s limitation will remain.

My question was intended to be broader as to why Workflow/Drafts/Scriptable all seem to have fewer powers when it comes to contacts as compared to, say, calendar entries.

Is Apple’s SDK just that much worse for contacts? Or is the security somehow tighter? Or are contact formats somehow more complex than calendar events?