Gorgias automation · runs weekly
Clean up stale Gorgias 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.
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
- A Lead or Admin opens the helpdesk dropdown menu in the top-left, goes to Workflows, then Tools, then Macros.
- The admin scans the macro list, opens each macro to read its text and actions, and archives the ones that are out of date.
- Under Workflows, Tools, Rules the admin opens each rule, reads its trigger, conditions and actions and turns off the ones that no longer fit.
- Tags used in macros and rules cannot be deleted, so the admin removes a tag from each macro and rule before deleting it.
- 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
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. - 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.
- 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.
- 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.
- 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.
- 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
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 · Gorgias Help: Create rules to take automatic actions on tickets · Gorgias Help: User permissions · Gorgias updates: Gorgias MCP is now in open beta
Call update_macro from a script
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}' {
"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 cronGorgias tools this automation uses
| 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 |
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.
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.