Skip to content

Text ​

Text manipulation, formatting, regex, and speech.

import Text;

changeCase ​

Changes the case of the text passed into the action to UPPERCASE, lowercase, or Title Case.

changeCase(text: Any, WFCaseType: ChangeCaseType) -> Text
ParameterTypeDefault
textAny—
WFCaseTypeUPPERCASE | lowercase | Capitalize Every Word | Capitalize with Title Case | Capitalize with sentence case | aLtErNaTiNg CaSe—

Shortcuts action: is.workflow.actions.text.changecase

combineText ​

Joins the text together, inserting the separator between each join.

combineText(text: Any, WFTextSeparator: CombineTextSeparator, WFTextCustomSeparator: Any) -> Text
ParameterTypeDefault
textAny—
WFTextSeparatorNew Lines | Spaces | Every Character | Custom—
WFTextCustomSeparatorAny—

Shortcuts action: is.workflow.actions.text.combine

correctSpelling ​

Autocorrects the spelling of text passed into the action.

correctSpelling(text: Any) -> Text
ParameterTypeDefault
textAny—

Shortcuts action: is.workflow.actions.correctspelling

detectLanguage ​

Detects the language of the text provided as input.

detectLanguage(text: Text) -> Text
ParameterTypeDefault
textText—

Shortcuts action: is.workflow.actions.detectlanguage

dictateText ​

Transcribes what you say aloud into text and passes the result to the next action.

dictateText(language: Text, stopListening: Enum) -> Text
ParameterTypeDefault
languageText—
stopListeningAfter Pause | After Short Pause | On Tap"After Pause"

Shortcuts action: is.workflow.actions.dictatetext

extractTextFromImage ​

Uses OCR to extract text from an image.

extractTextFromImage(image: Image) -> Text
ParameterTypeDefault
imageImage—

Shortcuts action: is.workflow.actions.extracttextfromimage

getGroupFromMatchedText ​

Gets the text that matched a particular capture group or all of the capture groups from the output of a Match Text action.

getGroupFromMatchedText(matches: Any, WFGetGroupType: MatchTextGetGroupType, WFGroupIndex: Number) -> Text
ParameterTypeDefault
matchesAny—
WFGetGroupTypeGroup At Index | All Groups—
WFGroupIndexNumber—

Shortcuts action: is.workflow.actions.text.match.getgroup

getNameOfEmoji ​

Gets the names of emoji passed into the action.

getNameOfEmoji(text: Text) -> Text
ParameterTypeDefault
textText—

Shortcuts action: is.workflow.actions.getnameofemoji

makeSpokenAudioFromText ​

Creates an audio file from text, using text-to-speech.

makeSpokenAudioFromText(text: Text, rate: Number, pitch: Number, language: Text, voice: Text) -> Media
ParameterTypeDefault
textText—
rateNumber0.5
pitchNumber1
languageText"Default"
voiceText"Default"

Shortcuts action: is.workflow.actions.makespokenaudiofromtext

matchText ​

matchText(text: Any, WFMatchTextPattern: Any, WFMatchTextCaseSensitive: Boolean) -> Text
ParameterTypeDefault
textAny—
WFMatchTextPatternAny—
WFMatchTextCaseSensitiveBoolean—

Shortcuts action: is.workflow.actions.text.match

replaceText ​

Replaces all occurrences of the given text with other text.

replaceText(findText: Text, replaceWith: Text, caseSensitive: Boolean, regularExpression: Boolean, text: Text) -> Text
ParameterTypeDefault
findTextText—
replaceWithText—
caseSensitiveBooleantrue
regularExpressionBooleanfalse
textText—

Shortcuts action: is.workflow.actions.text.replace

showDefinition ​

Shows the definition of the word passed into the action.

showDefinition(word: Text)
ParameterTypeDefault
wordText—

Shortcuts action: is.workflow.actions.showdefinition

speakText ​

Speaks the inputted text aloud.

speakText(waitUntilFinished: Boolean, rate: Number, pitch: Number, language: Text, voice: Text, text: Text)
ParameterTypeDefault
waitUntilFinishedBooleantrue
rateNumber0.5
pitchNumber1
languageText"Default"
voiceText"Default"
textText—

Shortcuts action: is.workflow.actions.speaktext

splitText ​

Separates text passed into the action into a list.

splitText(text: Any, WFTextSeparator: SplitTextSeparator, WFTextCustomSeparator: Any) -> Text
ParameterTypeDefault
textAny—
WFTextSeparatorNew Lines | Spaces | Every Character | Custom—
WFTextCustomSeparatorAny—

Shortcuts action: is.workflow.actions.text.split

text ​

Passes the specified text to the next action.

text(text: Text) -> Text
ParameterTypeDefault
textText""

Shortcuts action: is.workflow.actions.gettext

translateText ​

Translates the text passed into the action into another language.

translateText(language: Text, to: Text, text: Text) -> Text
ParameterTypeDefault
languageText—
toText—
textText—

Shortcuts action: is.workflow.actions.text.translate

trimWhitespace ​

Removes whitespace and newlines from both ends of the text passed into the action.

trimWhitespace(text: Text) -> Text
ParameterTypeDefault
textText—

Shortcuts action: is.workflow.actions.text.trimwhitespace