Events in Actions
When an Action is triggered by an event, ChartHop makes the event's data available as variables you can use in your trigger conditions and message templates.
Understanding the structure of those variables helps you write precise conditions โ especially when you only want an Action to fire when a specific field changed.
Event types
Every event has a type that describes what happened. Update events follow this format:
change.update.<entity>For example:
- change.update.hire โ a hire record was updated
- change.update.job โ a job record was updated
You can see the event type that fired an Action in its run log.
event.before and event.update
When an update event fires, two variables give you access to the field values involved in that specific change:
Variable | What it contains |
|---|---|
event.before.<field> | The value of the field before this update |
event.update.<field> | The new value being written by this update |
These variables are scoped to the specific fields touched by this event. If a field wasn't part of the update, event.update.<field> will be empty.
Example: Only trigger when startDate changes
Suppose you have an Action on change.update.hire and want it to fire only when startDate is modified โ not when other fields like announceDate are updated.
Use this condition:
event.update.date != event.before.dateThis checks whether the startDate (stored as date on the event) was part of this update and has a different value than before. If startDate wasn't touched, the condition won't match and the Action won't fire.
Tip: Print event values to debug
If you're not sure what an event contains, add a Send Message step that prints the before and after values. For example:
Before: {{event.before.date}}
After: {{event.update.date}}Trigger the event manually, then check the message to see exactly what values ChartHop captured. This is the fastest way to understand what's in the event before writing your condition.
