Unknown model· unknown
ShareGPT 90K (shared ChatGPT conversations)
Write an automation for mac to send all new Apple Notes to a REST API
- User
Write an automation for mac to send all new Apple Notes to a REST API
- Assistant
Here's an example of how to automate sending all new Apple Notes to a REST API using AppleScript on a Mac:
- Open the Script Editor app on your Mac.
- Click on "File" > "New" to create a new script.
- In the script editor, enter the following AppleScript code:
tell application "Notes" set allNotes to notes repeat with aNote in allNotes if modification date of aNote is greater than date "2021-09-01" then set noteTitle to name of aNote set noteBody to body of aNote set apiUrl to "https://your-rest-api.com/notes" tell application "curl" set postData to "-d '{\"title\":\"" & noteTitle & "\", \"body\":\"" & noteBody & "\"}'" do shell script "curl -X POST -H 'Content-Type: application/json' -d '" & postData & "' " & apiUrl end tell end if end repeat end tell
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.