Define a Trigger That Registers Itself with the Producer Application

Learn how to define a trigger that registers programmatically with the external application.

Ensure that a flow to register and deregister with the external application exists in the adapter definition document. For information on how to define a flow, see Invoke a POST API.
  1. In VS Code, click Explorer Explorer icon on the sidebar.
    The directory structure of your workspace folder is displayed.
  2. Within the definitions directory listing, click the adapter definition document that you want to work on.
    The document is displayed in the VS Code editor.
  3. In the triggers section of the document, define a pass-through trigger. See Define a Pass-Through Trigger.
  4. Add a subscription section that references the flows to register and deregister.

    Sample code:

    "triggers":{
       "pageChangeEvent": {
          "displayName": "Wiki Page Updated Event",
          "description": "This trigger detects when a Wiki Page Updated Event is raised.",
          "type": "webhook",
          "httpMethod": "POST",
          "request": {
            "schemaType": "application/schema+json",
            "schema": {
              "$ref": "#/schemas/eventSchema"
            }
          },
          "subscription": {
            "register": "flow:eventRegisterFlow",
            "deregister": "flow:eventDeregisterFlow"
          }
        }
    }