> For the complete documentation index, see [llms.txt](https://docs.chatlayer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chatlayer.ai/chatlayer-documentation-pt-br/support/solving-bot-issues/3.-media-upload-not-working.md).

# O vídeo não está funcionando

Este artigo explicará como exibir um vídeo do YouTube (ou qualquer outro vídeo externo) no seu bot.

Digamos que você tenha um ótimo tutorial do Youtube que queira mostrar aos seus usuários. Mas quando você tenta adicionar isso em "Mídia" em uma mensagem do bot, você vê o seguinte vídeo:

![](https://181262846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-MbGbHb44ZPGDCMkDM86%2F-MbGfFWp77YieC3EJHhz%2Fimage.png?alt=media\&token=2845a099-df3a-4267-82a7-33c2775cd09f)

Não é exatamente o que estamos procurando, então vamos corrigir isso!

## 1. Copie o código de incorporação do vídeo

Primeiro, você precisa copiar o código de incorporação. Vá até o seu vídeo do Youtube e clique com o botão direito nele, depois escolha "Copiar código de incorporação", como na imagem abaixo:<br>

![Clique na 4ª opção para copiar o código de incorporação](https://181262846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-MbGbHb44ZPGDCMkDM86%2F-MbGd2Yc2f83s0iKGZJy%2Fimage.png?alt=media\&token=128ef051-6e3c-4800-900d-5d308a41c8fb)

## 2. Crie um bloco de Ação

Depois de copiar o código, volte para a plataforma e crie um bloco de Ação. Nesse bloco, clique em `IFrame` para criar um IFrame.

![Clique em IFrame para criar um IFrame](https://181262846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-MbGbHb44ZPGDCMkDM86%2F-MbGeOTb7K3q_RVvWZfU%2Fimage.png?alt=media\&token=6bff6512-940f-4049-876d-ddcb3b3660a0)

No IFrame, cole a `src` parte da URL incorporada anteriormente na Caixa de Entrada da Fonte. Para o vídeo acima, precisamos alterar isso:

```
<iframe width="1280" height="786" src="https://www.youtube.com/embed/yaYzSQn9rL4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
```

Para isto:

```
https://www.youtube.com/embed/yaYzSQn9rL4
```

Adicione este link ao bloco de Ação e defina uma altura que funcione para você. Vamos começar com 200 e ver como fica:

Agora seu bot exibirá o vídeo assim:

![](https://181262846-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LLTwFwbOqJj4dDhg8Ju%2F-MbGbHb44ZPGDCMkDM86%2F-MbGexNJZOaQ2zMZvKMM%2Fimage.png?alt=media\&token=31f79bf4-13aa-48a3-a22f-56f9baf557fd)

Ficou muito melhor!

Se, depois de ler este tutorial, você ainda encontrar algum problema, entre em contato com nossa [equipe de Suporte](mailto:support@chatlayer.ai). Estamos aqui para ajudar!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chatlayer.ai/chatlayer-documentation-pt-br/support/solving-bot-issues/3.-media-upload-not-working.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
