I am making a lead generation service with my marketing agency, and we need a way to count unique email addresses (or sender names, even better if possible) in an inbox. We are looking to use Gmail through Gsuite, but are open to any inbox. Originally, we were going to use Zapier, combine Gmail and Sheets, then have a sheet filled with every address in the inbox, then a COUNTUNIQUE formula on another column to count the number of unique addresses. This number of unique addresses will be sent to our agency, to be later determined how, but the important part for now is to correctly count the leads. This way we are counting the number of leads we have generated for their inbound marketing. Keep in mind, we won't have any access to the inbox nor sheet after the initial setup.
The problem we found ran into is that we are generating leads for medical professionals, and Zapier states in their privacy agreement that they are NOT HIPAA compliant.
Does anyone have a recommendation on a software, tool, or method I can take to securely track unique email addresses in an inbox? I know using a 3rd party service is out of the question (unless they're HIPAA compliant), but there's gotta be a Github repo or other opensource project out there that deals with this. Thanks in advance, any help is very much appreciated.