> ## Documentation Index
> Fetch the complete documentation index at: https://mozdocs.mozartfintech.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webflow

Dirígete a la pestaña Compartir de tu bot y haz clic en el botón de Webflow para obtener las instrucciones de inserción de tu bot.

## Guías avanzadas

### Activar un comando de mozbot al hacer clic en un botón

1. Dirígete a la pestaña `Configuración` de tu botón y añade un `ID` dedicado.
2. En el elemento `Embed` de tu mozbot, inserta este código en la etiqueta `<script>` existente:

```js
document.getElementById('BUTTON_ID').addEventListener('click', (event) => {
  event.preventDefault()
  Mozbot.open()
})
```

Puedes añadir tantos como desees si necesitas abrir el bot en varios clics de botón.

Debería verse así:

```html
<script type="module">
  import Mozbot from 'https://cdn.jsdelivr.net/npm/@mozbot/js@0.3/dist/web.js'

  Mozbot.initPopup({
    mozbot: 'my-mozbot',
  })

  document.getElementById('BUTTON_ID_1').addEventListener('click', (event) => {
    event.preventDefault()
    Mozbot.open()
  })

  document.getElementById('BUTTON_ID_2').addEventListener('click', (event) => {
    event.preventDefault()
    Mozbot.open()
  })
</script>
```

Asegúrate de reemplazar `BUTTON_ID_1` y `BUTTON_ID_2` con el ID que añadiste en tus elementos de botón.

En este ejemplo estamos abriendo el popup cuando se hace clic en los botones especificados, pero también podrías usar cualquiera de los [comandos disponibles](./libraries/html-javascript#commands).
