This project looks for TeamDynamix ticket numbers in your inbox. The script will then archive all but the most recent ticket email from your inbox.
This project can be adapted for other ticketing systems by changing the regular expression in the code.gs
file based on the ticket Subject line in the emails and the From address.
-
Navigate to https://script.google.com/
-
Ensure that you are logged in under your Google for Work account.
-
Click New Project
-
Set title to TDX Ticket Dedupe
-
Copy the contents from
code.gs
in this repository and paste the contents in the Apps Script project. -
Click Save
-
Click Run
-
Authorize the permissions for the script by relogging in with your Google for Work account.
-
Click Allow
-
On the left navigation, select Triggers, the icon looks like a clock
-
On the bottom right, click Add Trigger
-
Set the following settings
- Choose which function to run: ticketDeDupe
- Choose which deployment should run: Head
- Select event source: Time-driven
- Select type of time based trigger: Minutes timer
- Select hour interval: Every minute
-
Click Save
-
If prompted, authorize the permissions for the script by relogging in with your Google for Work account.