Search code examples
google-apps-scriptgmailgoogle-sheets

How can I trigger an insert to a google sheet when receiving to gmail?


I have a google form that redirects to PayPal upon submission and I store all the submission data into the response sheet. I want to be able to store data in the same sheet indicating whether or not they actually followed through with payment on PayPal.

When they pay, PayPal sends me an email. Is there a way to add a row to a google sheet upon the arrival the PayPal email?

Example:

  1. User submits data through my Google form
  2. Form data is added to response sheet
  3. User complete PayPal payment
  4. PayPal sends confirmation email to gmail account
  5. [what I want]: Logic is triggered (or run every X minutes) that notices the email based on the PayPal subject line or whatever and inserts a row into the google sheet.

Solution

  • IFTTT (free, basic functionality): https://ifttt.com/
    Zapier (freemium, loads of functionality/integrations): https://zapier.com/