Jump to content

Contacts Search ONLY with Keyword


Recommended Posts

  • 1 year later...

I'm bumping this old topic because my question is the same. I'd rather not clutter my default results with contacts. But I want to be able to search for contacts with Alfred, using a keyword of my choosing. Is there a way to do this with a workflow? Or would this have to be a new feature? Would appreciate some guidance. Thanks.

Link to comment
Share on other sites

  • 3 months later...
On 12/6/2020 at 11:52 AM, nickjvturner said:

The built-in contacts search and 'view within Alfred' works fantastically!

 

Please can you add an option to ONLY show contacts in the search results when using a keyword such as 'co' or similar!

 

Thanks

 

 

Hi @dgbeecher @nickjvturner , I have a similar problem. Did you find a solution ? thank you

Edited by rob213
Link to comment
Share on other sites

@rob213 Which email client do you use?

 

If you use a desktop email client, use the "dc" keyword + your contact name, press Return on the contact, then choose the email address you want to send to and press Return. It'll automatically start a new email to this contact address. :)

Link to comment
Share on other sites

  • 2 months later...

I guess it is acting a bit weird for me as well. When I perform a search using this workflow, it finds each contact twice. The subtext for each is "View Contact in Alfred". If I press enter with one of the identical contacts selected, it will indeed show me that contact in Alfred. If I press enter with the other contact select, it opens up the Contacts app, but does not show me the selected contact. It seems instead to just show whatever contact I was previously viewing in the Contacts app.

 

If I hold down the command key, the subtext changes to "Reveal file in Finder" and indeed if I press enter while holding the command key, a file is shown in the Finder of type "Contact Card Data", nestled deep within an Application Support / AddressBook folder. Interestingly, a different file is revealed depending on which of the two (seemingly identical) contacts shown within Alfred is selected. So there does appear to be some element of duplication that is not of Alfred's making. However, these contacts are not duplicated within the Contacts app itself. 

 

One last bit of information: MOST of my contacts, but not all, are duplicated as described above. Some of them (the minority) appear only once in the search results given via this workflow. I recognize that this is likely a problem outside of Alfred's scope (though if anyone has tips on how to fix it, I'd appreciate your input!).

 

This is still a useful workflow but it would be nice to figure out why it's behaving this way. Ideally it would show each contact only once (though perhaps that problem is unique to me). And ideally pressing Enter would show the contact in Alfred, while pressing CMD-Enter (or some such combination) would show the contact in the Contacts app.

 

I'm using Alfred 5.0.3 (Build 2087, Tuesday 11th October 2022) on macOS 12.6 (Monterey).

Edited by dgbeecher
Link to comment
Share on other sites

5 hours ago, dgbeecher said:

It seems instead to just show whatever contact I was previously viewing in the Contacts app.

 

That's what happens for me too.

 

To be clear, when I start typing a name, the live Alfred results start coming in with "View Contact in Alfred" below each contact.  But when I hit enter, or hit the command combination for the contacts further down the live list, it opens Apple's Contacts app to the last viewed contact in that app.

 

Alfred 5.0.3 [2087] on MacOS 11.7

Edited by Rich
Link to comment
Share on other sites

@dgbeecher @Rich Could you please both check something to help establish what's happening?

 

Find a contact that isn't opening correctly, press the right arrow (or your Universal Actions hotkey combo) then choose Reveal in Finder. What's the path of your contacts and are different ones stored in different locations?

 

My guess for those where Contacts.app opens to the wrong contact is that these do not exist in Contacts.app, but are legacy / cached entries stored somewhere in ~/Library/Application Support/AddressBook/

 

For example, if you find two identical entries, do you find two different paths for them?

 

 

Link to comment
Share on other sites

Yup.   It's going to the path you specified: ~/Library/Application Support/AddressBook/...

 

However, new Contact entries are also being put in the same location.

Edited by Rich
Link to comment
Share on other sites

I've been experimenting with a contact that I find identical copies of when using this workflow. Indeed the two copies seem to point to different files within the same folder. Their paths are the following:

 

~/Library/Application Support/AddressBook/Sources/C9024634-4B64-45F7-A5B2-8F0AD02F75BE/Metadata/8636DCA3-8CEF-413F-B8E9-98EBFE9F1E0E:ABPerson.abcdp

 

~/Library/Application Support/AddressBook/Sources/C9024634-4B64-45F7-A5B2-8F0AD02F75BE/Metadata/BC232A82-C2DC-40F1-9E42-3D2F512A2571:ABPerson.abcdp

 

I *think* that Alfred search result corresponding to the first of these files tends to show the contact in Alfred when I press enter, while the entry corresponding to the second file tends to open Contacts.app (but does not select the relevant contact). But sometimes the behavior seems to reverse. Or maybe I'm just getting confused. 

 

21 hours ago, Vero said:

My guess for those where Contacts.app opens to the wrong contact is that these do not exist in Contacts.app, but are legacy / cached entries stored somewhere in ~/Library/Application Support/AddressBook/

 

By this do you mean that the contact which I'm able to view in Alfred is a true contact that exists in Contacts.app, while the one that opens Contacts.app to the wrong contact is a cached entry? (Or vice versa?)

 

I feel bad asking as I am pretty sure this problem no longer has much to do with Alfred, but if you know of a way to purge those legacy/cached entries, I'd love if you could share. I did some googling but couldn't figure it out. No worries if you don't have a solution. I appreciate your help already by providing and troubleshooting this useful workflow.

Link to comment
Share on other sites

23 hours ago, Vero said:

My guess for those where Contacts.app opens to the wrong contact is that these do not exist in Contacts.app, but are legacy / cached entries stored somewhere in ~/Library/Application Support/AddressBook/

 

That's definitely a legacy storage location?  I thought that's where the Contacts app stores the contacts.

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...