> 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/support/solving-bot-issues/3.-media-upload-not-working.md).

# Video isn't working

This article will explain how to show a Youtube video (or any other external video) in your bot.

Let's say, you have a great Youtube tutorial that you want to show to your users. But when you try and add this to 'Media' in a Bot message, you see the following video:

![](https://2786867680-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)

Not exactly what we are looking for, so let's fix that!

## 1. Copy the video's embed code

First, you need to copy the embed code. Go to your Youtube video and right-click on it, then choose 'Copy embed code' like in the screenshot below:<br>

![Click on the 4th option to copy the embed code](https://2786867680-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. Create an Action block

Once you've copied the code, go back to the platform and create an Action block. In that block, click on `IFrame` to create an Iframe.

![CLick on IFrame to create an IFrame](https://2786867680-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)

In the IFrame, past the `src` part of the previously embedded URL in the Source Input Box. For the video above, we need to change this:

```
<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>
```

To this:

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

Add this link to the Action block and set a height that works for you. Let's start with 200 and see how that looks:

Your bot will now display the video like this:

![](https://2786867680-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)

Looks a lot better!

If after reading this tutorial, you still run into any issues, please contact our [Support team](mailto:support@chatlayer.ai). We're here to help!


---

# 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/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.
