Dealing with multiple email addresses and phone numbers for and iOS Shortcuts

Since working with Shortcuts, I’ve had a quandary over what to do if people have multiple phone numbers or multiple email addresses in my Contacts database.

For example, I was trying to make a shortcut today to send a group text reminding people of a meeting, but for some of the people I have a work number in addition to a mobile number, and at least one still has a home landline.

Previously I have made a shortcut that fetches people’s email addresses, but some people have more than one email. Some might be a “work” email vs a “personal” email.

Shortcuts does not (yet?) let you specify that you want “home” email addresses or “mobile” phone numbers, and I’m not sure it will any time soon.

My strategy for dealing with this before has always been to move the email or phone down to the “notes” section of the contact, but that was unsatisfying. For one thing, it’s no longer ‘clickable’ if I do want to contact them at that phone number or email address.

The solution seems obvious now.

Instead of using the usual fields for phone numbers or email addresses, I’ve moved them to URL fields.

Email addresses just go after mailto:

Phone numbers go after tel://

You can change the label on the URL to say if it is “home” or “work” (or customize it), so when you are looking at the contact information, it’s easy to tell “Oh that must be her work number” or “That must be his work email.”

I left the primary email and primary phone numbers in the usual fields, and moved the secondary/backup Information to URLs.

You can still click/tap them and they will do what you’d want, but when you use “Get Details of Contact” you will get the “primary” information instead.

One Weird Thing…

When I copied the phone numbers into a tel:// URL on my Mac, the showed just the phone number, but on my iOS devices, there was some extra “cruft” around the number (looked like percent-encoding). Editing the contact info on the iOS devices got rid of the cruft, but I’m not sure what caused it to be there in the first place. I even tried pasting the number into a plain-text document and then copy/pasting from there to Contacts, and it still happened. So, just something to be aware of.


As an alternative. If you take the Shortcut example I posted in this thread as the basis, it is possible to create one or more sub-routine-esque Shortcuts to retrieve specific fields types.

Whilst perhaps slightly more effort to use for retrieval, it does remove the need for maintaining what is in effect duplicate data in every contact record, which could be a time saving in the long run and avoids situations where the additional duplication & transformation step may not have been carried out.

I’m not keeping duplicate data anywhere. I’m putting the less-often-used information in the URL field instead of putting them in their usual fields.

Ah okay - you’re ditching the standard entries for those data items and creating custom entries. As long as you don’t have need to share the contacts with others who aren’t using the same system, then I guess there’s no issues with the transition.

The url schemes are standard, so they should work fine for anyone.

Still, it’s a bit kludgy for me, though it’s probably the only real solution unless this has improved in iOS 13?

Yes, but to clarify my point, if you are not already using those custom contact fields and someone who is using them shared a contact with you, you would then have two potential locations within your contacts ‘database’ for various data items.

Also I’m pretty sure the alternative I suggested would count as “real” in terms of options :wink:

Does the linked number approach “play well” with the phone app? I assume it will show just fine as a field in the contact listing as normal, but if someone calls you, is the phone app smart enough to associate the number in the call log with the number in the link in the contacts additional field? Likewise for the messages app and received messages.

That’s a good question.

For caller ID… considering that Siri will recommend caller ID suggestions based on email, I would hope it would work, but I don’t know for sure.

In each case, the number that I moved to the URL scheme was a work or home number, and I kept the mobile number in the regular part of the Contacts database, so it will definitely work with Messages.