Run Shortcut for USB Device
Start a Shortcut when a USB device connects
Use this Rule for a device-specific setup routine, such as beginning a task when a USB accessory becomes available. It listens for the connection, filters the device’s reported name, and starts an Apple Shortcut that you choose.
When: A USB device connects. If: Its Device Name contains USB. Do: Run Shortcut. The default filter is deliberately broad and the Shortcut is not selected, so both fields need review. The sample timeout is 30 seconds, and no device information is passed as Shortcut input by default.
Configure and try it
- Import with Open this Rule in Rulr and review the name Condition. Replace
USBwith a distinctive part of the device name you want to match. - Choose an existing Shortcut in Run Shortcut. Run it manually in the Shortcuts app first and complete any permissions or configuration it needs.
- Review the timeout and any input required by your Shortcut. Connect an appropriate Trigger Variable if the task depends on device information.
- Enable the Rule, disconnect the accessory, and reconnect it. Check the Shortcut’s expected result, then try another device to verify the filter is selective enough.
Requirements and limits
The sample’s components are available without Pro and declare no special permission. The chosen Shortcut can have its own app, folder, or system requirements.
A USB connection is not the same as a mounted storage volume being ready. The Rule does not automatically copy files, identify every accessory uniquely, or wait for a drive mount. For starting processing from file arrivals instead, see Run Shortcut for Folder.