Compartilhar via


elementActions.handlers object

Defines an array of one or more handler objects for the Action. Each Action must have at least one handler. If an app has more than one handler defined, the host application will decide which action to display based on which experience is supported.

Properties that reference this object type:

Syntax

{
  "type": "openURL | openPage | openDialog | openTaskpane | invokeAPI | invokeBot",
  "supportedObjects": {
    "file": {
      file object
    },
    "folder": object | null
  },
  "supportsMultiSelect": {boolean},
  "pageInfo": {
    "pageId": "{string}",
    "subpageId": "{string}"
  },
  "dialogInfo": {
    "dialogType": "url | adaptiveCard",
    "url": "{string}",
    "width": "{string}",
    "height": "{string}",
    "parameters": [
      {
        parameters object
      }
    ],
    "title": "{string}"
  },
  "url": "{string}",
  "botInfo": {
    "botId": "{string}",
    "fetchTask": {boolean}
  }
}

Properties

type

Specifies the handler type for the Action. Required both for File Handlers and Content Actions.

Type
string

Required

Constraints

Supported values
Allowed values: openURL, openPage, openDialog, openTaskpane, invokeAPI, invokeBot.

supportedObjects

The supported object types that can trigger this Action.

Required

Constraints

Supported values

supportsMultiSelect

If true, multiple files can be selected and the action will still be displayed. If false or missing, the action is only displayed when a single item is selected.

Type
boolean

Required

Constraints

Supported values

pageInfo

Object containing metadata of the page to open. Required if the handler type is openPage.

Type
pageInfo

Required

Constraints

Supported values

dialogInfo

Type
dialogInfo

Required

Constraints

Supported values

url

Url for handler type openURL, invokeAPI, openTaskpane, and others.

Type
string

Required

Constraints

Supported values

botInfo

Type
botInfo

Required

Constraints

Supported values

Examples

{
  "handlers": [
    {
      "type": "openPage",
      "supportedObjects": {
        "file": {
          "extensions": [
            "doc",
            "pdf"
          ]
        }
      },
      "pageInfo": {
        "pageId": "newTaskPage",
        "subPageId": ""
      }
    }
  ]
}