# Complete Working Examples
Copy-paste ready examples that can be signed and imported.
## Example 1: Hello World
The simplest shortcut - displays "Hello World!".
```xml
WFWorkflowActions
WFWorkflowActionIdentifier
is.workflow.actions.gettext
WFWorkflowActionParameters
UUID
11111111-1111-1111-1111-111111111111
WFTextActionText
Hello World!
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Value
attachmentsByRange
{0, 1}
OutputName
Text
OutputUUID
11111111-1111-1111-1111-111111111111
Type
ActionOutput
string

WFSerializationType
WFTextTokenString
WFWorkflowClientVersion
2700.0.4
WFWorkflowHasOutputFallback
WFWorkflowIcon
WFWorkflowIconGlyphNumber
59511
WFWorkflowIconStartColor
4282601983
WFWorkflowImportQuestions
WFWorkflowMinimumClientVersion
900
WFWorkflowMinimumClientVersionString
900
WFWorkflowName
Hello World
WFWorkflowOutputContentItemClasses
WFWorkflowTypes
```
---
## Example 2: Ask User for Input
Asks user for their name and displays a greeting.
```xml
WFWorkflowActions
WFWorkflowActionIdentifier
is.workflow.actions.ask
WFWorkflowActionParameters
UUID
AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA
WFAskActionPrompt
What is your name?
WFInputType
Text
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Value
attachmentsByRange
{7, 1}
OutputName
Provided Input
OutputUUID
AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA
Type
ActionOutput
string
Hello, !
WFSerializationType
WFTextTokenString
WFWorkflowClientVersion
2700.0.4
WFWorkflowHasOutputFallback
WFWorkflowIcon
WFWorkflowIconGlyphNumber
59511
WFWorkflowIconStartColor
4282601983
WFWorkflowImportQuestions
WFWorkflowMinimumClientVersion
900
WFWorkflowMinimumClientVersionString
900
WFWorkflowName
Greeting
WFWorkflowOutputContentItemClasses
WFWorkflowTypes
```
---
## Example 3: AI Query
Asks user for a question, sends it to Apple Intelligence, and displays the response.
```xml
WFWorkflowActions
WFWorkflowActionIdentifier
is.workflow.actions.ask
WFWorkflowActionParameters
UUID
BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
WFAskActionPrompt
What would you like to ask?
WFInputType
Text
WFWorkflowActionIdentifier
is.workflow.actions.askllm
WFWorkflowActionParameters
UUID
CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC
WFLLMModel
Apple Intelligence
WFGenerativeResultType
Text
WFLLMPrompt
Value
attachmentsByRange
{0, 1}
OutputName
Provided Input
OutputUUID
BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB
Type
ActionOutput
string

WFSerializationType
WFTextTokenString
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Value
attachmentsByRange
{0, 1}
OutputName
Response
OutputUUID
CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC
Type
ActionOutput
string

WFSerializationType
WFTextTokenString
WFWorkflowClientVersion
2700.0.4
WFWorkflowHasOutputFallback
WFWorkflowIcon
WFWorkflowIconGlyphNumber
59511
WFWorkflowIconStartColor
4282601983
WFWorkflowImportQuestions
WFWorkflowMinimumClientVersion
900
WFWorkflowMinimumClientVersionString
900
WFWorkflowName
Ask AI
WFWorkflowOutputContentItemClasses
WFWorkflowTypes
```
---
## Example 4: Menu Demo
Presents a menu with three options, each displaying different text.
```xml
WFWorkflowActions
WFWorkflowActionIdentifier
is.workflow.actions.choosefrommenu
WFWorkflowActionParameters
GroupingIdentifier
DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD
WFControlFlowMode
0
WFMenuPrompt
What would you like to do?
WFMenuItems
Say Hello
Say Goodbye
Tell a Joke
WFWorkflowActionIdentifier
is.workflow.actions.choosefrommenu
WFWorkflowActionParameters
GroupingIdentifier
DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD
WFControlFlowMode
1
WFMenuItemTitle
Say Hello
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Hello there! Nice to meet you.
WFWorkflowActionIdentifier
is.workflow.actions.choosefrommenu
WFWorkflowActionParameters
GroupingIdentifier
DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD
WFControlFlowMode
1
WFMenuItemTitle
Say Goodbye
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Goodbye! See you next time.
WFWorkflowActionIdentifier
is.workflow.actions.choosefrommenu
WFWorkflowActionParameters
GroupingIdentifier
DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD
WFControlFlowMode
1
WFMenuItemTitle
Tell a Joke
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Why do programmers prefer dark mode? Because light attracts bugs!
WFWorkflowActionIdentifier
is.workflow.actions.choosefrommenu
WFWorkflowActionParameters
GroupingIdentifier
DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD
WFControlFlowMode
2
WFWorkflowClientVersion
2700.0.4
WFWorkflowHasOutputFallback
WFWorkflowIcon
WFWorkflowIconGlyphNumber
59511
WFWorkflowIconStartColor
4282601983
WFWorkflowImportQuestions
WFWorkflowMinimumClientVersion
900
WFWorkflowMinimumClientVersionString
900
WFWorkflowName
Menu Demo
WFWorkflowOutputContentItemClasses
WFWorkflowTypes
```
---
## Example 5: Weather + AI Report
Gets current weather and uses AI to generate a friendly report.
```xml
WFWorkflowActions
WFWorkflowActionIdentifier
is.workflow.actions.weather.currentconditions
WFWorkflowActionParameters
UUID
EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE
WFWorkflowActionIdentifier
is.workflow.actions.gettext
WFWorkflowActionParameters
UUID
FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
WFTextActionText
Value
attachmentsByRange
{56, 1}
OutputName
Weather Conditions
OutputUUID
EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE
Type
ActionOutput
string
Generate a friendly weather report based on this data:

Keep it brief and include clothing recommendations.
WFSerializationType
WFTextTokenString
WFWorkflowActionIdentifier
is.workflow.actions.askllm
WFWorkflowActionParameters
UUID
GGGGGGGG-GGGG-GGGG-GGGG-GGGGGGGGGGGG
WFLLMModel
Apple Intelligence
WFGenerativeResultType
Text
WFLLMPrompt
Value
attachmentsByRange
{0, 1}
OutputName
Text
OutputUUID
FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF
Type
ActionOutput
string

WFSerializationType
WFTextTokenString
WFWorkflowActionIdentifier
is.workflow.actions.showresult
WFWorkflowActionParameters
Text
Value
attachmentsByRange
{0, 1}
OutputName
Response
OutputUUID
GGGGGGGG-GGGG-GGGG-GGGG-GGGGGGGGGGGG
Type
ActionOutput
string

WFSerializationType
WFTextTokenString
WFWorkflowClientVersion
2700.0.4
WFWorkflowHasOutputFallback
WFWorkflowIcon
WFWorkflowIconGlyphNumber
59511
WFWorkflowIconStartColor
4282601983
WFWorkflowImportQuestions
WFWorkflowMinimumClientVersion
900
WFWorkflowMinimumClientVersionString
900
WFWorkflowName
Weather Report
WFWorkflowOutputContentItemClasses
WFWorkflowTypes
```
---
## How to Use These Examples
1. **Copy** the XML content
2. **Save** to a file with `.shortcut` extension (e.g., `HelloWorld.shortcut`)
3. **Sign** using the shortcuts CLI:
```bash
shortcuts sign --mode anyone --input HelloWorld.shortcut --output HelloWorld_signed.shortcut
```
4. **Import** by double-clicking the signed file or dragging to Shortcuts.app