Saves the text of a web page into a new Google Doc, even when the site won't hand its text to anything but a browser.

UsesGoogle DocsJina AI

Save a hard-to-open web page as a Google Doc

ValuesSet pageUrl to blank.Set pageUrl to blank.
ValuesSet minimumCharacters to 600.Set minimumCharacters to 600.
ValuesSet maximumCharacters to 20000.Set maximumCharacters to 20000.
TextTrim pageUrl split by ://[1] and save it as afterScheme.Trim pageUrl split by ://[1] and save it as afterScheme.
TextSplit afterScheme by / and save it as hostAndPath.Split afterScheme by / and save it as hostAndPath.
TextTrim the first item of hostAndPath and save it as authorityPart.Trim the first item of hostAndPath and save it as authorityPart.
TextTrim the last item of authorityPart split by @ and save it as pageHost.Trim the last item of authorityPart split by @ and save it as pageHost.
Decisions & LoopsIf pageHost is empty or pageHost is nullIf pageHost is empty or pageHost is null
Yes
Decisions & LoopsStop and report a problem: There is no domain name in the address in the 'pageUrl' step, so there is nothing to fetch.Stop and report a problem: There is no domain name in the address in the 'pageUrl' step, so there is nothing to fetch.
No
No steps
TextJoin the items from index 1 onward of hostAndPath with / and save it as pagePath.Join the items from index 1 onward of hostAndPath with / and save it as pagePath.
ListsGet the first item of pagePath split by ? and save it as pagePath.Get the first item of pagePath split by ? and save it as pagePath.
ListsGet the first item of pagePath split by # and save it as pagePath.Get the first item of pagePath split by # and save it as pagePath.
ValuesSet pageScheme to http://.Set pageScheme to http://.
Decisions & LoopsIf pageUrl starts with https://If pageUrl starts with https://
Yes
ValuesChange pageScheme to https://.Change pageScheme to https://.
No
No steps
MathSet sourceLabel to pageScheme plus pageHost.Set sourceLabel to pageScheme plus pageHost.
Decisions & LoopsIf pagePath isn't emptyIf pagePath isn't empty
Yes
ValuesChange sourceLabel to sourceLabel/pagePath.Change sourceLabel to sourceLabel/pagePath.
No
No steps
ValuesSet directBody to blank.Set directBody to blank.
ValuesSet directOk to false.Set directOk to false.
ValuesSet directNote to blank.Set directNote to blank.
Decisions & LoopsIf a step below fails, save the error as fetchErrorIf a step below fails, save the error as fetchError
Try
HTTPFetch pageUrl and save it as response.Fetch pageUrl and save it as response.
TextTrim response.body and save it as directBody.Trim response.body and save it as directBody.
ValuesChange directOk to response.ok is true.Change directOk to response.ok is true.
ValuesChange directNote to A plain request to pageHost answered with status response.status.Change directNote to A plain request to pageHost answered with status response.status.
On error
TextTrim fetchError.message and save it as rawReason.Trim fetchError.message and save it as rawReason.
ValuesChange directNote to A plain request to pageHost failed: rawReason with pageUrl replaced by the address you gave.Change directNote to A plain request to pageHost failed: rawReason with pageUrl replaced by the address you gave.
ValuesChange directOk to false.Change directOk to false.
Decisions & LoopsIf directNote contains ://If directNote contains ://
Yes
ValuesChange directNote to A plain request to pageHost could not be completed.Change directNote to A plain request to pageHost could not be completed.
No
No steps
MathSet minimumLength to minimumCharacters multiplied by 1.Set minimumLength to minimumCharacters multiplied by 1.
ValuesSet looksBlocked to false.Set looksBlocked to false.
Decisions & LoopsIf directOk is noIf directOk is no
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf the length of directBody is less than minimumLengthIf the length of directBody is less than minimumLength
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains just a moment (ignoring case)If directBody contains just a moment (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains enable javascript (ignoring case)If directBody contains enable javascript (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains captcha (ignoring case)If directBody contains captcha (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains access denied (ignoring case)If directBody contains access denied (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains attention required (ignoring case)If directBody contains attention required (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains verify you are human (ignoring case)If directBody contains verify you are human (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
Decisions & LoopsIf directBody contains are you a robot (ignoring case)If directBody contains are you a robot (ignoring case)
Yes
ValuesChange looksBlocked to true.Change looksBlocked to true.
No
No steps
ValuesSet readableText to blank.Set readableText to blank.
ValuesSet pageTitle to blank.Set pageTitle to blank.
ValuesSet readVia to blank.Set readVia to blank.
Decisions & LoopsIf looksBlocked is yesIf looksBlocked is yes
Yes
Decisions & LoopsIf a step below fails, save the error as readerErrorIf a step below fails, save the error as readerError
Try
Jina AIJina AIRead the page at pageUrl with Jina. Save it as reader.Read the page at pageUrl with Jina. Save it as reader.
TextTrim reader.content and save it as readableText.Trim reader.content and save it as readableText.
TextTrim reader.title and save it as pageTitle.Trim reader.title and save it as pageTitle.
On error
Decisions & LoopsStop and report a problem: Neither a plain request nor the reader service could get the text of that page on pageHost. Check the address, and check you are able to open the page yourself.Stop and report a problem: Neither a plain request nor the reader service could get the text of that page on pageHost. Check the address, and check you are able to open the page yourself.
ValuesChange readVia to Read through the reader service, because the plain request did not come back with the page..Change readVia to Read through the reader service, because the plain request did not come back with the page..
No
ValuesChange readableText to directBody.Change readableText to directBody.
ValuesChange readVia to Read with a plain request. The reader service was not needed..Change readVia to Read with a plain request. The reader service was not needed..
Decisions & LoopsIf readableText is nullIf readableText is null
Yes
ValuesChange readableText to blank.Change readableText to blank.
No
No steps
Decisions & LoopsIf readableText is emptyIf readableText is empty
Yes
Decisions & LoopsStop and report a problem: That page on pageHost came back with no readable text at all, so there was nothing to save.Stop and report a problem: That page on pageHost came back with no readable text at all, so there was nothing to save.
No
No steps
ValuesSet documentTitle to pageHost.Set documentTitle to pageHost.
Decisions & LoopsIf pageTitle isn't empty and pageTitle is not nullIf pageTitle isn't empty and pageTitle is not null
Yes
ValuesChange documentTitle to pageTitle.Change documentTitle to pageTitle.
No
No steps
TextShorten documentTitle to 90 characters and save it as documentTitle.Shorten documentTitle to 90 characters and save it as documentTitle.
ValuesSet document to nothing.Set document to nothing.
ValuesSet documentId to blank.Set documentId to blank.
Decisions & LoopsIf a step below fails, save the error as documentErrorIf a step below fails, save the error as documentError
Try
Google DocsGoogle DocsCreate the document documentTitle. Save it as document.Create the document documentTitle. Save it as document.
TextTrim document.document_id and save it as documentId.Trim document.document_id and save it as documentId.
On error
Decisions & LoopsStop and report a problem: The page was read, but the Google Doc to put it in could not be created. Check the Google Docs connection and run it again.Stop and report a problem: The page was read, but the Google Doc to put it in could not be created. Check the Google Docs connection and run it again.
Decisions & LoopsIf documentId is empty or documentId is nullIf documentId is empty or documentId is null
Yes
Decisions & LoopsStop and report a problem: Google Docs did not return a document id, so there was nowhere to write the page.Stop and report a problem: Google Docs did not return a document id, so there was nowhere to write the page.
No
No steps
ValuesSet header to Source: sourceLabelSet header to Source: sourceLabel readVia .
ValuesChange header to header@directNoteChange header to header@directNote .
MathSet documentText to header plus readableText truncated to a record of kind, op, left, and right characters.Set documentText to header plus readableText truncated to a record of kind, op, left, and right characters.
Google DocsGoogle DocsAdd text to documentId.Add text to documentId.documentText
ValuesShow in the output: Saved the readable text of pageHost to a new Google Doc.Show in the output: Saved the readable text of pageHost to a new Google Doc.