Last active
April 5, 2022 04:06
-
-
Save billyeh/2065af8a117f1a5fe802571ea01ee00b to your computer and use it in GitHub Desktop.
Sync Google group/email list
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const GMAILS_EMAILS = ``.toLowerCase(); // List of emails from GMail to: line. | |
const GMAIL_EMAILS = GMAILS_EMAILS.split(',\n').map( | |
email => email.substring( | |
email.indexOf("<") + 1, | |
email.lastIndexOf(">") | |
)); | |
const GROUPS_EMAILS = ``.toLowerCase(); // List of emails from Groups CSV download. | |
const GROUP_EMAILS = GROUPS_EMAILS.split('\n').map( | |
row => row.split(',')[0]); | |
const GROUP_NOT_GMAIL = GROUP_EMAILS.filter( | |
x => !GMAIL_EMAILS.includes(x)); | |
console.log(`Missing ${GROUP_NOT_GMAIL} from GMail emails.`); | |
const GMAIL_NOT_GROUP = GMAIL_EMAILS.filter( | |
x => !GROUP_EMAILS.includes(x)); | |
console.log(`Missing ${GMAIL_NOT_GROUP} from Group emails.`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment