# What is the event-based or scheduled automation context?
In event-based actions (triggers) and scheduled actions, you can expand the default context.


The context is the data and variables that are available to an automatic action (**macro**, **outbound email**, **outbound webhook**, or **script**) at the runtime.

![](https://support.swarmica.com/attachments/L/o/Logiha4dOzJ1Hdb6_a/Swarmica_what_is_automation_context_EN.jpg)

### The structure of the context


The context is a key-value storage that can hold any values serializable to JSON.
By default, an event trigger passes the event object that triggered this trigger in the `event` key.
If an action is initiated by a user, for example, through a web form, then the parameters of the web form and their values are also added to the context in the form of `"variable": "value"`.
If necessary, you can add variables to the context to use them by default in the key-value format in JSON format:

```json
{
  "my_custom_variable": {
    "foo": "bar"
  }
}
```

And then refer to these values in automation templates, for example, in a webhook or email:

```html
<p>Hello, {{ my_custom_variable.foo }}</p>
```