ActionOpenURL

Opens a given URL using the system's default handler.

Provide a string to open a single URL or an array of strings to open multiple URLs at once.

  • type: "open-url"
  • url: The URL to open. You can use any valid URI schema for example: https:// , file:// , ssh:// , slack:// .
Open a URL in your web browserOpen multiple URLsDisplay a list of URLs to openOpen a folder in Finder on MacOpen a Slack Channel in the Slack desktop app
Copy
Copied
{
  "action": {
    "type": "paste",
    "value": "Hello, world!"
  }
}
Copy
Copied
{
  "action": {
    "type": "open-url",
    "url": [
        "https://google.com/",
        "https://bing.com/"
    ]
  }
}
Copy
Copied
{
  "view": {
    "type": "list",
    "options": [
      {
        "title": "Open Google",
        "action": {
          "type": "open-url",
          "url": "https://www.google.com/"
        }
      },
      {
        "title": "Open Bing",
        "action": {
          "type": "open-url",
          "url": "https://www.bing.com/"
        }
      }
    ]
  }
}
Copy
Copied
{
  "action": {
    "type": "open-url",
    "url": "file:///Users/Katie/Downloads",
  }
}
Copy
Copied
{
  "action": {
    "type": "open-url",
    "url": "slack://channel?team=TA4PV0NH4&id=CR7EDED9Q"
  }
}

ActionCopy

Copies some text to the clipboard.

  • type: "copy"
  • value: The string that will be copied to the clipboard.
Copy text to the clipboardDisplay a list of URLs to copy to the clipboard
Copy
Copied
{
  "action": {
    "type": "copy",
    "value": "Hello, world!"
  }
}
Copy
Copied
{
  "view": {
    "type": "list",
    "options": [
      {
        "title": "Copy Google URL",
        "action": {
          "type": "copy",
          "value": "https://www.google.com/"
        }
      },
        {
        "title": "Copy ClickUp URL",
        "action": {
          "type": "copy",
          "value": "https://clickup.com/"
        }
      }
    ]
  }
}

ActionPaste

Pastes some text to the active app.

  • type: "paste"
  • value: The string that will be pasted to the active app.
Paste text into the active appDisplay a list of items to paste into the active app
Copy
Copied
{
  "action": {
    "type": "paste",
    "value": "Hello, world!"
  }
}
Copy
Copied
{
  "view": {
    "type": "list",
    "options": [
      {
        "title": "Paste my personal email",
        "action": {
          "type": "paste",
          "value": "katieshore@gmail.com"
        }
      },
      {
        "title": "Paste my work email",
        "action": {
          "type": "paste",
          "value": "katie@company.com"
        }
      }
    ]
  }
}

ActionShowToast

Shows a message in a toast (an ephemeral message displayed on the screen).

  • type: "show-toast"
  • message: The message that will be displayed in a toast.
Copy
Copied
{
  "view": {
    "type": "list",
    "options": [
      {
        "title": "Show a Message",
        "action": {
          "type": "show-toast",
          "message": "The task has been successfully completed!"
        }
      }
    ]
  }
}

ActionMoveAddParam

You can allow users to perform additional operations by defining a parameter for the move action.

When a user presses tab instead of pressing enter or return, you can display a view with additional actions that refer to the original command.

See the practical example of copying special characters.

  • type: "add-param"
  • name: The name of the parameter.
  • value: The value of the parameter.
Copy
Copied
{
  "view": {
    "type": "masonry",
    "options": [
      {
        "imageURL": "https://images.unsplash.com/photo-1481819613568-3701cbc70156",
        "action": {
          "type": "open-url",
          "url": "https://images.unsplash.com/photo-1481819613568-3701cbc70156"
        },
        "moveAction": {
          "type": "add-param",
          "name": "image",
          "value": "moon"
        }
      }
    ]
  }
}