Documents Actions

Table of contents

  1. Archives
    1. Extract Archive
    2. Make Archive
      1. Archive formats
    3. Make Disk Image
    4. Make Sized Disk Image
      1. Storage Size Units
  2. Books
    1. Add to Books
  3. Editing
    1. Markup
  4. File Storage
    1. Append to File
    2. Prepend to File
    3. Create Folder
    4. Delete Files
    5. Get Contents of Folder
    6. Get File
    7. Get File From Folder
    8. Get File Link
    9. Get Selected Files
    10. Label File
      1. Labels
    11. Rename File
    12. Reveal Files
    13. Save File
    14. Prompt to Save
    15. Select File
  5. Files
    1. Filter Files
      1. Sort By
    2. Get File Detail
    3. Get Parent Directory
    4. Open File
  6. Network
    1. Connect to Server
  7. Notes
    1. Append to Note
    2. Open Note
  8. Previewing
    1. Quick Look
    2. Show Result
  9. Printing
    1. Make PDF
      1. Merge Behaviors
    2. Optimize PDF File Size
    3. Print
    4. Split PDF
  10. QR Codes
    1. Make QR Code
      1. Error Correction Levels
  11. Rich Text
    1. Make HTML from Rich Text
    2. Make Markdown from Rich Text
    3. Get Rich Text from HTML
    4. Get Rich Text from Markdown
  12. Text
    1. Dictate Text
      1. When to stop listening
    2. Get Text from Image
    3. Get Name of Emoji
    4. Get Text from Input
    5. Get Text from PDF
    6. Make Spoken Audio
    7. Define Word
    8. Speak Text
    9. Transcribe Text
  13. Text Editing
    1. Change Case to Uppercase
    2. Change Case to Lowercase
    3. Capitalize First Word
    4. Capitalize All Text
    5. Change Case to Title Case
    6. Change Case to Alternating Case
    7. Join Text
    8. Correct Spelling
    9. Match Text
    10. Get Group from Matched Text
    11. Get All Groups from Matched Text
    12. Replace Text
    13. Case Insensitive Replace Text
    14. Regular Expression Replace Text
    15. Case Insensitive Regular Expression Replace Text
    16. Split Text
  14. Translation
    1. Languages
    2. Translate Text From Detected Language
    3. Translate Text
    4. Detect Language

Archives

Extract Archive

Extract files from the archive file.

extractArchive(variable file)

Make Archive

Create an archive of files named name in format.

makeArchive(variable files, enum ?format = ".zip", text ?name)

Archive formats

  • .zip
  • .tar.gz
  • .tar.bz2
  • .tar.xz
  • .tar
  • .gz
  • .cpio
  • .iso

Make Disk Image

Create a disk image containing contents.

makeDiskImage(text name, variable contents, boolean ?encrypt = false)

Minimum Version: iOS 15

macOS only


Make Sized Disk Image

Create a disk image of a specific size containing contents.

makeSizedDiskImage(text name, variable contents, text ?size = "1 GB", boolean ?encrypt = false)

Storage Size Units

  • bytes
  • KB
  • MB
  • GB
  • TB
  • PB
  • EB
  • ZB
  • YB

Minimum Version: iOS 15

macOS only

Books

Add to Books

Add input to books. input is expected to be a PDF.

addToBooks(variable input)

Editing

Markup

Opens document in a markup editor.

markup(variable document)

File Storage

Append to File

Append text to a file.

appendToFile(text filePath, text text)

Prepend to File

Prepend text to a file.

prependToFile(text filePath, text text)

Create Folder

Create a folder at path in the user’s Shortcuts folder in their iCloud Drive.

createFolder(text path)

Delete Files

Delete files, optionally immediately.

deleteFiles(variable input, boolean ?immediately = false)

Get Contents of Folder

Get contents of folder.

getFolderContents(variable folder, boolean ?recursive = false)

Get File

Get path in the user’s Shortcuts folder.

getFile(text path, boolean ?errorIfNotFound = true)

Get File From Folder

Get path in folder.

getFileFromFolder(variable folder, text path, boolean ?errorIfNotFound = true)

Get a link to file.

getFileLink(variable file)

Get Selected Files

Get selected files in Finder.

getSelectedFiles()

Label File

Add a label to the file.

labelFile(variable file, enum color)

Labels

  • red
  • orange
  • yellow
  • green
  • blue
  • purple
  • gray

Note: Enum values are case-sensitive.


Rename File

Rename file to newName.

rename(variable file, text newName)

Reveal Files

Reveal files in Finder.

reveal(variable files)

Save File

Save file to path.

saveFile(text path, variable content, boolean ?overwrite = false)

Prompt to Save

Prompt to save file.

saveFilePrompt(variable file, boolean ?overwrite = false)

Select File

Prompt to select a file.

selectFile(boolean ?multiple = false)

Files

Filter Files

filterFiles(variable files, number ?limit, enum ?sortBy)

Sort By

  • File Size
  • File Extension
  • Creation Date
  • File Path
  • Last Modified Date
  • Name
  • Random

