When Device Connects

  1. A USB device connects.

Match USB Device

AND
  1. The USB device from USB Device Connected contains USB

Do

  1. Run Shortcut Shortcut with a timeout of 30 seconds

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

  1. Import with Open this Rule in Rulr and review the name Condition. Replace USB with a distinctive part of the device name you want to match.
  2. Choose an existing Shortcut in Run Shortcut. Run it manually in the Shortcuts app first and complete any permissions or configuration it needs.
  3. Review the timeout and any input required by your Shortcut. Connect an appropriate Trigger Variable if the task depends on device information.
  4. 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.