LInk email to notion

I have my gmail fully setup.

What im trying to do is connect my gmail to my notion, so that when i receive an email that contains a customers name, it searches for that name in the notion database so it knows which database item to update, and them updates a specfic checkbox field in the database item to “true”

I think im nearly there with it, i’ve just got the “contains name” and “searching for name” parts wrong.

I pretty much got it to work, but if i have 2 different customers names in seperate emails, it doensn’t properly work.




In simple terms: watches for an email with the cancellation text & the same email that’s in the notion database - then it updates a field in that same item in the notion database

any suggestions would be great!

hello @Shaun_Culkin, it looks like you’re in the right direction. One question I have: why don’t you have any filter on the “Search object” Notion module? It sounds like you would like to filter for “Customer Name” equals “Customer Name from email” – although filtering by email instead of name may be a better solution here

1 Like

So here’s the email that is triggering the action

You can see it contains the customers email “shaunculkin@hotmail.com

this is what i’d like to pick out of the email to match the search query in notion

(the email will be different for every customer"


I tried adding the filter but got an error!

Hi @Shaun_Culkin,

It won’t work like that cause the String contains lots of different text and how contains works is like,

If in Notion you have johndoe@gmail.com and if you do contains against johndoe it will return results, however, if you have some text johndoe@gmail.com it won’t work cause it will try to match against all the data, in your case the whole email body.

What you can do is use a Text Parser, And, Extract the email address from the Email Body and then use that for Notion Database query,

Expression,

([a-zA-Z0-9.±]+@[a-zA-Z0-9.-]+.[a-zA-Z0-9._-]+)


Screenshot from 2023-04-20 13-32-04

You can then use the result from Text Parser to use in Notion Contains or Equals query.

1 Like

Got it! That’s working perfectly.

Thank you for the help!

I also tried using the “on demand” scheduling option but it didn’t seem to work when I triggered the action?

Am I missing something here? - normal scheduling and run once works fine!

On-demand scheduling needs to be either Manually triggered or triggered via Make APIs.

https://www.make.com/en/help/scenarios/scheduling-a-scenario

1 Like

I read that article already, how do I use make api?

Not sure, how you are planning to use that. Do you have any application that you are developing that can consume the Make API for this? You can refer to the API document here,

https://www.make.com/en/api-documentation

From the looks of your scenario, you don’t need to use the On Demand Scheduling, You can run it every X minutes.