> For the complete documentation index, see [llms.txt](https://docs.usepylon.com/pylon-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usepylon.com/pylon-docs/platform/macros.md).

# Macros

Set up macros to simplify sending templated responses and taking common actions on customer issues.

## Setup <a href="#setup" id="setup"></a>

Go to **Settings > Macros** and click **Create Macro**.

1. Set up a templated response using dynamic variables. Type `{` in the message to add a variable, such as the requester's first name or an issue custom field. See [Template variables](/pylon-docs/platform/triggers/template-variables.md#macros) for the full list. When a macro is used, this text will be pre-filled in the editor, and all you'll have to do is hit send! A macro can contain a reply, an internal note, or an email.
2. Set up actions that will be executed when the macro is used, such as adding a certain tag to an issue (for tracking and [Analytics](/pylon-docs/broadcasts/analytics.md)) or setting the state to closed.
3. Under **Which issues can use this macro?**, choose **All issues** or **Specific Issues** to set filters. For example, you can have different macros available for your team to use on Slack vs. Chat Widget questions.
4. Choose who can use and change the macro (see [Sharing](/pylon-docs/platform/macros.md#sharing)).

### Actions

A macro can run any of these actions, in the order you set:

* Set issue status
* Set issue assignee
* Set issue team
* Set custom field value
* Set issue tags
* Create internal thread (when [internal threads](/pylon-docs/support-workflows/issues/internal-threads.md) are available in your workspace)
* Send Slack notification
* Alert on issue
* Send survey

## Sharing

Use **Who can view?** to choose who can use the macro: **Anyone**, **Some members** (specific users and teams), or **Only me**. Use **Who can edit?** to choose who can change it. Editors can also change the macro's sharing settings and delete it.

## Organization

Macros can be placed into different groups for better organization. When executing macros from an issue, you'll be able to click into groups as well to find a specific macro.

<figure><img src="https://982123570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hXBoCTTNw5flARlUVJf%2Fuploads%2FgfpDiEx2oqA72MwFof7R%2FCleanShot%202024-11-09%20at%2016.43.37.png?alt=media&amp;token=711dacc8-d75e-410b-8545-bbcfebc47a37" alt=""><figcaption></figcaption></figure>

To move several macros to another group at once, select them and click **Move**. To copy a macro, open it and choose **Duplicate** from the **More actions** menu.

## Version history

Each time a macro is saved, Pylon keeps a version. Open a macro and choose **Version History** from the **More actions** menu to see each version, when it was published, and who modified it. Click **Show version** to open a read-only snapshot, then click **Copy Content** to reuse its text.

## Usage <a href="#usage" id="usage"></a>

Once you set up some Macros, you can access them from inside your text editor on an issue by clicking the lightning bolt. You can also press `m` when you're not typing, or `Cmd-M` / `Ctrl-M` while you're typing in the editor.

Here you can search for macros by name and also see a preview of the macro before hitting send. This gives you the opportunity to make any tweaks that might be needed before it's sent.

<figure><img src="https://982123570-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9hXBoCTTNw5flARlUVJf%2Fuploads%2F7h8AIxoreXdHnTnJge4u%2FCleanShot%202024-11-09%20at%2014.01.12.png?alt=media&amp;token=a65fe4ae-c3c2-47da-9bb6-4a9fd78882cb" alt=""><figcaption></figcaption></figure>


---

# 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.usepylon.com/pylon-docs/platform/macros.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.
