OAuth for iCloud developer guide

Expose Selected Synced Shortcuts as App Actions

Apple has no public API for running a user's Shortcuts. You can design one: the user approves named shortcuts, a Mac-side adapter runs them with the shortcuts command, and your app polls receipts. Figment has no shortcut endpoint.

Figment editorial teamPublished Updated Facts checked November 12, 2026

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 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, and the grant and receipt layer is a developer-owned adapter your team builds on top of the connection. Figment supplies no endpoint for shortcut listing or execution, so the design below is an integration pattern and not a ready-made product feature.

How do iCloud Shortcuts reach the Mac?

Through iCloud Sync in the Shortcuts app. The app synchronizes a user's whole collection across iPhone, iPad, Mac, Apple Watch, and Apple Vision Pro. 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 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 does not run there. Record Mac compatibility at grant time, not at invocation time, so your app never calls an action the Mac cannot run.

How should per-shortcut grants work?

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

  • 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, not an unbounded unknown set.

What should the action schema contain?

Record enough for each approved shortcut 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 the integration around shortcutId, not name. If the user renames the shortcut in their library, the identifier stays stable and the grant record stays valid.

How do execution and result receipts work?

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.
  • 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 instead of queuing silently.

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, and use a new key only after a confirmed failure or a deliberate new intent.

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.

Connect Apple data to your app

Register your app and start with synthetic sandbox data. Choose the permissions your app needs.

Connect Apple Account

Sandbox is free. Live access is $14 or $29 per connected Apple Account, per month.