[Cotlet](https://cotlet.dev/index.md) · [Integrations](https://cotlet.dev/integrations.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Use cases](https://cotlet.dev/use-cases.md) · [Security](https://cotlet.dev/security.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# Clean up stale Gorgias macros and rules

> Review Gorgias macros and rules, find stale and overlapping ones, then archive macros and switch off rules after your OK. Runs weekly.

Source: https://cotlet.dev/integrations/gorgias-api-mcp-server/clean-up-macros-and-rules

After a year of peak seasons a Gorgias helpdesk holds hundreds of macros and dozens of rules, and nobody knows which still run or which now fight each other.

Cotlet does it in your own Gorgias account with list\_macros, list\_rules, list\_tags, update\_macro and update\_rule, called by your AI agent, an n8n workflow or a script.

[Sign up free](https://cotlet.dev/app/signup?app=gorgias) [All Gorgias tools](https://cotlet.dev/integrations/gorgias-api-mcp-server.md)

Hosted · nothing to install or maintain

## Can Gorgias do this on its own?

Gorgias has no report of unused macros or overlapping rules in the app (checked 17 Oct 2026). The REST API has full create, update and delete for macros and rules. The official MCP can review macros, rules and tags, but macro edits are gated during the beta, so it can find the stale ones and not archive them.

## How you do it in Gorgias today

1. A Lead or Admin opens the helpdesk dropdown menu in the top-left, goes to Workflows, then Tools, then Macros.
2. The admin scans the macro list, opens each macro to read its text and actions, and archives the ones that are out of date.
3. Under Workflows, Tools, Rules the admin opens each rule, reads its trigger, conditions and actions and turns off the ones that no longer fit.
4. Tags used in macros and rules cannot be deleted, so the admin removes a tag from each macro and rule before deleting it.
5. Rules run in a fixed order, so a change to one rule can change what a later rule sees, which makes the review slow and easy to put off.

## How to clean up stale Gorgias macros and rules

Prompt

```
Review my Gorgias macros and rules. List the ones nobody used in 90 days, archive stale macros after I confirm, and turn off rules that overlap.
```

1. 01  
### Read every macro  
list\_macros pages through all macros with name, text and actions, so a helpdesk near the 5,000 macro limit is read as a whole.
2. 02  
### Read every rule  
list\_rules returns each rule with trigger, conditions and actions in the order they run. Rules with the same trigger and condition are grouped as overlap candidates.
3. 03  
### Map the tags  
list\_tags shows which tags macros and rules still use, so the agent warns before a cleanup would leave a tag in use.
4. 04  
### Propose, do not change  
The agent reports stale macros, overlapping rules and unused tags with the reason for each. Nothing is edited at this step.
5. 05  
### Archive and switch off  
update\_macro archives the macros you approve, and update\_rule turns off the rules you approve. Each call asks for your OK, because both change what the whole team and your customers see.

### What you get back

Example data

```
Macros read: 214, rules read: 41
Stale macros 23 (older holiday promos, e.g. "Black Friday 2024 shipping")
Overlapping rules 3 (two rules both set Returns on "return")
Tags used by no macro or rule: 6
Archived 20 macros, turned off 2 rules after your OK
Left for you: 3 macros that mention a discount code
```

### Other ways to ask

- Every month, list macros that mention a date in the past and archive none.
- Find rules that send a reply to the customer and list them with their conditions.
- Show me which macros add the tag refund, so I can merge them into one.
- Turn off every rule that was last edited before 2025, after I check the list.

## What Gorgias allows, and what to know first

- Only Lead and Admin can create, edit, archive or delete macros and rules in Gorgias; the other roles cannot view rules at all.
- A Gorgias helpdesk holds at most 5,000 macros and at most 70 rules.
- Tags currently used in macros or rules cannot be deleted, so an unused tag is only deletable after the cleanup.
- Rules with the same trigger run top to bottom in the order listed on the Rules page, so the order is part of what the agent reads.
- When a rule replies to a ticket, it counts as a billable ticket, which is why a stale reply rule has a cost.

update\_macro and update\_rule ask for your OK by default. To run it weekly without you, switch confirmation off for those tools in your dashboard.

Sources: [Gorgias Help: Macros, create and manage macros](https://docs.gorgias.com/en-US/macros-101-81846) · [Gorgias Help: Create rules to take automatic actions on tickets](https://docs.gorgias.com/en-US/create-rules-to-take-automatic-actions-on-tickets-81746) · [Gorgias Help: User permissions](https://docs.gorgias.com/en-US/user-permissions-196938) · [Gorgias updates: Gorgias MCP is now in open beta](https://updates.gorgias.com/publications/gorgias-mcp-is-now-in-open-beta)

## Call update\_macro from a script

curl

```
curl -X PATCH https://cotlet.dev/api/v1/gorgias/macros/3021 \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"archived":true}'
```

Example response

```
{
"macro_id": 3021,
"name": "Black Friday 2024 shipping",
"archived": true
}
```

MCP: add https://cotlet.dev/mcp/v1 with the same key; the call is gorgias\_write → update\_macro. Example data.

[Schedule it in n8n, Make, Zapier or cron](https://cotlet.dev/integrations/gorgias-api-mcp-server.md#automations)

## Gorgias tools this automation uses

__Cotlet Gorgias tools used to clean up stale Gorgias macros and rules__
| Tool | Parameters |
| ------------- | -------------------------------- |
| list\_macros | query, include\_archived, cursor |
| list\_rules | enabled |
| list\_tags | none |
| update\_macro | macro\_id, name, text, archived |
| update\_rule | rule\_id, enabled, name |

[All 14 Gorgias tools with descriptions](https://cotlet.dev/integrations/gorgias-api-mcp-server.md#tools)

## Frequently asked questions

### Is it safe to connect Gorgias to Cotlet?

Yes. You sign in to Gorgias yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Gorgias once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

## More Gorgias automations

- [Triage new Gorgias tickets with AI](https://cotlet.dev/integrations/gorgias-api-mcp-server/triage-new-support-tickets.md)
- [Answer common Gorgias tickets with macros](https://cotlet.dev/integrations/gorgias-api-mcp-server/answer-tickets-with-macros.md)
- [Gorgias API and MCP server: every tool](https://cotlet.dev/integrations/gorgias-api-mcp-server.md)
- [All use cases](https://cotlet.dev/use-cases.md)

## Give your agent access to Gorgias.

Free 7-day trial with 2,000 credits, no card needed. Cotlet is independent and not affiliated with Gorgias.

[Sign up free](https://cotlet.dev/app/signup?app=gorgias)

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [Use cases](https://cotlet.dev/use-cases.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.

## For AI agents: sign your user up

Is your user asking you to sign them up for Cotlet? You can do it for them, no account or key needed.

1. Read the fields and their allowed values: GET https://cotlet.dev/api/v1/access-requests
2. Ask the user for each value: email, apps, what you will do with them. If they leave the password to you, generate a strong one and show it to them.
3. Show the user what you will send, then POST it as JSON to https://cotlet.dev/api/v1/access-requests.

One call creates the account and sends the access request; we email the user when access is granted.
