How to Back Up Your Safari Bookmarks to Dropbox Automatically

The other day I was tinkering around with bookmarks in Safari and found that I have roughly 500. What would happen if I corrupted iCloud?

This thought got me playing around with Automator in Mac, and I have come up with a scheduled workflow to back up your bookmarks and save them to Dropbox.

Want to know how to do it? Let’s begin.

1. Open Automator by typing “automator” in Spotlight.

Finding Automator in Spotlight

2. Click File | New and choose Calendar Alarm.

Choosing document type in Automator

3. In the search field type “applescript” and select Run AppleScript.
Selecting Run AppleScript in Automator

4. Double-click Run AppleScript. In the window that opens, type (or copy and paste) the following script:

tell application "Safari"
	activate
end tell
tell application "System Events" to tell process "Safari"
	click menu item "Export Bookmarks…" of menu "File" of menu bar item
    "File" of menu bar 1
	keystroke "d" using {command down}
	click button "Save" of window "Export Bookmarks"
	if sheet 1 of window "Export Bookmarks" exists then click
    button "Replace" of sheet 1 of window "Export Bookmarks"
end tell

5. Run the Script by clicking the Run button.

Automator Run button

Duplicate contacts killing your productivity? See how Scrubly can help in this 100-second video.

6. Next, search for Get Specified Finder Itemsas shown below and double-click.

Selecting Get Specified Finder Items
7. Click Add and choose the file on your desktop called “Safari Bookmarks.” Now you’re ready to move the file to Dropbox.

Adding Safari Bookmarks file to workflow

8. Next, search for Move Finder Items and double-click.

Searching for Move Finder Items

9. Check the Replacing Existing Files box and change Desktop to Dropbox.

Move Finder Items action window

10. Now, click Run at the top right corner of the window to test the workflow.

Clicking Run in Automator

The file is created and automatically placed in your Dropbox folder as shown below.

Automator workflow log

11. Let’s now schedule this to run weekly. Click File | Save as choose a name such as Safari Bookmarks Backup.

Saving Safari Bookmarks Backup workflow

12. Click Save, double-click the entry and select Every Week under Repeat.
13. Click Done. You have now successfully scheduled a weekly automated backup of your Safari Bookmarks.

NOTE: If your script doesn’t run, make sure you have it open under Accessibility. Click System Preferences | Security & Privacy | Accessibility and enable the following: Your Workflow, AppleScript Editor, Automator and AppleScript Utility.

Allowing apps in Mac Accessibility window

Scrubly social-sharing menu.

Scrubly sign-up.
MORE POSTS ON: How To Mac | | |