0

I'm trying to create a personal notifier whenever a certain website contains the word 'Indian' the script should email me. For some reason I cannot find a script function that would import HTML data,

Is there such a function?

2 Answers 2

1

Yes, you can perform a URL fetch:
https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app#fetch(String)

0

Just like Harold said, you can perform a URL fetch:

var output = UrlFetchApp.fetch("https://raw.githubusercontent.com/####");
var form = HtmlService.createHtmlOutput(output.getContentText());
SpreadsheetApp.getUI().showModalDialog(form, "Fetched HTML");

You can otherwise fetch a website using the same tactic, for example:

var output = UrlFetchApp.fetch("https://www.google.com");
var form = HtmlService.createHtmlOutput(output.getContentText());
SpreadsheetApp.getUI().showModalDialog(form, "Fetched HTML");

Upon launch, the dialog should return Google's homepage.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.