> For the complete documentation index, see [llms.txt](https://dreetje-1.gitbook.io/inbox-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dreetje-1.gitbook.io/inbox-ai/integrations/apple-shortcuts.md).

# Apple Shortcuts

Shortcuts allows you to run any shortcut using a [X-Callback-URL](/inbox-ai/integrations/x-callback-url.md) with the following format: `shortcuts://x-callback-url/run-shortcut?name={{ name | percentEncode }}&input=text&text={{ input | percentEncode }}`

In the "Other" folder there is a pre-built example to run an Apple Shortcut called "Run Apple Shortcut".&#x20;

You can add this action to any AI command and teach it to run specific Shortcuts, or duplicate it and change it to run a specific Shortcut. The latter option is more likely to have the correct results.

<figure><img src="/files/HFAhnRw0SV1AySS5ehlD" alt=""><figcaption></figcaption></figure>

Note that you can use [Action Variables](/inbox-ai/actions/action-variables.md) in the URL to give your AI more options.

## Alternative approach

You can also run shortcuts using the shortcuts terminal command like this, with the benefit of having their output available for a next action.

```bash
echo "{{ text | doubleQuoteEscape }}" > {{ dir.tmp }}/{{run.id}}
echo $(shortcuts run "{{ shortcut | doubleQuoteEscape }}" -i {{ dir.tmp }}/{{run.id}})
rm {{ dir.tmp }}/{{run.id}}
```
