Core Substitution Context
Stubref
Provides the stub reference from the core substitution context. Useful for links, public forms, webhooks, messages, and external systems that need to identify a stub.
One of the most common and useful substitutions in Stubber is referencing a stub’s unique reference number, commonly referred to as the stubref. This identifier allows you to keep track of specific stubs, especially when working with multiple stubs or performing actions that require precise identification.
Usage
You can use the substitution stub.stubref to dynamically insert the reference number of the current stub into your action definitions. This is particularly helpful when executing particular tasks such as stubmations, API calls, heimdall registration and deregistration, getting assistant chat logs or generating reports that need to include the stub's unique reference.
Example
Action definition:
Substituted definition:
In this example, the ~~stub.stubref substitution is replaced with the actual reference number of the stub (2024-01-18-XXXX-1234). This ensures that the correct reference is passed to the API call without needing to manually update the value.