Skip to content

Documents

Files, folders, archives, PDF, and rich text.

import Documents;

appendToTextFile

Adds the text passed as input to the end of the specified text file.

appendToTextFile(WFFile: Any, WFFilePath: Text, WFAppendFileWriteMode: Text, WFAppendOnNewLine: Boolean, WFInput: Text) -> Any
ParameterTypeDefault
WFFileAny
WFFilePathText
WFAppendFileWriteModeText"Append"
WFAppendOnNewLineBooleantrue
WFInputText

If no file exists yet at the specified path, a new file will be created. Make sure to include a file extension (usually .txt) at the end of your path.

Shortcuts action: is.workflow.actions.file.append

createFolder

Makes a new folder.

createFolder(WFFilePath: Text, WFFolder: Any) -> Any
ParameterTypeDefault
WFFilePathText
WFFolderAny

Shortcuts action: is.workflow.actions.file.createfolder

deleteFiles

Deletes the files passed in as input.

deleteFiles(WFInput: Any, WFDeleteImmediatelyDelete: Boolean)
ParameterTypeDefault
WFInputAny
WFDeleteImmediatelyDeleteBooleanfalse

Shortcuts action: is.workflow.actions.file.delete

extractArchive

Extracts files from the archive passed as input. Many archive formats are supported, including zip, rar, tar.gz, tar.bz2, tar, gzip, cpio, cab, and iso archives.

extractArchive(WFArchive: Any) -> Any
ParameterTypeDefault
WFArchiveAny

Shortcuts action: is.workflow.actions.unzip

file

Passes the specified files or folders as output.

file(WFFile: Any) -> Any
ParameterTypeDefault
WFFileAny

Shortcuts action: is.workflow.actions.file

filterFiles

filterFiles()

Shortcuts action: is.workflow.actions.filter.files

getContentsOfFolder

This action gets the files inside of the specified folder.

getContentsOfFolder(WFFolder: Any, Recursive: Boolean) -> Any
ParameterTypeDefault
WFFolderAny
RecursiveBooleanfalse

Shortcuts action: is.workflow.actions.file.getfoldercontents

getDetailsOfFiles

getDetailsOfFiles()

Shortcuts action: is.workflow.actions.properties.files

getFileFromFolder

Gets a file or folder by a relative path, starting at a folder you choose.

getFileFromFolder(WFFileErrorIfNotFound: Boolean, WFGetFolderContents: Boolean, WFFile: Any, WFGetFilePath: Text) -> Any
ParameterTypeDefault
WFFileErrorIfNotFoundBooleantrue
WFGetFolderContentsBooleanfalse
WFFileAny
WFGetFilePathText

Shortcuts action: is.workflow.actions.documentpicker.open

getLinkToFile

Gets a public iCloud link to the file passed into the action. The specified file must already be uploaded to iCloud.

getLinkToFile(WFFile: Any) -> Text
ParameterTypeDefault
WFFileAny

Shortcuts action: is.workflow.actions.file.getlink

getParentDirectory

Gets the common parent directory of the files passed in.

getParentDirectory(WFInput: Any) -> Any
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.getparentdirectory

getSelectedFilesInFinder

Gets the files that are currently selected in Finder.

getSelectedFilesInFinder() -> Any

Shortcuts action: is.workflow.actions.finder.getselectedfiles

getTextFromPdf

Gets text from the provided PDF file.

getTextFromPdf(WFInput: Any, WFGetTextFromPDFTextType: Text, WFGetTextFromPDFPageHeader: Text, WFGetTextFromPDFPageFooter: Text, WFCombinePages: Boolean) -> Text
ParameterTypeDefault
WFInputAny
WFGetTextFromPDFTextTypeText"Text"
WFGetTextFromPDFPageHeaderText
WFGetTextFromPDFPageFooterText
WFCombinePagesBooleantrue

Shortcuts action: is.workflow.actions.gettextfrompdf

labelFiles

Applies a label to the specified files.

labelFiles(WFInput: Any, WFLabelColorNumber: Text)
ParameterTypeDefault
WFInputAny
WFLabelColorNumberText

Shortcuts action: is.workflow.actions.file.label

makeArchive

Makes an archive out of the files passed as input. Supports creating zip, tar.gz, tar.bz2, tar.xz, tar, gzip, cpio, or iso archives.

makeArchive(WFZIPName: Text, WFArchiveFormat: Text, WFInput: Any) -> Any
ParameterTypeDefault
WFZIPNameText
WFArchiveFormatText
WFInputAny

Shortcuts action: is.workflow.actions.makezip

makeDiskImage

Creates a new disk image (.dmg) file. The disk image will contain any files passed as input.

makeDiskImage(WFInput: Any, VolumeName: Text, EncryptImage: Boolean, SizeToFit: Boolean, ImageSize: Number) -> Any
ParameterTypeDefault
WFInputAny
VolumeNameText
EncryptImageBoolean
SizeToFitBooleanfalse
ImageSizeNumber1

Shortcuts action: is.workflow.actions.makediskimage

makeHtmlFromRichText

Converts the rich text passed as input to HTML text.

makeHtmlFromRichText(WFMakeFullDocument: Boolean, WFInput: Any) -> Text
ParameterTypeDefault
WFMakeFullDocumentBoolean
WFInputAny