Note: Enum values are case-sensitive.

Get File Detail

Get detail of file.

getFileDetail(variable file, text detail)

Get Parent Directory

Get the parent directory of input.

getParentDirectory(variable input)

Open File

Open the given file in the default app, or prompt the user to pick an app to open the file in.

openFile(variable file, boolean ?prompt = false)

Network

Connect to Server

Connect to the server at url.

connectToServer(text url)

Notes

Append to Note

Append input to note.

appendNote(text note, text input)

Open Note

Open note in Notes.

openNote(variable note)

Previewing

Quick Look

Preview input in Quick Look.

quicklook(variable input)

Show Result

Show input in a dialog.

show(text input)

Printing

Make PDF

makePDF(variable input, bool ?includeMargin = false, enum ?mergeBehavior = "Append")

Merge Behaviors

  • Append
  • Shuffle

Note: Enum values are case-sensitive.


Optimize PDF File Size

Optimize the size of a PDF file.

optimizePDF(variable pdfFile)

Print

Prompt the user to print input using a printer.

print(variable input)

Split PDF

Split pdf into pages.

splitPDF(variable pdf)

QR Codes

Make QR Code

Generate a QR code using input with error correction level errorCorrection.

makeQRCode(text input, enum ?errorCorrection = "Medium")

Error Correction Levels

  • Low
  • Medium
  • Quartile
  • High

Rich Text

Make HTML from Rich Text

Convert richText into HTML.

makeHTML(variable input, boolean ?makeFullDocument = false)

Make Markdown from Rich Text

Convert richText into Markdown.

makeMarkdown(variable richText)

Get Rich Text from HTML

Get rich text from html.

getRichTextFromHTML(variable html)

Get Rich Text from Markdown

Get rich text from markdown.

getRichTextFromMarkdown(variable markdown)

Text

Dictate Text

Get text from user using dictation (text-to-speech).

listen(enum ?stopListening = "After Pause", text ?language)

When to stop listening

  • After Pause
  • After Short Pause
  • On Tap

Get Text from Image

Get text from image.

getTextFromImage(variable image)

Get Name of Emoji

Get the emoji name of emoji.

getEmojiName(text emoji)

Get Text from Input

Get text from input.

getText(variable input)

Get Text from PDF

Get text from a PDF file.

getPDFText(variable pdfFile, bool ?richText = false, bool ?combinePages = true, text ?headerText, text ?footerText)

Make Spoken Audio

Make spoken audio from text.

makeSpokenAudio(text text, number ?rate, number ?pitch)

Define Word

Show the definition of word.

define(text word)

Speak Text

Have the device’s default voice say prompt.

speak(text prompt, bool ?waitUntilFinished = true, text ?language)

Transcribe Text

Transcribe the text of audioFile.

transcribeText(variable audioFile)

iOS 17+ only

Text Editing

Change Case to Uppercase

Change the case of text to UPPERCASE.

uppercase(text text)

Change Case to Lowercase

Change the case of text to lowercase.

lowercase(text text)

Capitalize First Word

Capitalize the first word in text.

capitalize(text text)

Capitalize All Text

Capitalize all the words in text.

capitalizeAll(text text)

Change Case to Title Case

Change the case of text to Title Case.

titleCase(text text)

Change Case to Alternating Case

Change the case of text to aLtErNaTiNg cAsE.

alternateCase(text text)

Join Text

Combine text with separator.

joinText(text text, text glue)

Correct Spelling

Correct the spelling of text.

correctSpelling(text text)

Match Text

Match text using a regular expression.

matchText(text regexPattern, text text, bool ?caseSensitive = true)

Get Group from Matched Text

Get group at index in matches.

getMatchGroup(variable matches, integer index)

Get All Groups from Matched Text

Get all groups in matches.

getMatchGroups(variable matches)

Replace Text

Find find in subject and replace it with replacement.

replaceText(text find, text replacement, text subject)

Case Insensitive Replace Text

Case-insensitive find find in subject and replace with replacement.

iReplaceText(text find, text replacement, text subject)

Regular Expression Replace Text

Use a regular expression to find find in subject and replace it with replacement.

regReplaceText(text expression, text replacement, text subject)

Case Insensitive Regular Expression Replace Text

Use a case-insensitive regular-expression to find find in subject and replace with replacement.

iRegReplaceText(text expression, text replacement, text subject)

Split Text

Split text by separator.

splitText(text text, text separator)

Translation

Languages

  • Arabic
  • Mandarin Chinese (Mainland)
  • Mandarin Chinese (Taiwan)
  • Dutch
  • English (UK)
  • English (US)
  • French
  • German
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Polish
  • Portuguese (Brazil)
  • Russian
  • Spanish (Spain)
  • Thai
  • Turkish
  • Vietnamese

Translate Text From Detected Language

Translate text from the detected language of text to to.

translate(text text, text to)

Translate Text

Translate text from from to to.

translateFrom(text text, text from, text to)

Detect Language

Detect the language of text.

detectLanguage(text text)