Custom events

In this section, you can find any created custom events in the Event tab on the Orchestrate page.

The custom event is a user-defined event created manually through the Event editor. It allows users to specify the required keys and values in the payload based on their specific needs. This enables manually triggering actions in the pipeline with custom values, without waiting for events to occur in SuperAnnotate automatically. Check how to create custom events here.

Configuration

To include a custom event in your pipeline that you've created, navigate to the pipeline editor and select the event card from the available custom events list in the left panel.

🚧

Limitations and restrictions

  • Action type: The Custom event cannot be connected to the Send Email action.
  • Card limit: Only one Custom event card can be used in a pipeline at a time.

Custom action Input JSON

When a Custom action is triggered by a Custom event, the input JSON will vary based on the value types defined for the event and will be included in the custom_event object within the Event's Input JSON. If the event does not contain any keys, the object will be empty. For keys without assigned values, the corresponding values in the JSON will be null.

📘

Note

The input values will be passed to each action in the chain until the last one.

For detailed descriptions of each key, please refer to the key dictionary. See the possible Event object example for the custom event:

{
    "uuid": 2783511,
    "event": "Manual trigger",
    "pipeline_id": 0,
    "trigger_result_id": 3456,
    "ts_ms": 1714729467825.9348,
    "custom_event": {
        "Source": [
            {
                "name": "Project A",
                "id": 123,
                "folders": [
                    { "name": "Folder A", "id": 1 },
                    { "name": "Folder B", "id": 2 }
                ]
            },
            {
                "name": "Project C",
                "id": 234,
                "folders": null
            }
        ],
        "Destination folder": "Test",
        "Performance score": 5
    }
}

The content of the Context object will be empty for this type of event.

Send Webhook Request

When a Send webhook action is triggered by the Custom event, the Request JSON will be structured as shown below. For detailed descriptions of each key, please refer to the key dictionary.

{
    "Accept": "application/json;charset=UTF-8",
    "X-Event": "<event_name>",
    "X-Delivery": "1781581",
    "Content-Type": "application/json",
    "X-Authorization-Content-SHA256": "<autogenerated_key>"
}

The Payload sent in the HTTP POST request includes JSON-formatted data, the content of which varies based on the value types defined for the event. If the event does not contain any keys, the Payload will be empty. For keys without assigned values, the corresponding values in the JSON will be null.

For detailed descriptions of each key, please refer to the key dictionary. See the possible Payload example for the custom event:

{
    "Source": [
      {
        "name": "Project A",
        "id": 123,
        "folders": [
          { "name": "Folder A", "id": 1 },
          { "name": "Folder B", "id": 2 }
        ]
      },
      {
        "name": "Project C",
        "id": 234,
        "folders": null
      }
    ],
    "Destination folder": "Test",
    "Performance score": 5
}