Apple script to send URL and title of the active tab to an Apple note.
I can use the script (below) to get the URL from the active tab of Chrome and send it to Apple Notes. The body of the Note is the URL from the active tab.
Q1: How do I make the URL in the note into a clickable link?
Q2: I would like to show a link preview for the link. Is it possible?
tell application "Google Chrome"
if it is running then
-- Get the URL and title of the active tab
set currentURL to URL of active tab of front window
set currentTitle to title of active tab of front window
-- Create the note content
set noteContent to currentURL
-- Send to Notes app
tell application "Notes"
tell account "Google" -- can change to the name of an existing account
tell folder "Links" -- first make the folder if it does not exist
make new note with properties {name:currentTitle, body:noteContent}
end tell
end tell
end tell
else
display alert "Chrome is not running"
end if
end tell