Using Applescript to append user input to existing note in Notes App I've been using this little utility to save out random thoughts through the day to a text file.
I want to append the user input to an existing note in the notes APP, but can't figure out getting beyond simply calling the notes app.
Any help would be greatly appreciated!
Extra credit: If anyone has experience using Applescript to send data to a Google Sheet, I'd appreciate any resources - I have had a tough time finding any.
Thanks!
Here is my working script that logs user input to a text file.
set f to &quot;/Users/Weston/Desktop/JAT.txt&quot;
set myDate to date string of (current date)
set myTime to time string of (current date)
set myStamp to myDate &amp; &quot; &quot; &amp; myTime


set JAT to text returned of (display dialog &quot;What's on your mind, Weston?&quot; default answer &quot; &quot; with icon note buttons {&quot;Cancel&quot;, &quot;Continue&quot;} default button &quot;Continue&quot;)

set entry to return &amp; &quot;&gt;&quot; &amp; myStamp &amp; &quot; | &quot; &amp; JAT

set myFile to open for access f with write permission
write entry to f starting at (get eof of f) + 1
close access myFile

quit
This question explains how to modify text on Notes, so here's how that would be implemented in your code:

set noteName to &quot;JAT&quot;
set myDate to date string of (current date)
set myTime to time string of (current date)
set myStamp to myDate &amp; &quot; &quot; &amp; myTime


set JAT to text returned of (display dialog &quot;What's on your mind, Weston?&quot; default answer &quot; &quot; with icon note buttons {&quot;Cancel&quot;, &quot;Continue&quot;} default button &quot;Continue&quot;)

set entry to return &amp; &quot;&gt;&quot; &amp; myStamp &amp; &quot; | &quot; &amp; JAT

tell application &quot;Notes&quot;
    tell account &quot;iCloud&quot;
        set body of note noteName to (get body of note noteName &amp; entry)
    end tell
end tell

quit


Don't forget to create the note first, though.