Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

GAS Library Guide: Identifying Web Services via DNS Record Analysis

By simply entering a domain or URL, wouldn't it be useful to automatically detect the email servers, hosting providers, and marketing tools a site is using? This is incredibly valuable for competitive research and technical proposals. This article explains how to use a Google Apps Script (GAS) library to analyze DNS records and visualize the services behind any domain.

‍

Demo Video

Over view
Code

Detail

1. Purpose of Implementation

The goal of this script is to analyze DNS records (MX, TXT, CNAME, etc.) associated with a domain to "uncover" the underlying infrastructure and third-party tools.

  • Identify Tech Stacks: Instantly determine if a site uses Google Workspace, Microsoft 365, or specific hosting providers.
  • Verify DNS Configurations: Quickly check if security settings like SPF and DMARC are correctly implemented.
  • Increase Efficiency: Eliminate the need to manually run dig commands or use web-based DNS checkers one by one.

2. Key Use Cases

  • Sales & Pre-sales Research: Understand which email marketing or Marketing Automation (MA) tools (e.g., HubSpot, Marketo) a prospect uses to create tailored proposal materials.
  • Security Audits: Identify missing SPF or DMARC records on a client's domain to propose security improvements.
  • Infrastructure Migration Surveys: List current record settings in a spreadsheet when planning to migrate web sites or email servers.

3. How to Use the Library (Implementation Steps)

Step 1: Add the Library

  1. Open your Google Sheet and go to Extensions > Apps Script.
  2. Click the "Libraries +" icon on the left menu.
  3. Enter the Script ID for the DNS Checker and click "Look up."
  4. Set the Identifier to DNSChecker and add it.

Step 2: Write the Execution Code

Paste the following code into your Code.gs file. This will create a custom menu in your spreadsheet.

/**
 * Add custom menu when the spreadsheet opens
 */
function onOpen() {
  DNSChecker.addMenu(); 
}

/**
 * Check all domains in Column A (Detailed Mode)
 */
function checkAllDomains() {
  DNSChecker.checkSheet({ detailed: true });
}

Step 3: Run the Script

  1. Enter domains (e.g., example.com) or URLs in Column A of your sheet.
  2. Select "Simple Check" or "Detailed Check" from the newly added custom menu.
  3. The service names and DNS records will automatically populate in Column B and beyond.

Note: You can also use the custom formula =DETECTSERVICES(A1) directly in a cell.

‍

‍

Source Code

HTML
CSS
Javascript

FAQ

How does this script identify services like "Google Workspace" or "HubSpot"?

It matches patterns found in specific DNS records. For example, if an MX record contains "https://www.google.com/search?q=google.com," it identifies the service as Google Workspace. If a TXT record contains the string "hubspot," it flags HubSpot as a connected service.

Can I enter full URLs (https://...) instead of just domain names?

Yes. The library automatically extracts the domain part (e.g., example.com) from a full URL before performing the DNS lookup, so pasting raw URLs is perfectly fine.

What is the difference between "Simple Check" and "Detailed Check"?

"Simple Check" only outputs the names of the identified services. "Detailed Check" provides a deeper analysis, including the actual content of MX records and the specific status of security settings like SPF and DMARC.

Search

Search more

Related Template

Need Customization?

We can customize this sample to match your specific business requirements.

Book Free Consultation

Got a quick dev request?

Put it on Trello!Need a fix for HubSpot, CMS, or GAS? Post it on Trello.

Development Requests Here

GAS Library Guide: Identifying Web Services via DNS Record Analysis

HubSpot Custom Workflow Guide: Automating Text Generation with Generative AI

GAS Library Guide: Automatically Extracting and Managing Overdue HubSpot Tasks in Google Sheets

How to Configure Date Add/Subtract Actions in HubSpot Custom Workflows

HubSpot CMS: Implementing a High-Converting "Rich CTA" Module with Shine Effects

Company Info
Name : SweetsVillage .Inc
CEO :
‍
Tomoo Motoyama

HomeTemplateCustomWorkflow
Terms & ConditionsPrivacy PolicyContact us

Copyright ©SweetsVillage .Inc

Back To Top Image