Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure gmail to send a GET request to my API, after receiving a new e-mail?

Actualy, what I want to do, is to make gmail execute a GET request to my API, after receiving any e-mail in the mailbox. Is there a way to do this?

thanks

like image 875
Abdessamad Elouarti Avatar asked Sep 03 '25 02:09

Abdessamad Elouarti


2 Answers

Look at the watch command in the gmail API at https://developers.google.com/gmail/api/v1/reference/users/watch. This sets up a a push notification watch on the given user mailbox, provided of course that you have permission to access the mailbox.

like image 81
Tony BenBrahim Avatar answered Sep 09 '25 03:09

Tony BenBrahim


There are a number of services, like https://ifttt.com/ or https://zapier.com/ that can trigger events (such as 'call an api') when you get a new email.

like image 31
Rik Heywood Avatar answered Sep 09 '25 04:09

Rik Heywood