Retrieve/use G suite Default Routing rules programatically

823 views Asked by At

I am only looking for read-only access.

I'd like to develop either a small web app, or maybe a script embedded in Google Sheets, that allows my users can look up which Google Admin default routing rules they are involved in.

To do that, I'll need an API to go through the rules and tabulate the information in the way I need it.

Can I do that with Admin SDK, which is soon-to-be deprecated? Is there a replacement product that can do what I want?

More details:

I currently use default routing for a few purposes. I have about 15 rules, and each one changes the route of a simple Match Rule by adding extra recipients. Some of these are to catch emails sent to ex-employees.

Others are to handle certain general email addresses like [email protected]. Rather than using a sales group, we have a sales user account. And rather than putting forwarding rules in that users' settings, we use Default routing.

1

There are 1 answers

0
user13642921 On

I had a similar problem where I needed the routing rules.... a bit different case since I just wanted a one time access to see what was going on - not necessarily something for users. I could not find anywhere else that helped me even retrieve the rules (Other than open each one up individually). I ended up finding that I could just scrape the HTML of the routing rules page to a CSV and filter for lines with an '@' character. The rules have a bunch of t/f that presumably can be matched back to their function - I didn't need all that and didn't spend the time to figure it out. This probably doesn't help the for the original post case, but perhaps my finding can help the next person looking for a way to do this.