Activate Normal CreationDate 554150325.40606594 Macros Actions MacroActionType Alert SoundPath Text Open the Notes app and click on the Edit date until it shows the modified date. Also open Bear to view all the Notes (not a folder), and open "All iCloud" in the Notes app. Before running this, also make sure to add one line of the last note in the list to this workflow (bottom of workflow) so the script knows when to stop TimeOutAbortsMacro Title Important information AllWindows AlreadyActivatedActionType Normal Application BundleIdentifier com.apple.Notes Name Notes NewFile /Applications/Notes.app MacroActionType ActivateApplication ReopenWindows TimeOutAbortsMacro KeyCode 45 MacroActionType SimulateKeystroke Modifiers 256 ReleaseAll TargetApplication TargetingType Front Actions AllWindows AlreadyActivatedActionType Normal Application BundleIdentifier com.apple.Notes Name Notes NewFile /Applications/Notes.app MacroActionType ActivateApplication ReopenWindows TimeOutAbortsMacro KeyCode 3 MacroActionType SimulateKeystroke Modifiers 2304 ReleaseAll TargetApplication TargetingType Front Actions KeyCode 48 MacroActionType SimulateKeystroke Modifiers 0 ReleaseAll TargetApplication TargetingType Front CountExpression 3 MacroActionType Repeat TimeOutAbortsMacro KeyCode 125 MacroActionType SimulateKeystroke Modifiers 196608 ReleaseAll TargetApplication TargetingType Front KeyCode 36 MacroActionType SimulateKeystroke Modifiers 0 ReleaseAll TargetApplication TargetingType Front MacroActionType Pause Time 1 TimeOutAbortsMacro KeyCode 0 MacroActionType SimulateKeystroke Modifiers 256 ReleaseAll TargetApplication TargetingType Front KeyCode 8 MacroActionType SimulateKeystroke Modifiers 256 ReleaseAll TargetApplication TargetingType Front MacroActionType Pause Time 0.3 TimeOutAbortsMacro DisplayKind Variable IncludeStdErr MacroActionType ExecuteAppleScript NotifyOnFailure Path StopOnFailure Text activate application "Notes" tell application "System Events" to tell process "Notes" get every UI element tell window 1 tell splitter group 1 tell splitter group 1 tell group 2 set result to get properties of the first static text value of result end tell end tell end tell end tell end tell TimeOutAbortsMacro TrimResults TrimResultsNew UseText Variable createTime MacroActionType Pause Time 0.2 TimeOutAbortsMacro AllWindows AlreadyActivatedActionType Normal Application BundleIdentifier net.shinyfrog.bear Name Bear NewFile /Applications/Bear.app MacroActionType ActivateApplication ReopenWindows TimeOutAbortsMacro MacroActionType Pause Time 2 TimeOutAbortsMacro KeyCode 45 MacroActionType SimulateKeystroke Modifiers 256 ReleaseAll TargetApplication TargetingType Front MacroActionType Pause Time 0.3 TimeOutAbortsMacro KeyCode 9 MacroActionType SimulateKeystroke Modifiers 256 ReleaseAll TargetApplication TargetingType Front MacroActionType Pause Time 0.3 TimeOutAbortsMacro Action Quit Application BundleIdentifier net.shinyfrog.bear Name Bear NewFile /Applications/Bear.app MacroActionType QuitSpecificApp Target Specific MacroActionType Pause Time 1.5 TimeOutAbortsMacro MacroActionType Notification SoundName Subtitle Text Title Updating modified time DisplayKind Briefly IncludeStdErr MacroActionType ExecuteShellScript Path Source Variable SourceVariable createTime Text #!/usr/bin/env ruby require "sqlite3" require "date" path = File.expand_path("~/Library/Containers/net.shinyfrog.bear/Data/Documents/Application Data/database.sqlite") @db = SQLite3::Database.new(path) def do_it(new_date) result = @db.execute("select ZTEXT, ZCREATIONDATE, ZMODIFICATIONDATE, Z_PK from ZSFNOTE ORDER BY Z_PK DESC LIMIT 1").first text = result[0] # lol Apple & Core Data, why u start at 2001-01-01 :joy: core_data_time_offset = 978307200 creation_date = Time.at(result[1] + core_data_time_offset) modification_date = Time.at(result[2] + core_data_time_offset) if Time.now - creation_date < 100 puts "This is a new note we just created" # This is a new note we just created new_value = new_date.strftime("%s").to_i - core_data_time_offset pk = result[3] @db.execute("UPDATE ZSFNOTE SET ZCREATIONDATE=#{new_value}, ZMODIFICATIONDATE=#{new_value} WHERE Z_PK=#{pk}") puts "DONE" else # This is the previous note, so we'll have to wait for the new one to appear in the db puts "This is the previous note, so we'll have to wait for the new one to appear in the db" sleep(1) do_it(new_date) end end new_date = DateTime.parse(STDIN.read.strip) puts new_date do_it(new_date) TimeOutAbortsMacro TimeOutPeriod 10 TrimResults TrimResultsNew UseText MacroActionType Notification SoundName Subtitle Text Title Successfully migrated 1 note AllWindows AlreadyActivatedActionType Normal Application BundleIdentifier net.shinyfrog.bear Name Bear NewFile /Applications/Bear.app MacroActionType ActivateApplication ReopenWindows TimeOutAbortsMacro Conditions ConditionList ClipboardConditionType Contains ClipboardText Text from the last note ConditionType Clipboard ConditionListMatch Any ElseActions MacroActionType IfThenElse ThenActions Action BreakFromLoop MacroActionType Cancel TimeOutAbortsMacro Conditions ConditionList Application BundleIdentifier com.apple.Notes Name Notes NewFile /Applications/Notes.app ApplicationConditionType Active ConditionType Application Application BundleIdentifier net.shinyfrog.bear Name Bear NewFile /Applications/Bear.app ApplicationConditionType Active ConditionType Application ConditionListMatch Any MacroActionType While TimeOutAbortsMacro MacroActionType Notification SoundName Subtitle Text Title All done CreationDate 554150325.40371799 ModificationDate 555262390.26670396 Name Notes 2 Triggers UID 779D98CB-53B4-45C2-BA66-6017073B72A2 Name Global Macro Group ToggleMacroUID E608CE15-65BB-4738-A9F3-33F98771B740 UID E8670E4B-B707-45A9-877A-65644683CD12