Watch Email - Export email data to Google spreadsheet?

Hello everyone,

I have created a rough make script:

Module1:
With ‘Watch Email’ I check an IMAP email folder (Example1), where I store several emails per day with MS Outlook.

Module2:
With ‘Tools Set multiple variables’ I take the first name and last name from the field ‘Sender name’:

(I would actually like a better solution here, e.g. if there is only one word, then don’t make a split)

Module3:
With ‘Google Sheets - Search Rows’ the plan is that I search for existing emails in advance before importing data.
Filter column Email C => Equal to => Sender Email Address

Filter:
Total number of bundles => Equal to => 0

Module4:
With ‘Google Sheets - Add a Row’ only first name, surname and email should be created if the email does not yet exist in the list. So that there are no duplicate entries.
In addition, I would like to have a few emails or wildcard emails (for example *@example.com) that should be excluded and not included. How do you set up such a filter? That I have a list of emails or email domains that should not be included.

But unfortunately it does not work as it should.
I can’t find a similar solution on the net or here in the forum.

How can I realise such an idea?
I hope someone here can help me.

Thank you very much, Sebastian

1 Like

Hi Sebastian,
If i got you right:

  1. You don’t want a record to be added to the sheet if it’s an existing email address.
  2. If it matches a certain pattern like @example.com.
  3. Or it’s just a blacklisted certain email address.

Here is a simple option:

  1. Add an array variable with the list of patterns and addresses you DO NOT want to see in the sheet:
  2. Set up a filter before the google module, where your array is mapped and it compares it to the sender address:
1 Like

Hi and thank you for your quick reply!

I actually need both.
Once the array, I think it’s great and I’ll try it out right away!

Is there such a thing as a ‘wildcard’? *@example.com ← do not accept email from ...@example.com ?

And the other way would be with Google Sheets - Search Rows? So that the table column ‘C’ is checked first to see if the email address already exists, right?
Is my structure correct? Or do you do the query differently?
Or does the script continue and go to the next email?

1 Like

If you don’t want to receive emails from certain domains, you can set a filter or block them in your email account. Here it just checks for new emails.
If you have multiple emails, does it organise them in one operation with multiple bundles or the come through as multiple operations?
If they come as a single op with multiple bundles, you need an iterator to check each bundle.

If you’d like to minimize the number of operations, you can also get rid of the variables for name and last name and move them directly into the add a row module. And you can actually move the array filter after the array is generated.

1 Like

Thank you very much for your quick reply.

Of course, all emails should arrive in my email inbox / or in my email subfolder and there should be no ‘filters’ there.


But the question now would be, is make.com the right tool for me and my requirements?

What I want:
I move about 5-20 emails per day into an email subfolder after I have read them.
In the folder are then all emails, even if there are several from one person, replied emails etc. etc.

I only want to transfer the email contacts from the subfolder to a Google Excel list.
There should be three columns in the Google Excel list: First name, Last name, Email
(Not every email has a name, some only have a company name or something…)
No duplicates should be included in the Google Excel list.
(Should be determined with the email, as this is unique).
And I would like to have a small ‘blacklist’ that should not be imported, e.g. my own email addresses, or if a noreplay@ email writes to me, etc.

With Make I had hoped that a process would run once a day to retrieve all new emails and import them into my Google list.
Or, for example, Make all emails always synchronised so that all email data from the past is also retrieved.

I hope I was able to explain my requirement well :wink:

1 Like

Hi Sebastian,
Make would work at this point pretty well. The only thing that should be added is an iterator, so that when you have more than one email, it processes each of them. I wouldn’t overcomplicate anything for now, you did a good job already!

Cheers,
Vicky

1 Like

Hi Vicky, thank you very much.
Where is the best place to install an iterator?
Or what should it look like?

Thank you very much and sorry I’m still very new to the make business :slight_smile:

1 Like

Hi Sebastian,
You can try this way:

The idea is that you have your list of emails, then aggregate them into an array and since iterators need an array, you map the iterator to the aggregated array. And after the iterator you link the rest of your scenario. So every email gets processed one by one, and ends up in your Google sheet after passing through filters.

1 Like