# Auto Close Ticket Based on Subject Line

**URL:** <https://community.hubspot.com/t/auto-close-ticket-based-on-subject-line/48216>\
**Category:** Tickets & Conversations\
**Tags:** enterprise\
**Created:** [December 8, 2021, 7:26pm UTC](https://community.hubspot.com/t/auto-close-ticket-based-on-subject-line/48216 "2021-12-08T19:26:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LHaselhuhn](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lhaselhuhn/32/23606_2.png) [@LHaselhuhn](https://community.hubspot.com/u/LHaselhuhn)\
**Post date:** [December 8, 2021, 7:26pm UTC](https://community.hubspot.com/t/auto-close-ticket-based-on-subject-line/48216/1 "2021-12-08T19:26:05Z")

</div>

We receive a number of repetitive emails that turn into tickets. These come from Google for our clients. We would like to be able to set up an automation to auto close these once we come in. Currently, we have automation that assigns tickets based on if someone’s name is included in the Subject line so I figured this would be possible. However, Hubspot support said it wasn’t.

Here are the two auto emails we want to auto-close:

Subject: You received an invitation to access a Google Ads account ; From: [ads-account-noreply@google.com](mailto:ads-account-noreply@google.com)

Subject: You’ve been invited to access a Google Tag Manager account ; From: [notify-noreply@google.com](mailto:notify-noreply@google.com)

Thanks in advance for your help!

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [December 8, 2021, 8:04pm UTC](https://community.hubspot.com/t/auto-close-ticket-based-on-subject-line/48216/2 "2021-12-08T20:04:07Z")

</div>

Hi @LHaselhuhn,

If your ticket are being created from a connected team email inbox, the subject line of the incoming email should correspond to the ticket name, the email body to the ticket description, the associated contact to the from email address.

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/8/88473c7ed5c707696b77d7149223af4aea92a470.png)

This would however mess with your ticket reporting as these tickets were not actually worked.

If you want to prevent any tickets created from these two email addresses, you could add them to the deny list in the conversations settings (Settings \> Inbox \> Allow & Deny List). This would prevent tickets from being created to begin with.

Hope this helps!
