# Embedding templates

This small snippet of JavaScript allows MESA templates to be displayed anywhere. Embedded MESA templates are great because they keep users on your site and are always up-to-date. Embedded MESA templates can go anywhere; on your blog, onboarding emails, FAQ's, or in your integrations page. You can specify a single template you'd like to embed or list all of an app's available templates.

### Installation

Add this `<script>` tag right above your closing `</body>` tag, and then add div tags where you would like the template(s) to appear.

```html
<script src="https://mymesa.site/widgets/widgets.js"></script>
```

### Show a single template

To display a specific template use the **data-template** attribute, whose value is the last part of the template's URL on getmesa.com. For example, use the code below to feature [this template.](https://www.getmesa.com/apps/shopify/integrate/googlesheets/send-order-to-google-sheets-document)

```html
<div data-template="send-order-to-google-sheets-document"></div>
```

### Show all available templates

To display all templates from an app, you will need to use a div with the attribute `data-app` and the value should be the app's name.

There is also an optional attribute to define the number of templates shown, which is the attribute `data-max-items`.

Here is an example of how to use the Shopify app:

```html
<div data-app="shopify" data-max-items="3"></div>
```


---

# 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.getmesa.com/for-developers/embedding-templates.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.
