share Action

An action to show the macOS Share sheet.

{
  "share": {
    "type": "url",
    "src": "https://example.com"
  }
}

Properties

type
ENUM
Required

The type to be shared.

Value Description
"file" Treat the src as a file path.
"url" Treat the src as a URL.
src
STRING | ARRAY

The src of the item(s) to open, e.g. a file path or URL string.

Examples

Open a share sheet with a URL

{
  "type": "button",
  "text": "Share Alfred's homepage",
  "events": [
    {
      "triggers": "actioned",
      "action": {
        "type": "json",
        "src": {
          "share": {
            "type": "url",
            "src": "https://www.alfredapp.com"
          }
        }
      }
    }
  ]
}