/**
* Comprehensive Apple Shortcuts Action Library
* Contains all action definitions organized by category
*/
import { ActionDefinition, ActionCategory } from "../types.js";
// Action Categories
export const ACTION_CATEGORIES: ActionCategory[] = [
{
name: "System & Device",
description: "Control device settings, brightness, volume, and system features",
actions: [
"getdevicedetails", "setbrightness", "setvolume", "setairplanemode",
"setwifi", "setbluetooth", "getbatterylevel", "setlowpowermode",
"setappearance", "openapp", "wait", "waittoreturn", "exit"
]
},
{
name: "Files & Storage",
description: "File operations, iCloud Drive, sharing and storage management",
actions: [
"documentpicker.open", "documentpicker.save", "file.delete",
"file.getfoldercontents", "file.createfolder", "previewdocument",
"share", "showresult", "file.append", "file.getlink"
]
},
{
name: "Text & Documents",
description: "Text manipulation, input dialogs, and document operations",
actions: [
"gettext", "text.split", "text.combine", "text.replace", "text.match",
"alert", "notification", "ask", "choosefrommenu", "choosefromlist",
"dictatetext", "speaktext", "showdefinition", "makerichtext",
"makepdf", "makehtmlfromrichtext", "comment"
]
},
{
name: "Web & APIs",
description: "HTTP requests, URL handling, and web interactions",
actions: [
"downloadurl", "url.encode", "url", "url.expand", "url.getfrom",
"openurl", "searchweb", "showwebpage", "runjavascriptonwebpage"
]
},
{
name: "Scripting & Variables",
description: "Variables, control flow, and advanced scripting",
actions: [
"setvariable", "getvariable", "conditional", "repeat.count",
"repeat.each", "runshortcut", "nothing", "output", "getitemfromlist",
"count", "number", "calculate", "random", "hash"
]
},
{
name: "Data & Dictionaries",
description: "Dictionary manipulation, JSON parsing, and data transformation",
actions: [
"detect.dictionary", "getvalueforkey", "setvalueforkey",
"dictionary", "filter.files", "gettype", "base64encode"
]
},
{
name: "Calendar & Time",
description: "Calendar events, date manipulation, and time operations",
actions: [
"calendar.add", "calendar.search", "calendar.getupcoming",
"format.date", "adjustdate", "date", "currentdate", "timezone.convert"
]
},
{
name: "Reminders & Tasks",
description: "Reminders app integration and task management",
actions: [
"reminders.add", "reminders.search", "reminders.toggle",
"reminders.show", "reminders.getdetails"
]
},
{
name: "Photos & Media",
description: "Photo capture, editing, and media manipulation",
actions: [
"takephoto", "selectphoto", "getlatestphotos", "photo.search",
"properties.photos", "image.convert", "image.resize", "image.rotate",
"image.flip", "image.combine", "image.overlay", "image.mask",
"image.getframes", "image.gif", "video.gif"
]
},
{
name: "Contacts & Communication",
description: "Contact management and messaging",
actions: [
"contacts.get", "contacts.search", "contacts.add", "contacts.getdetails",
"contacts.getemailaddresses", "contacts.getphonenumbers",
"sendmessage", "sendemail", "call", "facetime"
]
},
{
name: "Location & Maps",
description: "Location services, directions, and mapping",
actions: [
"location.current", "getaddress", "searchlocalbusinesses",
"showdirections", "getdirections", "getdistance", "gettraveltime",
"gethalfwaypoint", "address", "location.getdetails"
]
},
{
name: "Health & Fitness",
description: "HealthKit integration and workout tracking",
actions: [
"health.log", "health.search", "health.getdetails",
"workout.start", "workout.stop"
]
},
{
name: "Home Automation",
description: "HomeKit device control and scene management",
actions: [
"homekit.control", "homekit.getstate", "homekit.setscene"
]
},
{
name: "Focus & Productivity",
description: "Focus modes and productivity features",
actions: [
"focus.set", "focus.off", "setplaybackdestination"
]
}
];
// Comprehensive Action Definitions
export const ACTIONS: ActionDefinition[] = [
// ========== TEXT & DOCUMENTS ==========
{
identifier: "is.workflow.actions.gettext",
name: "Text",
description: "Creates a text string. Use this to create static text or templates.",
category: "Text & Documents",
parameters: [
{
name: "Text",
key: "WFTextActionText",
type: "text",
required: true,
description: "The text content to output"
}
],
outputType: "Text"
},
{
identifier: "is.workflow.actions.text.split",
name: "Split Text",
description: "Splits text into a list based on a separator.",
category: "Text & Documents",
parameters: [
{
name: "Separator",
key: "WFTextSeparator",
type: "enum",
required: true,
description: "The separator to split by",
enumValues: ["New Lines", "Spaces", "Every Character", "Custom"]
},
{
name: "Custom Separator",
key: "WFTextCustomSeparator",
type: "text",
required: false,
description: "Custom separator string (when Separator is Custom)"
}
],
outputType: "List"
},
{
identifier: "is.workflow.actions.text.combine",
name: "Combine Text",
description: "Joins a list of text items into a single text string.",
category: "Text & Documents",
parameters: [
{
name: "Separator",
key: "WFTextSeparator",
type: "enum",
required: true,
description: "The separator to join with",
enumValues: ["New Lines", "Spaces", "Custom"]
},
{
name: "Custom Separator",
key: "WFTextCustomSeparator",
type: "text",
required: false,
description: "Custom separator string"
}
],
outputType: "Text"
},
{
identifier: "is.workflow.actions.text.replace",
name: "Replace Text",
description: "Replaces occurrences of text with another string.",
category: "Text & Documents",
parameters: [
{
name: "Find",
key: "WFReplaceTextFind",
type: "text",
required: true,
description: "The text to find"
},
{
name: "Replace With",
key: "WFReplaceTextReplace",
type: "text",
required: true,
description: "The replacement text"
},
{
name: "Case Sensitive",
key: "WFReplaceTextCaseSensitive",
type: "boolean",
required: false,
description: "Whether to match case",
defaultValue: true
},
{
name: "Regular Expression",
key: "WFReplaceTextRegularExpression",
type: "boolean",
required: false,
description: "Treat Find as regex pattern",
defaultValue: false
}
],
outputType: "Text"
},
{
identifier: "is.workflow.actions.text.match",
name: "Match Text",
description: "Finds text matching a pattern using regular expressions.",
category: "Text & Documents",
parameters: [
{
name: "Pattern",
key: "WFMatchTextPattern",
type: "text",
required: true,
description: "Regular expression pattern"
},
{
name: "Case Sensitive",
key: "WFMatchTextCaseSensitive",
type: "boolean",
required: false,
description: "Whether to match case",
defaultValue: true
}
],
outputType: "List"
},
{
identifier: "is.workflow.actions.alert",
name: "Show Alert",
description: "Displays an alert dialog with a title and message.",
category: "Text & Documents",
parameters: [
{
name: "Title",
key: "WFAlertActionTitle",
type: "text",
required: true,
description: "The alert title"
},
{
name: "Message",
key: "WFAlertActionMessage",
type: "text",
required: false,
description: "The alert message body"
},
{
name: "Show Cancel Button",
key: "WFAlertActionCancelButtonShown",
type: "boolean",
required: false,
description: "Whether to show a cancel button",
defaultValue: true
}
]
},
{
identifier: "is.workflow.actions.notification",
name: "Show Notification",
description: "Displays a system notification.",
category: "Text & Documents",
parameters: [
{
name: "Body",
key: "WFNotificationActionBody",
type: "text",
required: true,
description: "The notification text"
},
{
name: "Title",
key: "WFNotificationActionTitle",
type: "text",
required: false,
description: "The notification title"
},
{
name: "Play Sound",
key: "WFNotificationActionSound",
type: "boolean",
required: false,
description: "Whether to play a sound",
defaultValue: true
}
]
},
{
identifier: "is.workflow.actions.ask",
name: "Ask for Input",
description: "Prompts the user to enter text, a number, or select from options.",
category: "Text & Documents",
parameters: [
{
name: "Question",
key: "WFAskActionPrompt",
type: "text",
required: true,
description: "The prompt to display"
},
{
name: "Input Type",
key: "WFInputType",
type: "enum",
required: false,
description: "The type of input to request",
enumValues: ["Text", "Number", "URL", "Date", "Time", "Date and Time"],
defaultValue: "Text"
},
{
name: "Default Answer",
key: "WFAskActionDefaultAnswer",
type: "text",
required: false,
description: "Pre-filled answer"
}
],
outputType: "Text"
},
{
identifier: "is.workflow.actions.choosefrommenu",
name: "Choose from Menu",
description: "Creates an interactive menu for user selection.",
category: "Text & Documents",
parameters: [
{
name: "Prompt",
key: "WFMenuPrompt",
type: "text",
required: false,
description: "The menu title"
},
{
name: "Menu Items",
key: "WFMenuItems",
type: "array",
required: true,
description: "Array of menu option strings"
}
]
},
{
identifier: "is.workflow.actions.choosefromlist",
name: "Choose from List",
description: "Presents a list of items for the user to choose from.",
category: "Text & Documents",
parameters: [
{
name: "Prompt",
key: "WFChooseFromListActionPrompt",
type: "text",
required: false,
description: "The prompt to display"
},
{
name: "Select Multiple",
key: "WFChooseFromListActionSelectMultiple",
type: "boolean",
required: false,
description: "Allow multiple selection",
defaultValue: false
},
{
name: "Select All Initially",
key: "WFChooseFromListActionSelectAll",
type: "boolean",
required: false,
description: "Select all items initially",
defaultValue: false
}
]
},
{
identifier: "is.workflow.actions.speaktext",
name: "Speak Text",
description: "Speaks the input text aloud using text-to-speech.",
category: "Text & Documents",
parameters: [
{
name: "Wait Until Finished",
key: "WFSpeakTextWait",
type: "boolean",
required: false,
description: "Wait for speech to complete",
defaultValue: true
},
{
name: "Rate",
key: "WFSpeakTextRate",
type: "number",
required: false,
description: "Speech rate (0.0-2.0)",
defaultValue: 1.0
},
{
name: "Pitch",
key: "WFSpeakTextPitch",
type: "number",
required: false,
description: "Speech pitch (0.5-2.0)",
defaultValue: 1.0
}
]
},
{
identifier: "is.workflow.actions.comment",
name: "Comment",
description: "Adds a comment for documentation. Does not affect execution.",
category: "Text & Documents",
parameters: [
{
name: "Comment",
key: "WFCommentActionText",
type: "text",
required: true,
description: "The comment text"
}
]
},
{
identifier: "is.workflow.actions.makepdf",
name: "Make PDF",
description: "Creates a PDF from the input.",
category: "Text & Documents",
parameters: [
{
name: "Include Margin",
key: "WFPDFIncludeMargin",
type: "boolean",
required: false,
description: "Include a margin around the content",
defaultValue: false
}
],
outputType: "PDF"
},
// ========== WEB & APIs ==========
{
identifier: "is.workflow.actions.downloadurl",
name: "Get Contents of URL",
description: "Makes an HTTP request to a URL. Supports all HTTP methods, headers, and request bodies.",
category: "Web & APIs",
parameters: [
{
name: "URL",
key: "WFURL",
type: "url",
required: true,
description: "The URL to request"
},
{
name: "Method",
key: "WFHTTPMethod",
type: "enum",
required: false,
description: "HTTP method",
enumValues: ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"],
defaultValue: "GET"
},
{
name: "Headers",
key: "WFHTTPHeaders",
type: "dictionary",
required: false,
description: "HTTP headers as key-value pairs"
},
{
name: "Request Body",
key: "WFHTTPBodyType",
type: "enum",
required: false,
description: "Request body type",
enumValues: ["JSON", "Form", "File"]
},
{
name: "JSON Body",
key: "WFJSONValues",
type: "dictionary",
required: false,
description: "JSON body content"
},
{
name: "Form Values",
key: "WFFormValues",
type: "dictionary",
required: false,
description: "Form data values"
}
],
outputType: "File"
},
{
identifier: "is.workflow.actions.url",
name: "URL",
description: "Creates a URL from text.",
category: "Web & APIs",
parameters: [
{
name: "URL",
key: "WFURLActionURL",
type: "text",
required: true,
description: "The URL string"
}
],
outputType: "URL"
},
{
identifier: "is.workflow.actions.url.encode",
name: "URL Encode",
description: "Encodes or decodes text for use in URLs.",
category: "Web & APIs",
parameters: [
{
name: "Mode",
key: "WFEncodeMode",
type: "enum",
required: false,
description: "Encode or decode",
enumValues: ["Encode", "Decode"],
defaultValue: "Encode"
}
],
outputType: "Text"
},
{
identifier: "is.workflow.actions.openurl",
name: "Open URLs",
description: "Opens URLs in Safari or the appropriate app.",
category: "Web & APIs",
parameters: []
},
{
identifier: "is.workflow.actions.searchweb",
name: "Search Web",
description: "Searches the web using the specified search engine.",
category: "Web & APIs",
parameters: [
{
name: "Search Engine",
key: "WFSearchWebDestination",
type: "enum",
required: false,
description: "Search engine to use",
enumValues: ["Amazon", "Bing", "DuckDuckGo", "eBay", "Google", "Reddit", "Twitter", "Yahoo!", "YouTube"],
defaultValue: "Google"
}
]
},
{
identifier: "is.workflow.actions.showwebpage",
name: "Show Web Page",
description: "Shows a web page in an in-app browser.",
category: "Web & APIs",
parameters: [
{
name: "Enter Safari Reader",
key: "WFEnterSafariReader",
type: "boolean",
required: false,
description: "Use Safari Reader mode",
defaultValue: false
}
]
},
{
identifier: "is.workflow.actions.runjavascriptonwebpage",
name: "Run JavaScript on Web Page",
description: "Executes JavaScript code on the current Safari web page.",
category: "Web & APIs",
parameters: [
{
name: "JavaScript",
key: "WFJavaScript",
type: "text",
required: true,
description: "JavaScript code to execute"
}
],
outputType: "Text"
},
// ========== SCRIPTING & VARIABLES ==========
{
identifier: "is.workflow.actions.setvariable",
name: "Set Variable",
description: "Stores the input in a named variable for later use.",
category: "Scripting & Variables",
parameters: [
{
name: "Variable Name",
key: "WFVariableName",
type: "text",
required: true,
description: "Name for the variable"
}
]
},
{
identifier: "is.workflow.actions.getvariable",
name: "Get Variable",
description: "Retrieves the value of a named variable.",
category: "Scripting & Variables",
parameters: [
{
name: "Variable",
key: "WFVariable",
type: "variable",
required: true,
description: "The variable to retrieve"
}
]
},
{
identifier: "is.workflow.actions.conditional",
name: "If",
description: "Executes different actions based on a condition.",
category: "Scripting & Variables",
parameters: [
{
name: "Input",
key: "WFInput",
type: "variable",
required: true,
description: "The value to test"
},
{
name: "Condition",
key: "WFCondition",
type: "enum",
required: true,
description: "The comparison operator",
enumValues: ["is", "is not", "contains", "does not contain", "begins with", "ends with", "is greater than", "is less than", "is between"]
},
{
name: "Compare To",
key: "WFConditionalActionString",
type: "text",
required: false,
description: "Value to compare against"
},
{
name: "Group ID",
key: "GroupingIdentifier",
type: "text",
required: true,
description: "UUID linking If/Otherwise/End If blocks"
}
]
},
{
identifier: "is.workflow.actions.repeat.count",
name: "Repeat",
description: "Repeats the contained actions a specified number of times.",
category: "Scripting & Variables",
parameters: [
{
name: "Count",
key: "WFRepeatCount",
type: "number",
required: true,
description: "Number of iterations"
},
{
name: "Group ID",
key: "GroupingIdentifier",
type: "text",
required: true,
description: "UUID linking Repeat/End Repeat blocks"
}
]
},
{
identifier: "is.workflow.actions.repeat.each",
name: "Repeat with Each",
description: "Iterates over each item in a list.",
category: "Scripting & Variables",
parameters: [
{
name: "Group ID",
key: "GroupingIdentifier",
type: "text",
required: true,
description: "UUID linking Repeat/End Repeat blocks"
}
]
},
{
identifier: "is.workflow.actions.runshortcut",
name: "Run Shortcut",
description: "Runs another shortcut, optionally passing input.",
category: "Scripting & Variables",
parameters: [
{
name: "Shortcut",
key: "WFWorkflowName",
type: "text",
required: true,
description: "Name of shortcut to run"
},
{
name: "Show While Running",
key: "WFShowWorkflow",
type: "boolean",
required: false,
description: "Show the shortcut as it runs",
defaultValue: false
}
]
},
{
identifier: "is.workflow.actions.nothing",
name: "Nothing",
description: "Produces no output. Useful as a placeholder.",
category: "Scripting & Variables",
parameters: []
},
{
identifier: "is.workflow.actions.output",
name: "Stop and Output",
description: "Stops the shortcut and returns a value.",
category: "Scripting & Variables",
parameters: []
},
{
identifier: "is.workflow.actions.exit",
name: "Exit Shortcut",
description: "Stops the shortcut immediately.",
category: "Scripting & Variables",
parameters: []
},
{
identifier: "is.workflow.actions.getitemfromlist",
name: "Get Item from List",
description: "Gets a specific item from a list by index or position.",
category: "Scripting & Variables",
parameters: [
{
name: "Get",
key: "WFItemSpecifier",
type: "enum",
required: true,
description: "Which item to get",
enumValues: ["First Item", "Last Item", "Random Item", "Item At Index", "Items in Range"]
},
{
name: "Index",
key: "WFItemIndex",
type: "number",
required: false,
description: "Index for Item At Index (1-based)"
},
{
name: "Start Index",
key: "WFItemRangeStart",
type: "number",
required: false,
description: "Start index for range"
},
{
name: "End Index",
key: "WFItemRangeEnd",
type: "number",
required: false,
description: "End index for range"
}
]
},
{
identifier: "is.workflow.actions.count",
name: "Count",
description: "Counts the number of items in a list or characters in text.",
category: "Scripting & Variables",
parameters: [
{
name: "Count Type",
key: "WFCountType",
type: "enum",
required: false,
description: "What to count",
enumValues: ["Items", "Characters", "Words", "Sentences", "Lines"],
defaultValue: "Items"
}
],
outputType: "Number"
},
{
identifier: "is.workflow.actions.number",
name: "Number",
description: "Creates a number value.",
category: "Scripting & Variables",
parameters: [
{
name: "Number",
key: "WFNumberActionNumber",
type: "number",
required: true,
description: "The number value"
}
],
outputType: "Number"
},
{
identifier: "is.workflow.actions.calculate",
name: "Calculate",
description: "Performs a mathematical operation.",
category: "Scripting & Variables",
parameters: [
{
name: "Operation",
key: "WFMathOperation",
type: "enum",
required: true,
description: "The math operation",
enumValues: ["+", "-", "*", "/", "Modulus", "Scientific"]
},
{
name: "Operand",
key: "WFMathOperand",
type: "number",
required: true,
description: "The second operand"
},
{
name: "Scientific Operation",
key: "WFScientificMathOperation",
type: "enum",
required: false,
description: "Scientific function",
enumValues: ["Square Root", "Absolute Value", "Round", "Floor", "Ceiling", "sin", "cos", "tan", "log10", "ln", "x^2", "x^3", "x^y", "e^x"]
}
],
outputType: "Number"
},
{
identifier: "is.workflow.actions.random",
name: "Random Number",
description: "Generates a random number within a range.",
category: "Scripting & Variables",
parameters: [
{
name: "Minimum",
key: "WFRandomNumberMinimum",
type: "number",
required: true,
description: "Minimum value (inclusive)"
},
{
name: "Maximum",
key: "WFRandomNumberMaximum",
type: "number",
required: true,
description: "Maximum value (inclusive)"
}
],
outputType: "Number"
},
// ========== DATA & DICTIONARIES ==========
{
identifier: "is.workflow.actions.dictionary",
name: "Dictionary",
description: "Creates a dictionary with key-value pairs.",
category: "Data & Dictionaries",
parameters: [
{
name: "Items",
key: "WFItems",
type: "dictionary",
required: true,
description: "Key-value pairs for the dictionary"
}
],
outputType: "Dictionary"
},
{
identifier: "is.workflow.actions.detect.dictionary",
name: "Get Dictionary from Input",
description: "Parses input (typically JSON) into a dictionary.",
category: "Data & Dictionaries",
parameters: [],
outputType: "Dictionary"
},
{
identifier: "is.workflow.actions.getvalueforkey",
name: "Get Dictionary Value",
description: "Gets a value from a dictionary by key.",
category: "Data & Dictionaries",
parameters: [
{
name: "Key",
key: "WFDictionaryKey",
type: "text",
required: true,
description: "The key to look up"
},
{
name: "Get Value",
key: "WFGetDictionaryValueType",
type: "enum",
required: false,
description: "What to retrieve",
enumValues: ["Value", "All Keys", "All Values"],
defaultValue: "Value"
}
]
},
{
identifier: "is.workflow.actions.setvalueforkey",
name: "Set Dictionary Value",
description: "Sets a value in a dictionary for a specific key.",
category: "Data & Dictionaries",
parameters: [
{
name: "Key",
key: "WFDictionaryKey",
type: "text",
required: true,
description: "The key to set"
},
{
name: "Value",
key: "WFDictionaryValue",
type: "text",
required: true,
description: "The value to set"
}
],
outputType: "Dictionary"
},
{
identifier: "is.workflow.actions.gettype",
name: "Get Type",
description: "Gets the content type of the input.",
category: "Data & Dictionaries",
parameters: [],
outputType: "Text"
},
{
identifier: "is.workflow.actions.base64encode",
name: "Base64 Encode",
description: "Encodes or decodes input using Base64.",
category: "Data & Dictionaries",
parameters: [
{
name: "Mode",
key: "WFEncodeMode",
type: "enum",
required: false,
description: "Encode or decode",
enumValues: ["Encode", "Decode"],
defaultValue: "Encode"
},
{
name: "Line Breaks",
key: "WFBase64LineBreakMode",
type: "enum",
required: false,
description: "Line break handling",
enumValues: ["None", "Every 64 Characters", "Every 76 Characters"],
defaultValue: "None"
}
]
},
// ========== SYSTEM & DEVICE ==========
{
identifier: "is.workflow.actions.getdevicedetails",
name: "Get Device Details",
description: "Gets information about the device.",
category: "System & Device",
parameters: [
{
name: "Detail",
key: "WFDeviceDetail",
type: "enum",
required: true,
description: "The detail to retrieve",
enumValues: ["Device Name", "Device Model", "System Version", "Screen Width", "Screen Height", "Current Volume", "Current Brightness", "Is Apple Watch Paired?", "Current Appearance"]
}
]
},
{
identifier: "is.workflow.actions.setbrightness",
name: "Set Brightness",
description: "Sets the screen brightness level.",
category: "System & Device",
parameters: [
{
name: "Brightness",
key: "WFBrightness",
type: "number",
required: true,
description: "Brightness level (0.0-1.0)"
}
]
},
{
identifier: "is.workflow.actions.setvolume",
name: "Set Volume",
description: "Sets the device volume level.",
category: "System & Device",
parameters: [
{
name: "Volume",
key: "WFVolume",
type: "number",
required: true,
description: "Volume level (0.0-1.0)"
}
]
},
{
identifier: "is.workflow.actions.openapp",
name: "Open App",
description: "Opens the specified app.",
category: "System & Device",
parameters: [
{
name: "App",
key: "WFAppIdentifier",
type: "text",
required: true,
description: "Bundle ID of the app to open"
}
]
},
{
identifier: "is.workflow.actions.wait",
name: "Wait",
description: "Pauses execution for a specified duration.",
category: "System & Device",
parameters: [
{
name: "Seconds",
key: "WFDelayTime",
type: "number",
required: true,
description: "Seconds to wait"
}
]
},
{
identifier: "is.workflow.actions.waittoreturn",
name: "Wait to Return",
description: "Pauses until the user returns to the Shortcuts app.",
category: "System & Device",
parameters: []
},
{
identifier: "is.workflow.actions.setappearance",
name: "Set Appearance",
description: "Sets the device appearance (light/dark mode).",
category: "System & Device",
parameters: [
{
name: "Appearance",
key: "WFAppearance",
type: "enum",
required: true,
description: "The appearance to set",
enumValues: ["Light", "Dark", "Toggle"]
}
]
},
{
identifier: "is.workflow.actions.getbatterylevel",
name: "Get Battery Level",
description: "Gets the current battery level percentage.",
category: "System & Device",
parameters: [],
outputType: "Number"
},
// ========== FILES & STORAGE ==========
{
identifier: "is.workflow.actions.documentpicker.open",
name: "Get File",
description: "Opens a file picker to select a file.",
category: "Files & Storage",
parameters: [
{
name: "Service",
key: "WFFileStorageService",
type: "enum",
required: false,
description: "Storage service to use",
enumValues: ["iCloud Drive", "Dropbox"],
defaultValue: "iCloud Drive"
},
{
name: "File Path",
key: "WFFilePath",
type: "text",
required: false,
description: "Path to the file (if not using picker)"
},
{
name: "Show Document Picker",
key: "WFShowFilePicker",
type: "boolean",
required: false,
description: "Show file picker dialog",
defaultValue: true
},
{
name: "Error If Not Found",
key: "WFFileErrorIfNotFound",
type: "boolean",
required: false,
description: "Show error if file not found",
defaultValue: true
}
],
outputType: "File"
},
{
identifier: "is.workflow.actions.documentpicker.save",
name: "Save File",
description: "Saves a file to iCloud Drive or other storage.",
category: "Files & Storage",
parameters: [
{
name: "Service",
key: "WFFileStorageService",
type: "enum",
required: false,
description: "Storage service to use",
enumValues: ["iCloud Drive", "Dropbox"],
defaultValue: "iCloud Drive"
},
{
name: "Destination Path",
key: "WFFileDestinationPath",
type: "text",
required: false,
description: "Path to save the file"
},
{
name: "Ask Where to Save",
key: "WFAskWhereToSave",
type: "boolean",
required: false,
description: "Prompt for save location",
defaultValue: true
},
{
name: "Overwrite If File Exists",
key: "WFSaveFileOverwrite",
type: "boolean",
required: false,
description: "Overwrite existing files",
defaultValue: false
}
],
outputType: "File"
},
{
identifier: "is.workflow.actions.file.delete",
name: "Delete Files",
description: "Deletes the specified files.",
category: "Files & Storage",
parameters: [
{
name: "Confirm Before Deleting",
key: "WFDeleteFileConfirmDeletion",
type: "boolean",
required: false,
description: "Ask for confirmation",
defaultValue: true
}
]
},
{
identifier: "is.workflow.actions.file.getfoldercontents",
name: "Get Contents of Folder",
description: "Gets files from a folder.",
category: "Files & Storage",
parameters: [
{
name: "Recursive",
key: "Recursive",
type: "boolean",
required: false,
description: "Include subfolders",
defaultValue: false
}
],
outputType: "List"
},
{
identifier: "is.workflow.actions.file.createfolder",
name: "Create Folder",
description: "Creates a new folder.",
category: "Files & Storage",
parameters: [
{
name: "Service",
key: "WFFileStorageService",
type: "enum",
required: false,
description: "Storage service",
enumValues: ["iCloud Drive", "Dropbox"],
defaultValue: "iCloud Drive"
},
{
name: "Path",
key: "WFFilePath",
type: "text",
required: true,
description: "Path for the new folder"
}
],
outputType: "Folder"
},
{
identifier: "is.workflow.actions.previewdocument",
name: "Quick Look",
description: "Displays a preview of the input.",
category: "Files & Storage",
parameters: []
},
{
identifier: "is.workflow.actions.share",
name: "Share",
description: "Opens the share sheet for the input.",
category: "Files & Storage",
parameters: []
},
{
identifier: "is.workflow.actions.showresult",
name: "Show Result",
description: "Displays the input in an alert.",
category: "Files & Storage",
parameters: []
},
// ========== CALENDAR & TIME ==========
{
identifier: "is.workflow.actions.calendar.add",
name: "Add New Event",
description: "Creates a new calendar event.",
category: "Calendar & Time",
parameters: [
{
name: "Title",
key: "WFCalendarItemTitle",
type: "text",
required: true,
description: "Event title"
},
{
name: "Location",
key: "WFCalendarItemLocation",
type: "text",
required: false,
description: "Event location"
},
{
name: "Start Date",
key: "WFCalendarItemStartDate",
type: "date",
required: true,
description: "Start date and time"
},
{
name: "End Date",
key: "WFCalendarItemEndDate",
type: "date",
required: true,
description: "End date and time"
},
{
name: "All Day",
key: "WFCalendarItemAllDay",
type: "boolean",
required: false,
description: "All-day event",
defaultValue: false
},
{
name: "Notes",
key: "WFCalendarItemNotes",
type: "text",
required: false,
description: "Event notes"
},
{
name: "Calendar",
key: "WFCalendarItemCalendar",
type: "text",
required: false,
description: "Target calendar"
}
],
outputType: "Calendar Event"
},
{
identifier: "is.workflow.actions.calendar.search",
name: "Find Calendar Events",
description: "Finds calendar events matching criteria.",
category: "Calendar & Time",
parameters: [
{
name: "Sort By",
key: "WFContentItemSortProperty",
type: "enum",
required: false,
description: "Sort order",
enumValues: ["Start Date", "End Date", "Title", "Location", "Creation Date", "Last Modified Date"],
defaultValue: "Start Date"
},
{
name: "Sort Order",
key: "WFContentItemSortOrder",
type: "enum",
required: false,
description: "Sort direction",
enumValues: ["Oldest First", "Latest First", "A to Z", "Z to A"],
defaultValue: "Oldest First"
},
{
name: "Limit",
key: "WFContentItemLimitEnabled",
type: "boolean",
required: false,
description: "Limit number of results"
},
{
name: "Limit Count",
key: "WFContentItemLimitNumber",
type: "number",
required: false,
description: "Maximum results"
}
],
outputType: "List"
},
{
identifier: "is.workflow.actions.currentdate",
name: "Current Date",
description: "Gets the current date and time.",
category: "Calendar & Time",
parameters: [],
outputType: "Date"
},
{
identifier: "is.workflow.actions.date",
name: "Date",
description: "Creates a date from text.",
category: "Calendar & Time",
parameters: [
{
name: "Date",
key: "WFDateActionDate",
type: "text",
required: true,
description: "Date string"
}
],
outputType: "Date"
},
{
identifier: "is.workflow.actions.format.date",
name: "Format Date",
description: "Formats a date as text.",
category: "Calendar & Time",
parameters: [
{
name: "Format",
key: "WFDateFormatStyle",
type: "enum",
required: false,
description: "Date format style",
enumValues: ["None", "Short", "Medium", "Long", "Relative", "RFC 2822", "ISO 8601", "Custom"],
defaultValue: "Medium"
},
{
name: "Custom Format",
key: "WFDateFormat",
type: "text",
required: false,
description: "Custom format string"
}
],
outputType: "Text"
},
{
identifier: "is.workflow.actions.adjustdate",
name: "Adjust Date",
description: "Adds or subtracts time from a date.",
category: "Calendar & Time",
parameters: [
{
name: "Operation",
key: "WFAdjustOperation",
type: "enum",
required: true,
description: "Add or subtract",
enumValues: ["Add", "Subtract", "Get Start of Minute", "Get Start of Hour", "Get Start of Day", "Get Start of Week", "Get Start of Month", "Get Start of Year"]
},
{
name: "Duration",
key: "WFDuration",
type: "number",
required: false,
description: "Amount to add/subtract"
},
{
name: "Unit",
key: "WFDurationUnit",
type: "enum",
required: false,
description: "Time unit",
enumValues: ["Seconds", "Minutes", "Hours", "Days", "Weeks", "Months", "Years"]
}
],
outputType: "Date"
},
// ========== PHOTOS & MEDIA ==========
{
identifier: "is.workflow.actions.takephoto",
name: "Take Photo",
description: "Takes a photo using the device camera.",
category: "Photos & Media",
parameters: [
{
name: "Camera",
key: "WFCameraCaptureDevice",
type: "enum",
required: false,
description: "Which camera to use",
enumValues: ["Front", "Back"],
defaultValue: "Back"
},
{
name: "Show Preview",
key: "WFCameraCaptureShowPreview",
type: "boolean",
required: false,
description: "Show preview before confirming",
defaultValue: true
},
{
name: "Photo Count",
key: "WFPhotoCount",
type: "number",
required: false,
description: "Number of photos to take",
defaultValue: 1
}
],
outputType: "Photo",
iosOnly: true
},
{
identifier: "is.workflow.actions.selectphoto",
name: "Select Photos",
description: "Opens the photo picker to select photos.",
category: "Photos & Media",
parameters: [
{
name: "Select Multiple",
key: "WFSelectMultiplePhotos",
type: "boolean",
required: false,
description: "Allow multiple selection",
defaultValue: false
}
],
outputType: "Photo"
},
{
identifier: "is.workflow.actions.getlatestphotos",
name: "Get Latest Photos",
description: "Gets the most recent photos from the library.",
category: "Photos & Media",
parameters: [
{
name: "Count",
key: "WFGetLatestPhotoCount",
type: "number",
required: false,
description: "Number of photos to get",
defaultValue: 1
},
{
name: "Include Screenshots",
key: "WFGetLatestPhotosIncludeScreenshots",
type: "boolean",
required: false,
description: "Include screenshots",
defaultValue: true
}
],
outputType: "Photo"
},
{
identifier: "is.workflow.actions.image.resize",
name: "Resize Image",
description: "Resizes an image to specified dimensions.",
category: "Photos & Media",
parameters: [
{
name: "Width",
key: "WFImageResizeWidth",
type: "number",
required: false,
description: "Target width in pixels"
},
{
name: "Height",
key: "WFImageResizeHeight",
type: "number",
required: false,
description: "Target height in pixels"
}
],
outputType: "Image"
},
{
identifier: "is.workflow.actions.image.rotate",
name: "Rotate Image",
description: "Rotates an image by a specified angle.",
category: "Photos & Media",
parameters: [
{
name: "Degrees",
key: "WFImageRotateAmount",
type: "number",
required: true,
description: "Rotation angle in degrees"
}
],
outputType: "Image"
},
{
identifier: "is.workflow.actions.image.convert",
name: "Convert Image",
description: "Converts an image to a different format.",
category: "Photos & Media",
parameters: [
{
name: "Format",
key: "WFImageFormat",
type: "enum",
required: true,
description: "Output format",
enumValues: ["JPEG", "PNG", "TIFF", "GIF", "HEIF", "BMP", "PDF", "Match Input"]
},
{
name: "Quality",
key: "WFImageCompressionQuality",
type: "number",
required: false,
description: "JPEG quality (0.0-1.0)",
defaultValue: 0.9
},
{
name: "Preserve Metadata",
key: "WFImagePreserveMetadata",
type: "boolean",
required: false,
description: "Keep image metadata",
defaultValue: true
}
],
outputType: "Image"
},
// ========== CONTACTS & COMMUNICATION ==========
{
identifier: "is.workflow.actions.sendmessage",
name: "Send Message",
description: "Sends a message via Messages app.",
category: "Contacts & Communication",
parameters: [
{
name: "Recipients",
key: "WFSendMessageActionRecipients",
type: "array",
required: true,
description: "Message recipients"
},
{
name: "Message",
key: "WFSendMessageContent",
type: "text",
required: true,
description: "Message content"
}
]
},
{
identifier: "is.workflow.actions.sendemail",
name: "Send Email",
description: "Sends an email.",
category: "Contacts & Communication",
parameters: [
{
name: "To",
key: "WFSendEmailActionToRecipients",
type: "array",
required: true,
description: "Email recipients"
},
{
name: "Subject",
key: "WFSendEmailActionSubject",
type: "text",
required: false,
description: "Email subject"
},
{
name: "Body",
key: "WFSendEmailActionBody",
type: "text",
required: false,
description: "Email body"
},
{
name: "CC",
key: "WFSendEmailActionCcRecipients",
type: "array",
required: false,
description: "CC recipients"
},
{
name: "BCC",
key: "WFSendEmailActionBccRecipients",
type: "array",
required: false,
description: "BCC recipients"
},
{
name: "Show Compose Sheet",
key: "WFSendEmailActionShowComposeSheet",
type: "boolean",
required: false,
description: "Show email compose sheet",
defaultValue: true
}
]
},
{
identifier: "is.workflow.actions.call",
name: "Call",
description: "Makes a phone call.",
category: "Contacts & Communication",
parameters: [],
iosOnly: true
},
{
identifier: "is.workflow.actions.facetime",
name: "FaceTime",
description: "Starts a FaceTime call.",
category: "Contacts & Communication",
parameters: [
{
name: "Type",
key: "WFFaceTimeType",
type: "enum",
required: false,
description: "Call type",
enumValues: ["Video", "Audio"],
defaultValue: "Video"
}
]
},
// ========== LOCATION & MAPS ==========
{
identifier: "is.workflow.actions.getcurrentlocation",
name: "Get Current Location",
description: "Gets the device's current location.",
category: "Location & Maps",
parameters: [],
outputType: "Location"
},
{
identifier: "is.workflow.actions.getaddressfromlocation",
name: "Get Address from Input",
description: "Gets a street address from location data.",
category: "Location & Maps",
parameters: [],
outputType: "Text"
},
{
identifier: "is.workflow.actions.searchlocalbusinesses",
name: "Search Local Businesses",
description: "Searches for nearby businesses.",
category: "Location & Maps",
parameters: [
{
name: "Search",
key: "WFSearchQuery",
type: "text",
required: true,
description: "Search query"
},
{
name: "Location",
key: "WFLocation",
type: "location",
required: false,
description: "Center location for search"
}
],
outputType: "Location"
},
{
identifier: "is.workflow.actions.getdirections",
name: "Show Directions",
description: "Opens Maps with directions.",
category: "Location & Maps",
parameters: [
{
name: "Mode",
key: "WFGetDirectionsActionMode",
type: "enum",
required: false,
description: "Travel mode",
enumValues: ["Driving", "Walking", "Transit"],
defaultValue: "Driving"
}
]
},
{
identifier: "is.workflow.actions.getdistance",
name: "Get Distance",
description: "Calculates distance between locations.",
category: "Location & Maps",
parameters: [
{
name: "Start Location",
key: "WFGetDirectionsCustomLocation",
type: "location",
required: true,
description: "Starting point"
},
{
name: "Unit",
key: "WFDistanceUnit",
type: "enum",
required: false,
description: "Distance unit",
enumValues: ["Miles", "Kilometers"],
defaultValue: "Miles"
},
{
name: "Route Type",
key: "WFGetDistanceRouteType",
type: "enum",
required: false,
description: "Type of distance",
enumValues: ["Direct", "Driving", "Walking"],
defaultValue: "Direct"
}
],
outputType: "Number"
},
// ========== SHELL (macOS) ==========
{
identifier: "is.workflow.actions.runshellscript",
name: "Run Shell Script",
description: "Executes a shell script on macOS.",
category: "Scripting & Variables",
parameters: [
{
name: "Script",
key: "WFShellScript",
type: "text",
required: true,
description: "Shell script code"
},
{
name: "Shell",
key: "WFShellScriptShell",
type: "enum",
required: false,
description: "Shell to use",
enumValues: ["/bin/bash", "/bin/zsh", "/bin/sh", "/usr/bin/perl", "/usr/bin/python3", "/usr/bin/ruby"],
defaultValue: "/bin/zsh"
},
{
name: "Input",
key: "WFShellScriptInputMode",
type: "enum",
required: false,
description: "How to pass input",
enumValues: ["to stdin", "as arguments"],
defaultValue: "to stdin"
}
],
outputType: "Text",
macOnly: true
},
// ========== REMINDERS ==========
{
identifier: "is.workflow.actions.reminders.add",
name: "Add New Reminder",
description: "Creates a new reminder.",
category: "Reminders & Tasks",
parameters: [
{
name: "Title",
key: "WFReminderTitle",
type: "text",
required: true,
description: "Reminder title"
},
{
name: "Notes",
key: "WFReminderNotes",
type: "text",
required: false,
description: "Reminder notes"
},
{
name: "Remind Me",
key: "WFReminderAlertCondition",
type: "enum",
required: false,
description: "When to remind",
enumValues: ["On a Day", "At a Location"]
},
{
name: "Alert Date",
key: "WFReminderDate",
type: "date",
required: false,
description: "Alert date and time"
},
{
name: "List",
key: "WFReminderList",
type: "text",
required: false,
description: "Reminder list"
},
{
name: "Priority",
key: "WFReminderPriority",
type: "enum",
required: false,
description: "Priority level",
enumValues: ["None", "Low", "Medium", "High"]
}
],
outputType: "Reminder"
},
{
identifier: "is.workflow.actions.reminders.search",
name: "Find Reminders",
description: "Finds reminders matching criteria.",
category: "Reminders & Tasks",
parameters: [
{
name: "Sort By",
key: "WFContentItemSortProperty",
type: "enum",
required: false,
description: "Sort order",
enumValues: ["Due Date", "Creation Date", "Title", "Priority", "Completion Date"],
defaultValue: "Due Date"
},
{
name: "Limit",
key: "WFContentItemLimitEnabled",
type: "boolean",
required: false,
description: "Limit results"
},
{
name: "Limit Count",
key: "WFContentItemLimitNumber",
type: "number",
required: false,
description: "Maximum results"
}
],
outputType: "List"
},
// ========== HOME AUTOMATION ==========
{
identifier: "is.workflow.actions.homekit.run.scene",
name: "Set Scene",
description: "Activates a HomeKit scene.",
category: "Home Automation",
parameters: [
{
name: "Scene",
key: "WFHMScene",
type: "text",
required: true,
description: "Scene to activate"
}
]
},
{
identifier: "is.workflow.actions.homekit.set.state",
name: "Control Home",
description: "Controls a HomeKit accessory.",
category: "Home Automation",
parameters: [
{
name: "Accessory",
key: "WFHMAccessory",
type: "text",
required: true,
description: "Accessory to control"
},
{
name: "Characteristic",
key: "WFHMCharacteristic",
type: "text",
required: true,
description: "Property to change"
},
{
name: "Value",
key: "WFHMValue",
type: "text",
required: true,
description: "New value"
}
]
}
];
// Helper function to get action by identifier
export function getActionByIdentifier(identifier: string): ActionDefinition | undefined {
// Handle both full identifier and short name
const fullId = identifier.startsWith("is.workflow.actions.")
? identifier
: `is.workflow.actions.${identifier}`;
return ACTIONS.find(a => a.identifier === fullId || a.identifier === identifier);
}
// Helper function to get actions by category
export function getActionsByCategory(category: string): ActionDefinition[] {
return ACTIONS.filter(a => a.category.toLowerCase() === category.toLowerCase());
}
// Helper function to search actions
export function searchActions(query: string): ActionDefinition[] {
const lowerQuery = query.toLowerCase();
return ACTIONS.filter(a =>
a.name.toLowerCase().includes(lowerQuery) ||
a.description.toLowerCase().includes(lowerQuery) ||
a.identifier.toLowerCase().includes(lowerQuery)
);
}