Gmail + airtable

Hi,
I’ve connected Gmail + airtable with Make. Everything is working fine.
I want to get a specific line from the email and put it in a specific column.
It’s email from my bank account, so the content of the emails are the same. only the amount and the type are different. Any idea ? I have a class in the html =>class=‘transaction-link’
but unfortunately both amount and type are in the same class.

Many thanks,

Constance

Hello @Constance_Gatbois you could a Text Parse Module and a Regex to extract the amount from your email text body. It would be great if you could share a sample of your email and I could build the regex for you. In short, the regex would look like this :

Amount\s([A-Z]{2}$\s\d{1,3}(,\d{3})*.\d{2})

4 Likes

Hi @Constance_Gatbois f the string is always the same we can use split function to get the results as the format is always same you shared only amount and type are different but if you can share the insight of data it will be more clear to guide more accurately

thank you

2 Likes

Hi Rafael,
Thnak you for your help.
Here is the email text body :
Vous venez d’effectuer un paiement de 24,00 USD (**22,87** EUR) à destination de **Airtable** avec votre carte One (se terminant par xxxx). Vous pouvez retrouver dès maintenant cette transaction avec la mention en cours dans Qonto. Un paiement en cours, qu’est-ce que ça veut dire ? Une transaction est marquée comme en cours tant qu’elle n’a pas été autorisée ou annulée par le commerçant. Ce dernier dispose d’un délai de 11 jours pour effectuer une des deux actions. Il peut arriver qu’une transaction refusée apparaisse comme en cours dans votre interface. Soyez rassuré, les fonds vous seront automatiquement reversés après 11 jours.

What i want to get is the amount in euro (in bold) and the whom (in bold) in my example it’s airtable. And send the first one in column amount and the second in column Type.

In my scenarion, i have several things from gmail. And what should i put in my 3rd module from parser ?

Many thanks,

Constance


Hello @Constance_Gatbois use this Regex and you will get your result:

image

if this solves your request, please mark the question as solved for other users to find a solution if they have similar problem

2 Likes

@Constance_Gatbois Use this pattern, although it is longer, it is less error-prone, won’t accidentally match incorrect values, and you will be able to map the variables in later modules:

(?<amount>\d+(?:,\d+)?)\W*? EUR\)? à destination de \W*(?<payee>[\w\W]+?)\W* avec votre

The pattern above is exactly what you need. I have provided it in text form so that you can easily copy it into your scenario.

You do NOT need to use “Global Match” for this. Global match is an incorrect solution in your case, since you will need to use an aggregator module after that.

3 Likes

Thanks for this contribution @samliew

Could you please provide some examples of the result?

2 Likes

@Rafael_Sanchez sure, here is an example of the output

Hope this helps! Let me know if you have any questions.

3 Likes

HI Samliew,
Many thanks for this
it’s not working for me. What module do you have before text parser ?
In my case it’s Gmail module

I’ve tried but i see that you have a text body in purple in the text field.
What is the module you have put before ?
I think the issue comes from there. I have gmail module before this text parser

Hi @Constance_Gatbois the purple module is just a “Set Variable” module, to simulate your Gmail module, with the email text body you provided above.

You just need to map the Text Content field like you have done in your first screenshot.

1 Like

Hello @Constance_Gatbois, were you able to successfully use the provided pattern? Let me know if it works or if you need further assistance.