r/GoogleAppsScript • u/MakeABrick • Aug 12 '24
Question Script to scrape email and send data to certain columns in Gsheets
Hey everyone, I’m wondering if is it possible to write a script that scrapes emails that come in every few hours and send certain data to Gsheets into specific columns?
6
2
u/vr4lyf Aug 13 '24
I do this and also send it as a slack msg.
The sheets api let's me create charts and graphs to add to the slack msg
2
u/Any_Werewolf_3691 Aug 13 '24
Regular expressions will be your friend on this journey.
https://github.com/google/re2/wiki/Syntax
2
u/Funny_Ad_3472 Aug 13 '24
In order to write a script that scrapes data from your emails, the format of that email that contains thay information you want to scrape should be consistent all the time. I have written a script that scrapes info from emails from a particular form. Maybe you can look at it and build on your own. If you have difficulty, maybe lemme know. https://codespaces.bss.design/boostrap.html This one extracts the data from a particular form, but I'm sure you can build on it.
1
2
u/elcriticalTaco Aug 13 '24
Yup.
Do you possibly have a more detailed question or are we done here lol?