I have a label set up in Gmail to match incoming filter. I need a new row to be created in a specified GSheet each time an email hits the inbox that matches the filter. I don’t need the whole body of the email to be added, I needed certain elements only to be added to specific rows in my GSheet.
I was able to create a scraper to collect the parts of the email to add appropriately via right-click if I’m on the active tab.
Now, I’m trying to set it up to also run in the background using that scrape model.
I thought maybe trigger could be “when receive email from @” then scrape data in the background… using scraper template… then add row to GSheets.
I’ve mapped my GSheets out, but where the trigger is failing is somewhere in the "Scrape from the _____ of “when email is received”…
Here is the error code:
{
“clientErrorCode”: “ScraperMissingTargetPageError”,
“message”: “You did not select a page on which to run this Automation.”,
“trackError”: false,
“stack”: “Error: You did not select a page on which to run this Automation.\n at i.from (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/background.js:83:13923)\n at Object.from (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/background.js:90:4724)\n at WM.handle (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1369:23967)\n at async chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:89761\n at async pS.guard (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:71538)\n at async Gw.invokeFunction (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:89719)\n at async Gw.invokeSequence (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:80769)\n at async Gw.invokePlaybook (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:82321)\n at async Lf.execute (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:100219)\n at async Lf.executeWithResult (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:100748)”,
“clientErrorHistory”: [
{
“clientErrorCode”: “ScraperMissingTargetPageError”,
“message”: “You did not select a page on which to run this Automation.”,
“stack”: “Error: You did not select a page on which to run this Automation.\n at i.from (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/background.js:83:13923)\n at Object.from (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/background.js:90:4724)\n at WM.handle (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1369:23967)\n at async chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:89761\n at async pS.guard (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:71538)\n at async Gw.invokeFunction (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:89719)\n at async Gw.invokeSequence (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:80769)\n at async Gw.invokePlaybook (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:82321)\n at async Lf.execute (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:100219)\n at async Lf.executeWithResult (chrome-extension://ihhkmalpkhkoedlmcnilbbhhbhnicjga/348.js:1464:100748)”,
“fingerprint”: [
“ScraperMissingTargetPageError”
]
}
],
“fingerprint”: [
“ScraperMissingTargetPageError”
]
Hi @jamiemilam, the error is being returned because the Scrape data in the background action doesn’t have a URL to run the scraper template from as you’ve selected the body output of the email for this input:
Thanks Jess. It did work but it failed to pull two elements (which work when I do the right click method)… the structure of that email is the same every time it comes in from that sender, so any idea why it wouldn’t have scraped those two elements?
This is likely an issue with your scraper template, we probably need to further define the selectors.
Unfortunately, Bardeen doesn’t allow other users to edit shared scraper templates at this time so I’m unable to do it for you.
But to investigate what’s needed on my end, Could you please provide the link to one of your emails? I’m not sure if just the link will work so could you also forward to my Gmail at jessie.vanwyhe@gmail.com?
Also, please advise which elements are not pulling in. Thank you!
I was able to get the same results you are on my end now. I know it’s your scraper template we need to update, but I need to be able to get the exact selectors for you in the same way that the email is sent.
For me to do this, could you please send the email you are trying to scrape from as an attachment to me?
Thank you - Am I only deleting the FName and Booksource values since those are the two not populating? Also, the screenshots you show are what it looked like when I was first building the scraper. It seems to look different from the “Open in Builder” option. Do I need to start from the beginning to get the permutation option?
Yes, if the others start not populating, we can get you the selectors for those too.
The screenshots are different from the “Open the builder” view as this is from the edit scraper template view. You do no need to create the scraper template from scratch in order to add the permutations.
Have you tried to rerun it after the above updates? Any luck?