Reads each Google Doc you list, summarises it with AI, and appends every summary to one digest document.

UsesGoogle DocsOpenAI

Summarise a batch of documents into one digest

ValuesSet documentLinks to blank.Set documentLinks to blank.
ValuesSet digestDocumentLink to blank.Set digestDocumentLink to blank.
ValuesSet summaryInstructions to Give at most three bullet points covering what the document is for and what it decides or asks for, then a final line starting 'Follow-ups:' naming any owners, dates or open questions it mentions..Set summaryInstructions to Give at most three bullet points covering what the document is for and what it decides or asks for, then a final line starting 'Follow-ups:' naming any owners, dates or open questions it mentions..
ValuesSet maxCharactersPerDocument to 12000.Set maxCharactersPerDocument to 12000.
Decisions & LoopsIf digestDocumentLink starts with httpIf digestDocumentLink starts with http
Yes
Decisions & LoopsIf digestDocumentLink doesn't contain /d/If digestDocumentLink doesn't contain /d/
Yes
Decisions & LoopsStop and report a problem: The 'digestDocumentLink' step looks like a web address but is not a Google Docs link. Use one containing '/d/', such as https://docs.google.com/document/d/1AbCdEf/edit, or paste the document id.Stop and report a problem: The 'digestDocumentLink' step looks like a web address but is not a Google Docs link. Use one containing '/d/', such as https://docs.google.com/document/d/1AbCdEf/edit, or paste the document id.
No
No steps
No
No steps
ListsGet the last item of digestDocumentLink split by /d/ and save it as digestLinkTail.Get the last item of digestDocumentLink split by /d/ and save it as digestLinkTail.
ListsGet the first item of digestLinkTail split by / and save it as digestDocumentId.Get the first item of digestLinkTail split by / and save it as digestDocumentId.
Decisions & LoopsIf digestDocumentId is emptyIf digestDocumentId is empty
Yes
Decisions & LoopsStop and report a problem: The 'digestDocumentLink' step needs a Google Docs link such as https://docs.google.com/document/d/1AbCdEf/edit.Stop and report a problem: The 'digestDocumentLink' step needs a Google Docs link such as https://docs.google.com/document/d/1AbCdEf/edit.
No
No steps
TextSplit documentLinks by a new line and save it as documentList.Split documentLinks by a new line and save it as documentList.
ValuesSet summaries to an empty list.Set summaries to an empty list.
ValuesSet skipped to an empty list.Set skipped to an empty list.
Decisions & LoopsFor each link in documentList:For each link in documentList:
TextTrim link and save it as documentLink.Trim link and save it as documentLink.
Decisions & LoopsIf documentLink is emptyIf documentLink is empty
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf documentLink starts with httpIf documentLink starts with http
Yes
Decisions & LoopsIf documentLink doesn't contain /d/If documentLink doesn't contain /d/
Yes
ListsAdd documentLink to the end of skipped and save it as skipped.Add documentLink to the end of skipped and save it as skipped.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
No
No steps
ListsGet the last item of documentLink split by /d/ and save it as linkTail.Get the last item of documentLink split by /d/ and save it as linkTail.
ListsGet the first item of linkTail split by / and save it as documentId.Get the first item of linkTail split by / and save it as documentId.
Decisions & LoopsIf documentId is emptyIf documentId is empty
Yes
ListsAdd documentLink to the end of skipped and save it as skipped.Add documentLink to the end of skipped and save it as skipped.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesSet documentText to blank.Set documentText to blank.
Decisions & LoopsIf a step below fails, save the error as readErrorIf a step below fails, save the error as readError
Try
Google DocsGoogle DocsRead documentId. Save it as document.Read documentId. Save it as document.
TextTrim document.text and save it as documentText.Trim document.text and save it as documentText.
On error
ValuesShow in the output: Could not read documentLink: readError as text.Show in the output: Could not read documentLink: readError as text.
Decisions & LoopsIf documentText is emptyIf documentText is empty
Yes
ListsAdd documentLink to the end of skipped and save it as skipped.Add documentLink to the end of skipped and save it as skipped.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesSet prompt to You are summarising one document for a colleague who has not read it. Use only what the document says, and do not invent anything it does not contain.Set prompt to You are summarising one document for a colleague who has not read it. Use only what the document says, and do not invent anything it does not contain. summaryInstructions Start your answer with a single line naming the document, then the summary. Document link: documentLink Document text: documentText truncated to maxCharactersPerDocument characters.
ValuesSet summary to blank.Set summary to blank.
Decisions & LoopsIf a step below fails, save the error as summaryErrorIf a step below fails, save the error as summaryError
Try
OpenAIOpenAIAsk OpenAI: prompt. Save it as modelReply.Ask OpenAI: prompt. Save it as modelReply.
TextTrim modelReply.response_text and save it as summary.Trim modelReply.response_text and save it as summary.
On error
ValuesShow in the output: Could not summarise documentLink: summaryError as text.Show in the output: Could not summarise documentLink: summaryError as text.
Decisions & LoopsIf summary is emptyIf summary is empty
Yes
ListsAdd documentLink to the end of skipped and save it as skipped.Add documentLink to the end of skipped and save it as skipped.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ListsAdd summaryAdd summary Source: documentLink to the end of summaries and save it as summaries.
Decisions & LoopsIf summaries is emptyIf summaries is empty
Yes
Decisions & LoopsStop and report a problem: None of the documents could be read, so nothing was added to the digest. Check that every link in the 'documentLinks' step opens as a Google Doc for the connected account.Stop and report a problem: None of the documents could be read, so nothing was added to the digest. Check that every link in the 'documentLinks' step opens as a Google Doc for the connected account.
No
No steps
ValuesSet digest to Document summaries - today's dateSet digest to Document summaries - today's date summaries joined by a blank line.
Decisions & LoopsIf skipped isn't emptyIf skipped isn't empty
Yes
ValuesChange digest to digestChange digest to digest Could not be read: skipped joined by , .
No
No steps
Google DocsGoogle DocsAdd text to digestDocumentId.Add text to digestDocumentId.digest
ValuesShow in the output: Added the length of summaries as text document summaries to the digest.Show in the output: Added the length of summaries as text document summaries to the digest.