Share
Explore

DNS Query demo

A demo doc for a very, very simple DNS Query Pack built in a rush for the Coda Packathon 2022 (while learning how Packs are built 馃槄).

鉂 What

This Pack is a port of for Google Sheets I built a while ago. It uses Cloudflare鈥檚 1.1.1.1 DNS API, as demonstrated
, to retrieve information about different DNS records of any domain.

鈿欙笍 How

This Pack just adds these two custom formulas:
Search
1
DnsRecord()
Returns the value of the specified DNS record of the provided domain.
dnsRecordType
DNS record to fetch.
Supports A, AAAA, CAA, CNAME, DS, DNSKEY, MX, NS, NSEC, NSEC3, RRSIG, SOA and TXT records.
2
domain
Domain to query.
3
IsGoogleEmail()
Returns a true value if an email address is of the Gmail or Google Workspace type
emailAddress
Email address to test.
Also admits a domain name!
4
type
Type of check to perform on the emailAddress parameter.
Optional, if omitted google will be assumed.
Can be any of:
gmail
workspace
google
There are no rows in this table

鈽濓笍 The IsGoogleEmail() formula is also available as a column format. In that case, its type parameter will default to google.
image.png

馃暪锔 Demos

number-one.png
Input a domain and choose a DNS record type to fetch its value.
Domain:
uji.es
DNS record
MX

DnsRecord([dnsRecordType 1], domain)
10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 aspmx2.googlemail.com.,50 aspmx3.googlemail.com.

number-two.png
Type an email (or domain) and select the type of test to perform to get a true or false result.
Email address:
pablo.felip@gedu.es
Test type
workspace
IsGoogleEmail(email,testType)
true

number-three.png
Add domains to the table, choose a record type and enable or disable 鉁夛笍 email type checks.
DNS record
MX
Test if Email/Domain is of Gmail type
Test if email/domain is of GWS type
Search
Domain
馃攳 DNS query result
馃摠 Gmail?
馃摠 Workspace?
1
1 aspmx.l.google.com.,10 aspmx2.googlemail.com.,10 aspmx3.googlemail.com.,5 alt1.aspmx.l.google.com.,5 alt2.aspmx.l.google.com.
2
1 aspmx.l.google.com.,10 aspmx2.googlemail.com.,10 aspmx3.googlemail.com.,5 alt1.aspmx.l.google.com.,5 alt2.aspmx.l.google.com.
3
10 aspmx.l.google.com.,20 alt2.aspmx.l.google.com.,30 aspmx3.googlemail.com.,30 aspmx2.googlemail.com.,20 alt1.aspmx.l.google.com.
4
1 aspmx.l.google.com.,5 alt1.aspmx.l.google.com.,5 alt2.aspmx.l.google.com.,10 aspmx2.googlemail.com.,10 aspmx3.googlemail.com.
5
1 aspmx.l.google.com.,5 alt1.aspmx.l.google.com.,5 alt2.aspmx.l.google.com.,10 aspmx2.googlemail.com.,10 aspmx3.googlemail.com.
6
5 outlook-com.olc.protection.outlook.com.
7
10 mx2.cc.upv.es.,50 vega.cc.upv.es.,40 mx4.cc.upv.es.,7 mxv.cc.upv.es.
8
20 alt1.aspmx.l.google.com.,10 aspmx.l.google.com.,200 alt3.aspmx.l.google.com.,100 alt2.aspmx.l.google.com.
9
0 smtp.google.com.
10
1 mx1.ovh.net.,5 mx2.ovh.net.
11
200 post14.in.strato.de.,100 post.in.strato.de.
12
10 aspmx.l.google.com.,20 alt1.aspmx.l.google.com.,30 alt2.aspmx.l.google.com.,40 aspmx2.googlemail.com.,50 aspmx3.googlemail.com.
13
10 mx.yandex.net.
14
40 alt4.gmail-smtp-in.l.google.com.,30 alt3.gmail-smtp-in.l.google.com.,10 alt1.gmail-smtp-in.l.google.com.,20 alt2.gmail-smtp-in.l.google.com.,5 gmail-smtp-in.l.google.com.
15
()&(/)%$
Error: Non-Existent Domain.
There are no rows in this table

number-four.png
Please, change column type of Is a Google email? in the table below to Is a Google email .
User
Is a Google email?
There are no rows in this table
image.png


Cover photo by in
~ Onions, for no particular reason 馃し鈥嶁檪锔 ~

Want to print your doc?
This is not the way.
Try clicking the 鈰 next to your doc name or using a keyboard shortcut (
CtrlP
) instead.