Figment.so
Mac hostingWebsite hostingGuidesHow to usePricing

Expose Selected Synced Shortcuts as App Actions

Apple has no public API for running user-created Shortcuts. App Intents lets developers publish up to ten app-defined intents into the Shortcuts app (WWDC 2022, session 10170), but that surfaces developer-owned code to users—it does not give a server-side app access to the shortcuts a user has already built.

This guide covers the reverse direction: a user's iCloud-synced shortcuts become named, typed actions your backend can invoke. The execution surface is a Figment-hosted Mac. The grant and receipt layer is a developer-owned adapter your team builds on top of the connection. No Figment-supplied endpoint for shortcut listing or execution exists; the design below is an integration pattern, not a ready-made product feature.

How iCloud Shortcuts sync reaches the Mac

The Shortcuts app synchronizes a user's entire collection across iPhone, iPad, Mac, Apple Watch, and Apple Vision Pro via iCloud. To enable sync on Mac, the user opens the Shortcuts app, chooses Shortcuts → Settings, and enables iCloud Sync in the General pane. Additions, edits, deletions, and shortcut order mirror automatically across every device on the same Apple Account (Apple Support).

This synced library is the pool your adapter reads from.

One constraint is firm. Only Mac-compatible, installed actions can execute on the connected Mac. A shortcut built entirely from iOS-only steps appears in the library but will not run there. Record Mac compatibility at grant time, not at invocation time, so your app never attempts to call an action the Mac cannot run.

Per-shortcut grant design

The user selects specific shortcuts during Figment's app consent flow—a separate step from the initial Apple Account connection setup. Your adapter records only those selections. Your app receives a bounded, enumerable action set, not a catch-all permission to invoke anything in the user's library.

Three properties follow from this design:

  • Privacy. The user knows exactly which shortcuts your app can reach.
  • Auditability. Each invocation maps to a named, stable identifier in your records.
  • Predictability. Your integration handles a fixed list of typed actions rather than an unbounded unknown set.

Action schema

For each approved shortcut, record enough to validate and dispatch a call before the first invocation. A minimal schema entry:

FieldDescription
shortcutIdStable internal identifier assigned at grant time
nameDisplay name from the user's library at grant time
inputTypeExpected input: text, json, file, or none
outputTypeDeclared output: text, json, image, or none
macCompatibletrue if the shortcut can execute on the connected Mac
grantedAtISO timestamp of the user's approval
{
  "shortcutId": "shct_7xQpR4mN",
  "name": "Summarize Clipboard",
  "inputType": "text",
  "outputType": "text",
  "macCompatible": true,
  "grantedAt": "2026-11-12T10:00:00Z"
}

Build your integration around shortcutId, not name. If the user renames the shortcut in their library, the identifier stays stable and the grant record stays valid.

Execution and result receipt

The macOS shortcuts command-line tool is the execution surface. Your Mac-side adapter invokes it for approved shortcuts and returns a receipt your app can poll. The companion guide Run Mac Shortcuts from the Command Line covers the CLI mechanics in full; the key adapter design points are:

Persist intent before dispatch. Store the shortcut ID, input, idempotency key, and connection ID in a durable store before the first call. A network timeout must not lose the key.

One key per intended action. Generate a stable key tied to the specific business action, not a hash of the payload alone. Two separately intended invocations of the same shortcut with the same input must carry different keys.

Receipt states. A minimal receipt design maps to these states:

StateMeaning
submittedAdapter accepted the request; Mac execution pending
runningMac is actively executing the shortcut
completedExecution finished; output is available
failedShortcut returned an error or was cancelled
unknownOutcome not yet determinable

Never issue a new key for an unknown outcome. The shortcut may have already executed and produced a side effect. Poll the receipt with the original key. Use a new key only after a confirmed failure or a deliberate new intent.

Offline connections queue. If the Figment connection status is offline, submissions queue until the Mac reconnects. For latency-sensitive workflows, check connection status first and return a user-facing message rather than queuing silently.

Shortcuts work well alongside other Apple data sources. A shortcut that processes notes, files, or calendar events can be paired with read access to those stores through the same connection:

Connect Apple Account to start the connection setup and explore the sandbox.


Subscribe for Figma design and website publishing guides.


Figment.so

Contact

Twitter

Website pricing

Compute index

About

Privacy

Terms