Reads a page of notes and adds a row for every name, email address and phone number actually written in it.

UsesClaudeGoogle DocsGoogle Sheets

Pull the contact details out of your notes

ValuesSet notesDocument to blank.Set notesDocument to blank.
ValuesSet spreadsheetUrl to blank.Set spreadsheetUrl to blank.
ValuesSet tabName to blank.Set tabName to blank.
ValuesSet maxContacts to 50.Set maxContacts to 50.
TextTrim notesDocument and save it as documentLink.Trim notesDocument and save it as documentLink.
ValuesSet notesId to documentLink.Set notesId to documentLink.
Decisions & LoopsIf documentLink contains /d/If documentLink contains /d/
Yes
ListsGet the first item of the last item of documentLink split by /d/ split by / and save it as notesId.Get the first item of the last item of documentLink split by /d/ split by / and save it as notesId.
Else if @documentLink contains "/"
Decisions & LoopsStop and report a problem: The 'notesDocument' step does not look like a Google Docs link. Paste the link from the address bar while the document is open, or paste just its document id.Stop and report a problem: The 'notesDocument' step does not look like a Google Docs link. Paste the link from the address bar while the document is open, or paste just its document id.
Otherwise
No steps
Decisions & LoopsIf notesId is emptyIf notesId is empty
Yes
Decisions & LoopsStop and report a problem: No document id could be read out of the 'notesDocument' step. Paste the link from the address bar while the document is open.Stop and report a problem: No document id could be read out of the 'notesDocument' step. Paste the link from the address bar while the document is open.
No
No steps
MathRound maxContacts multiplied by 1 to the nearest integer and save it as contactLimit.Round maxContacts multiplied by 1 to the nearest integer and save it as contactLimit.
Google DocsGoogle DocsRead notesId. Save it as notes.Read notesId. Save it as notes.
TextTrim notes.text and save it as sourceText.Trim notes.text and save it as sourceText.
Decisions & LoopsIf sourceText is null or sourceText is emptyIf sourceText is null or sourceText is empty
Yes
Decisions & LoopsStop and report a problem: That Google Doc has no text in it, so there was nothing to read. Check you pasted the link to the right document.Stop and report a problem: That Google Doc has no text in it, so there was nothing to read. Check you pasted the link to the right document.
No
No steps
ValuesSet readingPrompt to You are reading one document and listing only the people whose contact details are written in it.Set readingPrompt to You are reading one document and listing only the people whose contact details are written in it. Rules: - Copy characters exactly as they appear in the text. Never correct, complete, reformat, tidy, guess or invent any part of a name, email address or phone number. - Include a person only if the text itself contains their email address or their phone number. - Return one person per line, in this form: name || email address || phone number - Keep both || separators on every line, even when a part is missing. Leave a part empty rather than filling it in. - Do not add a heading, numbering, explanation or any other text. - If the text contains no email addresses and no phone numbers, reply with the single word none. Text: sourceText.
ClaudeClaudeAsk Claude: readingPrompt. Save it as reading.Ask Claude: readingPrompt. Save it as reading. Maximum response length: 2000
TextTrim reading.response_text and save it as reply.Trim reading.response_text and save it as reply.
Decisions & LoopsIf reply is null or reply is emptyIf reply is null or reply is empty
Yes
Decisions & LoopsStop and report a problem: The document was read but nothing came back, so no rows were added. Run it again.Stop and report a problem: The document was read but nothing came back, so no rows were added. Run it again.
No
No steps
Decisions & LoopsIf reply in lowercase is none or reply in lowercase is none.If reply in lowercase is none or reply in lowercase is none.
Yes
Decisions & LoopsFinish the run: No email addresses or phone numbers were found in that document, so no rows were added.Finish the run: No email addresses or phone numbers were found in that document, so no rows were added.
No
No steps
ValuesSet candidates to 0.Set candidates to 0.
ValuesSet contactsWritten to 0.Set contactsWritten to 0.
ValuesSet contactsRejected to 0.Set contactsRejected to 0.
ValuesSet contactsUnreadable to 0.Set contactsUnreadable to 0.
ValuesSet contactsFailed to 0.Set contactsFailed to 0.
Decisions & LoopsFor each replyLine in reply split by a new line:For each replyLine in reply split by a new line:
TextTrim replyLine and save it as lineText.Trim replyLine and save it as lineText.
Decisions & LoopsIf lineText is null or lineText is emptyIf lineText is null or lineText is empty
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesAdd 1 to candidates.Add 1 to candidates.
Decisions & LoopsIf contactsWritten is greater than or equal to contactLimitIf contactsWritten is greater than or equal to contactLimit
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextSplit lineText by || and save it as parts.Split lineText by || and save it as parts.
Decisions & LoopsIf the length of parts is not 3If the length of parts is not 3
Yes
ValuesAdd 1 to contactsUnreadable.Add 1 to contactsUnreadable.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextTrim parts[0] and save it as personName.Trim parts[0] and save it as personName.
TextTrim parts[1] and save it as personEmail.Trim parts[1] and save it as personEmail.
TextTrim parts[2] and save it as personPhone.Trim parts[2] and save it as personPhone.
Decisions & LoopsIf personEmail is empty and personPhone is emptyIf personEmail is empty and personPhone is empty
Yes
ValuesAdd 1 to contactsRejected.Add 1 to contactsRejected.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf personEmail isn't empty and not personEmail is a valid email addressIf personEmail isn't empty and not personEmail is a valid email address
Yes
ValuesAdd 1 to contactsRejected.Add 1 to contactsRejected.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf personEmail isn't empty and sourceText doesn't contain personEmail (ignoring…If personEmail isn't empty and sourceText doesn't contain personEmail (ignoring…
Yes
ValuesAdd 1 to contactsRejected.Add 1 to contactsRejected.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf personPhone isn't empty and sourceText doesn't contain personPhone (ignoring…If personPhone isn't empty and sourceText doesn't contain personPhone (ignoring…
Yes
ValuesAdd 1 to contactsRejected.Add 1 to contactsRejected.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesSet rowNote to blank.Set rowNote to blank.
Decisions & LoopsIf personName isn't empty and sourceText doesn't contain personName (ignoring…If personName isn't empty and sourceText doesn't contain personName (ignoring…
Yes
ValuesChange personName to blank.Change personName to blank.
ValuesChange rowNote to The name was not written this way in the document, so it has been left blank..Change rowNote to The name was not written this way in the document, so it has been left blank..
No
No steps
Decisions & LoopsIf a step below fails, save the error as writeErrorIf a step below fails, save the error as writeError
Try
Google SheetsGoogle SheetsAdd a row to tabName in spreadsheetUrl.Add a row to tabName in spreadsheetUrl.
ValuesAdd 1 to contactsWritten.Add 1 to contactsWritten.
On error
ValuesAdd 1 to contactsFailed.Add 1 to contactsFailed.
ValuesShow in the output: A contact could not be written to the spreadsheet: writeError as text.Show in the output: A contact could not be written to the spreadsheet: writeError as text.
ValuesSet runSummary to contactsWritten contacts were written from candidates the reader offered. contactsRejected were dropped because their details were not in the document, contactsUnreadable could not be read and contactsFailed failed to write.Set runSummary to contactsWritten contacts were written from candidates the reader offered. contactsRejected were dropped because their details were not in the document, contactsUnreadable could not be read and contactsFailed failed to write.
Decisions & LoopsIf contactsWritten is less than candidatesIf contactsWritten is less than candidates
Yes
Decisions & LoopsFinish the run: runSummary.Finish the run: runSummary.
No
ValuesShow in the output: runSummary.Show in the output: runSummary.