Shortcuts action: is.workflow.actions.gethtmlfromrichtext

makeImageFromPdfPage

Creates images from the pages in the PDF passed into the action.

makeImageFromPdfPage(WFInput: Any, WFMakeImageFromPDFPageImageFormat: Text, WFMakeImageFromPDFPageColorspace: Text, WFMakeImageFromPDFPageResolution: Number) -> Any
ParameterTypeDefault
WFInputAny
WFMakeImageFromPDFPageImageFormatText
WFMakeImageFromPDFPageColorspaceText
WFMakeImageFromPDFPageResolutionNumber300

Shortcuts action: is.workflow.actions.makeimagefrompdfpage

makeImageFromRichText

Creates an image from the rich text, web content, or URL passed in as input.

makeImageFromRichText(WFInput: Any, WFWidth: Number, WFHeight: Number) -> Any
ParameterTypeDefault
WFInputAny
WFWidthNumber1024
WFHeightNumber768

Shortcuts action: is.workflow.actions.makeimagefromrichtext

makeMarkdownFromRichText

Converts the rich text passed as input to Markdown text (comparable to Aaron Swartz's html2text script).

makeMarkdownFromRichText(WFInput: Any) -> Text
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.getmarkdownfromrichtext

makePdf

Makes a PDF out of the input. The resulting PDF can optionally include a quarter-inch margin for better printing.

makePdf(WFPDFIncludeMargin: Boolean, WFPDFIncludedPages: Text, WFPDFSinglePage: Number, WFPDFPageRangeStart: Number, WFPDFPageRangeEnd: Number, WFInput: Any, WFPDFDocumentMergeBehavior: Text) -> Any
ParameterTypeDefault
WFPDFIncludeMarginBooleanfalse
WFPDFIncludedPagesText"All Pages"
WFPDFSinglePageNumber
WFPDFPageRangeStartNumber
WFPDFPageRangeEndNumber
WFInputAny
WFPDFDocumentMergeBehaviorText"Append"

Shortcuts action: is.workflow.actions.makepdf

makeRichTextFromHtml

Takes the inputted HTML and turns it into rich text, which can then be converted to other formats.

makeRichTextFromHtml(WFHTML: Any) -> Any
ParameterTypeDefault
WFHTMLAny

Shortcuts action: is.workflow.actions.getrichtextfromhtml

makeRichTextFromMarkdown

Takes the inputted Markdown and turns it into rich text, which can then be converted to other formats.

makeRichTextFromMarkdown(WFInput: Any) -> Any
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.getrichtextfrommarkdown

mountDiskImage

Mounts a disk image (.dmg) file on your desktop.

mountDiskImage(WFInput: Any) -> Any
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.mountdiskimage

moveFile

Moves the specified file to a new location.

moveFile(WFFile: Any, WFFolder: Any, WFReplaceExisting: Boolean) -> Any
ParameterTypeDefault
WFFileAny
WFFolderAny
WFReplaceExistingBooleanfalse

Shortcuts action: is.workflow.actions.file.move

optimizeFileSizeOfPdf

Optimizes the file size of the provided PDF file by compressing its images.

If the images contained in the PDF are already compressed, this action might not have a measurable effect on file size.

optimizeFileSizeOfPdf(WFInput: Any) -> Any
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.compresspdf

print

Prints the input using AirPrint.

print(WFInput: Any)
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.print

quickLook

Displays a preview of the input using the system Quick Look.

quickLook(WFInput: Any, WFQuickLookActionFullScreen: Boolean)
ParameterTypeDefault
WFInputAny
WFQuickLookActionFullScreenBoolean

Shortcuts action: is.workflow.actions.previewdocument

renameFile

Renames the specified file.

renameFile(WFFile: Any, WFNewFilename: Text) -> Any
ParameterTypeDefault
WFFileAny
WFNewFilenameText

Shortcuts action: is.workflow.actions.file.rename

revealFilesInFinder

Opens windows in the Finder with the specified files selected.

revealFilesInFinder(WFFile: Any)
ParameterTypeDefault
WFFileAny

Shortcuts action: is.workflow.actions.file.reveal

saveFile

Saves files to a specified folder. You can also use this action to copy a file.

saveFile(WFInput: Any, WFFolder: Any, WFAskWhereToSave: Boolean, WFFileDestinationPath: Text, WFSaveFileOverwrite: Boolean) -> Any
ParameterTypeDefault
WFInputAny
WFFolderAny
WFAskWhereToSaveBooleantrue
WFFileDestinationPathText
WFSaveFileOverwriteBooleanfalse

Shortcuts action: is.workflow.actions.documentpicker.save

selectFile

Prompts to select files or folders.

selectFile(WFPickingMode: Text, SelectMultiple: Boolean) -> Any
ParameterTypeDefault
WFPickingModeText"Files"
SelectMultipleBooleanfalse

Shortcuts action: is.workflow.actions.file.select

splitPdfIntoPages

Splits the input document by creating a PDF for each page.

splitPdfIntoPages(WFInput: Any) -> Any
ParameterTypeDefault
WFInputAny

Shortcuts action: is.workflow.actions.splitpdf