Using Event Data in Actions
When an alert fires, TipLink has information about the event that triggered it, like the viewer's name, the donation amount, or the message they included. You can insert this information directly into your action text using a simple {{ }} syntax.
No coding needed. Just curly braces around a field name.
How It Works
Anywhere you can type text in an action (overlay message, Discord message, chat message, etc.), you can use a template variable to insert live event data.
Basic format:
{{ fieldName }}
Example - Overlay message:
{{ username }} just donated {{ value }}!
If username is "CoolViewer42" and value is 10, TipLink sends:
CoolViewer42 just donated 10!
Common Event Fields
These fields are available in most events. Exact availability depends on the platform and event type.
| Field | What it contains | Example output |
|---|---|---|
{{ username }} | The viewer's username or display name | CoolViewer42 |
{{ value }} | The numeric value of the event (donation amount, sub count, bits) | 10 |
{{ message }} | The message the viewer included | Keep it up! |
{{ currency }} | The currency of a donation | USD |
{{ type }} | The event type | donation |
{{ platform }} | The platform the event came from | twitch |
Open the Activity page, find an event, and click the magnifying glass icon to view its full details. All fields listed under metadata can be used in the format {{ fieldName }}.
For example, if you see metadata.id, you can access it with {{ id }}.
Fallback Values
If a field doesn't exist in the event data, TipLink will output nothing (an empty string) by default.
To show a different value when a field is missing, add a fallback using |:
{{ username | "Anonymous" }}
- If
usernameexists: shows the actual username. - If
usernameis missing: showsAnonymous.
Examples:
{{ message | "No message provided" }}
{{ currency | "USD" }}
{{ value | 0 }}
Nested Fields
If the field you want is nested (e.g. metadata.profilePicture), TipLink automatically flattens event data so you can access it directly.
Example: To access root.data.metadata.id, you write {{ id }}.
Using Action Output Data
You can also use the result of one action in another action on the same alert. This is useful for showing calculated values, like the final shock intensity.
Format:
{{ actionType.operationKey.fieldName }}
Examples:
{{ pishock.main_op.intensity }} ← PiShock intensity %
{{ pishock.main_op.duration }} ← PiShock duration (seconds)
To see what fields an action exposes, look at the action's documentation page.
Practical Examples
Show the donor name and amount
{{ username }} donated {{ value }} {{ currency }}! Thank you!
With a fallback for anonymous donations
{{ username | "Someone" }} tipped {{ value | "an amount" }}. Thank you!
Discord webhook message
**{{ username }}** donated **${{ value }}**
Message: {{ message | "*(no message)*" }}
Variable-based death counter in overlay
Deaths today: {{ variables.death_count }}
Math Transforms
Numeric placeholder values support inline mathematical operations using the pipe (|) syntax. This lets you convert raw event values into the units you actually want - for example, converting bits to dollars, or formatting a value to two decimal places.
Place the operation after the field name, separated by a pipe:
{{ fieldName | operator }}
Available operators:
| Operator | What it does |
|---|---|
* N | Multiply by N |
/ N | Divide by N |
+ N | Add N |
- N | Subtract N |
toFixed:N | Round to N decimal places |
Examples:
{{ value | * 100 }}
{{ tokens | / 100 }}
{{ amount | + 5 }}
{{ amount | - 3 }}
{{ amount | toFixed:2 }}
Chaining Transforms
You can chain multiple transforms together. They apply left to right:
{{ bits | * 0.01 | toFixed:2 }}
If
bitsis1337, the result is13.37.
{{ tokens | / 100 | toFixed:2 }}
If
tokensis999, the result is9.99.
{{ amount | * 2 | + 1 }}
If
amountis5, the result is11.
Chaining with a Fallback
A fallback string can be placed at the end of a transform chain:
{{ value | * 0.01 | toFixed:2 | "0.00" }}
If
valueis missing, shows0.00. If present, the math transforms apply first.
Safety Notes
- If the value is not a number, the math transforms are skipped and the original value passes through unchanged.
- Division by zero returns the original value unchanged.
Tips
- Template variables work in all text fields across all action types - overlay messages, Discord messages, chat messages, HTTP request bodies, and more.
- Field names are case-sensitive.
usernameandUsernameare different. - You can mix static text and template variables freely in the same field.
- If you see a blank output when testing, check the event's detail view (Activity → magnifying glass) to confirm the field name and spelling.