# Triggering actions

Set up your Hubs or doors so that every time a certain event occurs, one or more actions are triggered

> **Example**
>
> A panic button locks down the site when pressed

**The following events can trigger actions:**

* Hub events:
  * Time of day
  * Hub tamper detected
  * Hub battery failure
  * Mains power failure
* Door events:
  * Door unlocked
  * Door locked
  * Access requested - Allowed
  * Reader tamper detected
  * Lock fails to energize
  * Door input opened
  * Door input closed
  * Door input state changed
* Input events:
  * Input opened
  * Input closed
  * Input state changed

**Events can trigger one or more of the following actions:**

* Site actions
  * Lock down site
* Door actions
  * Quick unlock doors
  * Unlock doors - toggle
    * Each time the event occurs, the selected doors will switch from being on schedule to unlocked and off schedule. [Read more about taking doors off schedule](/setting-access/taking-doors-off-schedule.md)
  * Lock doors - toggle
    * Each time the event occurs, the selected doors will switch from being on schedule to locked and off schedule. [Read more about taking doors off schedule](/setting-access/taking-doors-off-schedule.md)
* Hub actions
  * Send webhooks
  * Activate AUX outputs
  * Deactivate AUX outputs
  * Pulse AUX outputs

{% hint style="info" %}
Actions can only affect doors that are linked to the Hub associated with the trigger event
{% endhint %}

> **Example**
>
> A button behind the reception allows the receptionist to unlock the front door when they are at the reception and lock it when they are not

## Setting up a trigger

1. Go to **Site** **setup** and choose the site and floor where your Hub or door is located
2. Click on the Hub or door you want to trigger actions from
3. Go to the **Triggers** tab and click the **Add trigger** button in the upper right corner
4. Select a Hub, door, or input event as the trigger event. See above for the list of possible trigger events
5. Click **Add action** and select the action you want to trigger each time the trigger event occurs. See above for the list of possible actions
6. If relevant, configure which doors should be affected by the action. You can only select doors linked to to the Hub associated with the trigger event
7. Add more actions if required
8. Click **Save**
9. You have now set up your trigger, which will be listed under the **Triggers** tab

<div><figure><img src="/files/Jr8a6wp3rMTcw8bPqzxo" alt="" width="282"><figcaption></figcaption></figure> <figure><img src="/files/6epzC4V5ULvYpaOoobIU" alt="" width="282"><figcaption></figcaption></figure></div>

## Auditing triggered actions

Actions triggered by events are audited just like other user actions, so you're always aware of what's happening on your sites


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.accessia.com/site-setup/triggering-actions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
