Jump to content

Search and pass contact's phone number


Recommended Posts

Hi, I'm trying to create a workflow that allows me to search my contacts by name and then pass the phone number to the next step in the workflow. How can I accomplish searching the contacts and extracting the phone number

 

I tried to create a file filter with the address as the scope but didn't know how to proceed further. Can anyone please assist me here?

 

 

Screenshot 2022-10-29 at 16.51.39.jpg

Screenshot 2022-10-29 at 16.51.45.jpg

Screenshot 2022-10-29 at 16.51.53.jpg

Edited by andy4222
Link to comment
  • andy4222 changed the title to Search and pass contact's phone number

Is there a reason why you would be able to save a contact action as a variable and pass it to a callback url?

 

Here is something i built with a contact action that saves variables and passes to a script:

 

image.thumb.png.d5ab9ac7a643b14619927fbd7c9ef846.png

 

the first variable saves the number from the contact action, and the second variable captures the message i'm sending, and then it hits this script:

 

tell application "Messages"
set targetBuddy to (system attribute "number")
set targetService to id of 1st account whose service type = iMessage
set textMessage to (system attribute "msg")
set theBuddy to participant targetBuddy of account id targetService
send textMessage to theBuddy
end tell

 

I have another that passed a number to an imessage callback url as well.

 

 

 

Link to comment

Look inside your search scope. You’ll realise you’re essentially dealing with abcdp files, which are binary plists. You’ll have to parse those and extract the number. Use /usr/libexec/PlistBuddy. For example, /usr/libexec/PlistBuddy -c 'Print :Phone' /path/to/file will dive you a dictionary, in which there’s an array with the numbers.

Link to comment

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
×
×
  • Create New...