Examples (Mac): AppleScript & Shell Script

AppleScript: Show Draft

Type: Action
Keyboard Shortcut:
Icon: script
Colour: blue
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 1
Unique ID: BE045E85-F99E-4B8C-A43F-B9A4F73498D3
Description:
Example action which demonstrates using an AppleScript in Drafts. This version just displays a dialog with the contents of the current draft, which are passed to the Run AppleScript step.

AppleScript: Handle Response

Type: Action
Keyboard Shortcut:
Icon: script
Colour: blue
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 2
Unique ID: 73868FD4-D7AE-4F9A-B3D8-44DAC5D3EBF1
Description:
Example action demonstrating how to get response data from an AppleScript in subsequent script steps.

AppleScript: Run From Script

Type: Action
Keyboard Shortcut:
Icon: script
Colour: orange
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 2
Unique ID: AB69CCD0-2E8D-4E7B-A0C7-6D169C61FDFA
Description:
Demonstrates calling AppleScript from JavaScript in a Script step.

ShellScript: Bash Example

Type: Action
Keyboard Shortcut:
Icon: code-alt
Colour: none
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 2
Unique ID: 4BAA2DE4-0A19-4B9F-A78A-525C562BF300
Description:
Run simple bash shell script via script. Mac only.

ShellScript: Ruby Example

Type: Action
Keyboard Shortcut:
Icon: code-alt
Colour: none
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 2
Unique ID: 5E6300B2-7A93-4990-AED5-DFDD4681E2C5
Description:
Run simple shell Ruby shell script. Mac only.

Demo

Type: Action
Keyboard Shortcut:
Icon:
Colour: none
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 0
Unique ID: 04A11404-4EB4-4A1E-AD3E-8D6462DDF81D
Description:

New Draft with Safari Tabs

Type: Action
Keyboard Shortcut:
Icon: script
Colour: blue
Confirm to Run: false
Notifications: All
Log Level: All
Number of Steps: 2
Unique ID: 7834EBC2-84A4-4361-9468-5C7A8A58B22B
Description:
Use AppleScript to gather all current tabs open in Safari and create a Markdown list in a new draft containing the title and URL of the pages in each tab.