Jump to content
able

Prepending text to 'notes' field in Contacts

Recommended Posts

Hi all,

 

I'm looking for a way of prepending notes to a contact using Alfred. After a conversation I want to be able to add a note to a Contact with a datestamp. I'm ok to put the datestamp in myself (using text expander) but I'm wondering if this is feasible using Alfred?

 

Eventually each contact will have a series of notes on meetings with that contact.

 

I'd appreciate the help!

Thanks!

Share this post


Link to post

In theory, the following AppleScript should prepend $1 to the notes of the contacts currently selected in Contacts.app.

Unfortunately, it isn't working right now on my machine (it updates the notes, but Contacts.app doesn't show the update).
 

on run (argv)
    -- Quit if no note was provided
    if (count of argv) is 0 then
        log "No note provided"
        return
    end if
    set theNote to first item of argv
    tell application "Contacts"
        set thePeople to selection
        if (count of thePeople) is 0 then
            log "No contacts selected"
            return
        end if
        
        repeat with aPerson in thePeople
            set curNote to the note of aPerson
            if curNote is missing value then set curNote to ""
            set newNote to theNote & linefeed & curNote
            log newNote
            set note of aPerson to newNote
            log "Prepended note to " & (name of aPerson)
        end repeat
    end tell
    
end run

Share this post


Link to post

Thank you for this. Interesting that this is technically possible!

 

Do you know of an app that is designed to work like this? Basically, when I remember something about someone that I want as reference info (not as an action), I wanna be able to effortlessly note that down in an appropriate place. I find by the time I've opened the contacts app, found the person, and the app hasn't crashed, I've forgotten what that fact was.

 

 

In theory, the following AppleScript should prepend $1 to the notes of the contacts currently selected in Contacts.app.

Unfortunately, it isn't working right now on my machine (it updates the notes, but Contacts.app doesn't show the update).
 

Share this post


Link to post

Hi all,

 

are there any news on this topic? I have the same issue, but can't get any workflow plus applescript to work. Ideally...

1 - I type a note in Alfred, to

2 - then chose a contact, so

3 - the notes field gets prepended with a date stamp + the content of my note.

 

As I'm not the expert on Applescript, the ones I found online and modified didn't work, and I didn't even figure out how to pass {query} into the script. ;-(((

 

Any helpful hints would be greatly appreciated. 

 

Hans

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...