# How to know when users save or export

> Events, webhooks and custom buttons — wire the embed into your product's workflows

- **URL**: https://orshot.com/help/embed-react-to-user-actions

---

When a user saves a design in your embed, your app probably wants to do something — store it, render it, move them to the next step. Three mechanisms, from light to heavy:

## 1. Events (in the browser)

Expand **Events & Integrations** and turn on **Enable Events** — the embed then posts messages to your page:

![The Events & Integrations settings with webhook URL](https://orshot.com/help/embed/events-1-settings.webp)```javascript
window.addEventListener("message", (event) => {
  if (!event.origin.includes("orshot.com")) return;
  const { type, data } = event.data;
  if (type === "orshot:template:update") {
    // data.id, data.name — the user just saved
  }
});
```Events fire for template create/update, every download format, and more — see the [events reference](https://orshot.com/docs/orshot-embed/events). You can also *request* the current design as PNG, PDF or HTML at any moment.

## 2. Webhooks (on your server)

Add a **Webhook URL** in the same section — Orshot POSTs `template.create`, `template.update` and `template.delete` to your endpoint with the template data. Best for syncing to your database; respond within 10 seconds.

## 3. Custom buttons (in the toolbar)

**Custom Buttons** adds your own actions to the editor toolbar — like a **Save to App** button that emits the design as base64 PNG/PDF straight to your code, no download dialog. Configure label, colors and action type per button — see the [custom buttons docs](https://orshot.com/docs/orshot-embed/custom-buttons).

## Related