Apps Script for website screenshot capture and sending to discord

362 views
Skip to first unread message

Martin

unread,
Jul 30, 2023, 2:58:07 PM7/30/23
to Google Apps Script Community
Hi All.
Looking for options on how it can be done.
Looking for ways how to capture website screenshots and to be sent to Discord via webhooks.
Please advise what is necessary and if anyone has done a similar thing.
Thanks

Web Dev

unread,
Jul 30, 2023, 3:20:26 PM7/30/23
to google-apps-sc...@googlegroups.com
GAS would take a very little part in such a setup. I assume you just want to use GAS as a webhook that will Post to Discord and process some tracking data in your Google Sheet.
- The first part is your website. You can use Node with Puppeteer to take screenshots of your website and send the files (images) to your webhook. Not sure why you would need to use GAS as with any server-side solution such as this you can just implement the rest of the logic right there. But if you're doing something else, such as tracking some data with your Google Sheets this would make sense. You can send the image files to Google env for storage or you can just send image urls to your GAS webhook. 
- Then you make a request to your Discord APIs and pass the image and necessary info.

I hope this helps

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/ff422ab1-37b2-48c2-9f1c-3d8cb20fe9can%40googlegroups.com.

Martin

unread,
Jul 30, 2023, 3:33:10 PM7/30/23
to Google Apps Script Community
Thanks for the replay.
So I understand that I need following procedures.

1st -  I need to get website screenshots into google sheets?
2nd - GAS to grab a screenshot from Google sheet and send it to Discord via webhook?

Exploring whichever process is most efficient and easiest.
As lately been starting some lil work with GAS and using its scraping capabilities was looking what i can do regards sending it to discord.
Reply all
Reply to author
Forward
0 new messages