For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build a custom automation plugin

Extend automations with a custom action.

Your goal

Add a step to an automation that the standard nodes cannot do - trigger an action in one of your systems.

Expected outcome

A deployed plugin your users can attach to the corresponding node in an automation.

Which plugin type you need

You want to
Plugin type
Node it attaches to

Trigger an action that is not in the standard list

Custom action (SCENARIO_CUSTOM_ACTION)

A custom action node

A custom action plugin follows the creation and deployment procedure in Build a custom feed plugin, and must read its instance to adapt to its configuration.

Custom action

A custom action plugin can be associated with a custom action node in an automation, letting you trigger an action from within a scenario. Use it for actions not available in the standard list.

The one endpoint

POST myworker/v1/scenario_custom_actions

Called any time a UserPoint goes through a custom action node.

Request field
Type
Description

user_point_id

String

The ID of the UserPoint.

custom_action_id

String

The ID of the custom action plugin instance. Used to retrieve the instance properties.

Read the instance

Using custom_action_id from the incoming request. The response includes the instance's name, organisation_id, group_id, artifact_id, creation_ts, created_by, version_id, and version_value.

The request gives you a user_point_id and nothing else about the user. If your action needs profile or activity data, fetch it - see Server-side events for the selector syntax.

Common concerns

Concern
Guidance

External calls

Every host you call must be declared as an external service and enabled by mediarithmics.

Rate limits

Configure a throttling on the version if the partner has API limits.

Automation limits

Automations have their own default limits - scenarios, nodes, wait nodes, UserPoints woken per hour. See Platform limits.

Logs

Add context to every log line so you can filter to one instance, and keep the volume low. See Build an activity analyzer.

Verify

  • A test UserPoint going through the node reaches your plugin.

  • The plugin reads its instance properties rather than a hard-coded configuration.

Last updated

Was this helpful?