Turns a topic into the questions worth asking, searches each one, and files the findings in Notion with the source behind every line.

UsesClaudeJina AINotion

Research a topic question by question

Give it a topic and run it, and the AI breaks it into the specific questions it raises. Each question is searched separately, the search results become numbered extracts, and the AI writes one finding per extract with its number on every line.

What you get is a new page in your Notion database, titled with your topic, holding the questions asked, the findings with a link on every line to its source, and a numbered list of the pages behind them. Nothing unsourced reaches the page: a finding citing a number that was never fetched is discarded, as is any line containing a web address, and at most one finding is kept per source. If the results carry too little text to write from, or every finding is discarded, the run stops and nothing is filed. The page ends with a count of sources used and lines dropped, so a thin run cannot pass for a thorough one.

Each run files a fresh page and touches nothing you already have. The database needs to be shared with your Notion integration.

ValuesSet researchTopic to blank.Set researchTopic to blank.
ValuesSet notionDatabaseId to blank.Set notionDatabaseId to blank.
ValuesSet titlePropertyName to Name.Set titlePropertyName to Name.
ValuesSet maxQuestions to 5.Set maxQuestions to 5.
ValuesSet resultsPerQuestion to 4.Set resultsPerQuestion to 4.
ValuesSet maxSources to 12.Set maxSources to 12.
MathSet questionLimit to maxQuestions multiplied by 1.Set questionLimit to maxQuestions multiplied by 1.
Decisions & LoopsIf questionLimit is greater than 20If questionLimit is greater than 20
Yes
ValuesChange questionLimit to 20.Change questionLimit to 20.
No
No steps
MathSet sourceLimit to maxSources multiplied by 1.Set sourceLimit to maxSources multiplied by 1.
Decisions & LoopsIf sourceLimit is greater than 30If sourceLimit is greater than 30
Yes
ValuesChange sourceLimit to 30.Change sourceLimit to 30.
No
No steps
MathSet resultsWanted to resultsPerQuestion multiplied by 1.Set resultsWanted to resultsPerQuestion multiplied by 1.
Decisions & LoopsIf resultsWanted is greater than 10If resultsWanted is greater than 10
Yes
ValuesChange resultsWanted to 10.Change resultsWanted to 10.
No
No steps
ValuesSet planPrompt to Break the research topic below into the specific questions somebody would have to answer to cover it properly.Set planPrompt to Break the research topic below into the specific questions somebody would have to answer to cover it properly. Rules: - Write one question per line and nothing else. No numbering, no bullets, no preamble, no closing remark. - Every line must end with a question mark. A line that does not is ignored. - Each question must be answerable from public sources and specific enough to type into a search engine. - Ask about different parts of the topic rather than rewording one question. - Write at most maxQuestions questions. Topic: researchTopic.
ValuesSet planText to blank.Set planText to blank.
Decisions & LoopsIf a step below fails, save the error as planErrorIf a step below fails, save the error as planError
Try
ClaudeClaudeAsk Claude: planPrompt. Save it as plan.Ask Claude: planPrompt. Save it as plan. Maximum response length: 400
TextTrim plan.response_text and save it as planText.Trim plan.response_text and save it as planText.
On error
Decisions & LoopsStop and report a problem: Could not work out the research questions, so nothing was searched for and nothing was filed. Check the model connection and run it again.Stop and report a problem: Could not work out the research questions, so nothing was searched for and nothing was filed. Check the model connection and run it again.
ValuesSet questions to an empty list.Set questions to an empty list.
ValuesSet questionCount to 0.Set questionCount to 0.
Decisions & LoopsFor each planLine in planText split by a new line:For each planLine in planText split by a new line:
Decisions & LoopsIf questionCount is greater than or equal to questionLimitIf questionCount is greater than or equal to questionLimit
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
TextTrim planLine and save it as candidate.Trim planLine and save it as candidate.
Decisions & LoopsIf candidate doesn't end with ?If candidate doesn't end with ?
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf the length of candidate is less than 8If the length of candidate is less than 8
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ListsAdd candidate to the end of questions and save it as questions.Add candidate to the end of questions and save it as questions.
ValuesAdd 1 to questionCount.Add 1 to questionCount.
Decisions & LoopsIf questionCount is 0If questionCount is 0
Yes
Decisions & LoopsStop and report a problem: No research questions came back, so there was nothing to search for. Try a fuller description of the topic in the 'researchTopic' step.Stop and report a problem: No research questions came back, so there was nothing to search for. Try a fuller description of the topic in the 'researchTopic' step.
No
No steps
ValuesSet sources to an empty list.Set sources to an empty list.
ValuesSet sourceUrls to an empty list.Set sourceUrls to an empty list.
ValuesSet sourceCount to 0.Set sourceCount to 0.
ValuesSet evidenceCharacters to 0.Set evidenceCharacters to 0.
Decisions & LoopsFor each question in questions:For each question in questions:
Decisions & LoopsIf sourceCount is greater than or equal to sourceLimitIf sourceCount is greater than or equal to sourceLimit
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
ValuesSet results to an empty list.Set results to an empty list.
Decisions & LoopsIf a step below fails, save the error as searchErrorIf a step below fails, save the error as searchError
Try
Jina AIJina AISearch the web for question with Jina. Save it as found.Search the web for question with Jina. Save it as found.
ValuesChange results to found.results.Change results to found.results.
On error
ValuesShow in the output: Could not search for one of the research questions: question. The other questions still ran.Show in the output: Could not search for one of the research questions: question. The other questions still ran.
Decisions & LoopsFor each result in results:For each result in results:
Decisions & LoopsIf sourceCount is greater than or equal to sourceLimitIf sourceCount is greater than or equal to sourceLimit
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
TextTrim result.url and save it as resultUrl.Trim result.url and save it as resultUrl.
Decisions & LoopsIf resultUrl doesn't start with httpIf resultUrl doesn't start with http
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf sourceUrls contains resultUrlIf sourceUrls contains resultUrl
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextTrim result.description and save it as resultText.Trim result.description and save it as resultText.
Decisions & LoopsIf resultText is empty or resultText is nullIf resultText is empty or resultText is null
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextTrim result.title and save it as resultTitle.Trim result.title and save it as resultTitle.
Decisions & LoopsIf resultTitle is empty or resultTitle is nullIf resultTitle is empty or resultTitle is null
Yes
ValuesChange resultTitle to Untitled page.Change resultTitle to Untitled page.
No
No steps
ValuesAdd 1 to sourceCount.Add 1 to sourceCount.
ListsAdd resultUrl to the end of sourceUrls and save it as sourceUrls.Add resultUrl to the end of sourceUrls and save it as sourceUrls.
ListsAdd a record of number, title, url, and snippet to the end of sources and save it as sources.Add a record of number, title, url, and snippet to the end of sources and save it as sources.
MathChange evidenceCharacters to evidenceCharacters plus the length of resultText.Change evidenceCharacters to evidenceCharacters plus the length of resultText.
Decisions & LoopsIf sourceCount is 0If sourceCount is 0
Yes
Decisions & LoopsStop and report a problem: The searches came back with nothing that had any text behind it, so there was nothing to write from and nothing was filed.Stop and report a problem: The searches came back with nothing that had any text behind it, so there was nothing to write from and nothing was filed.
No
No steps
Decisions & LoopsIf evidenceCharacters is less than 200If evidenceCharacters is less than 200
Yes
Decisions & LoopsStop and report a problem: There was not enough content behind the search results to write anything honest from, so nothing was filed. Try a broader topic, or raise 'resultsPerQuestion'.Stop and report a problem: There was not enough content behind the search results to write anything honest from, so nothing was filed. Try a broader topic, or raise 'resultsPerQuestion'.
No
No steps
ValuesSet evidenceLines to an empty list.Set evidenceLines to an empty list.
Decisions & LoopsFor each source in sources:For each source in sources:
ValuesSet headLine to [source.number] source.title.Set headLine to [source.number] source.title.
ListsAdd headLineAdd headLine source.snippet to the end of evidenceLines and save it as evidenceLines.
TextJoin evidenceLines with a blank line and save it as evidenceText.Join evidenceLines with a blank line and save it as evidenceText.
TextJoin questions with a new line and save it as questionText.Join questions with a new line and save it as questionText.
ValuesSet synthesisPrompt to You are writing up research findings from extracts that were fetched for you. Use only those extracts.Set synthesisPrompt to You are writing up research findings from extracts that were fetched for you. Use only those extracts. Rules: - Write one finding per line and nothing else. No preamble, no headings, no closing remark. - Each line must be exactly: the extract's number, a vertical bar, then one sentence. For example: 3|Two thirds of the councils surveyed took more than a week to respond. - The sentence must say what that one extract says. Do not merge two extracts into one line, and do not conclude anything the extract does not state. - Never write a web address. Cite by number only. A line containing an address is discarded. - A line whose number is not one of the extracts below is discarded, so do not invent numbers. - Leave out an extract that says nothing useful about the topic rather than filling the gap from memory. - Write at most one line per extract. Topic: researchTopic Questions asked: questionText.
ValuesChange synthesisPrompt to synthesisPromptChange synthesisPrompt to synthesisPrompt Extracts: evidenceText.
ValuesSet findingsText to blank.Set findingsText to blank.
Decisions & LoopsIf a step below fails, save the error as synthesisErrorIf a step below fails, save the error as synthesisError
Try
ClaudeClaudeAsk Claude: synthesisPrompt. Save it as synthesis.Ask Claude: synthesisPrompt. Save it as synthesis. Maximum response length: 1500
TextTrim synthesis.response_text and save it as findingsText.Trim synthesis.response_text and save it as findingsText.
On error
Decisions & LoopsStop and report a problem: Could not write up the findings, so nothing was filed. The searches ran, so a second attempt costs the search credits again.Stop and report a problem: Could not write up the findings, so nothing was filed. The searches ran, so a second attempt costs the search credits again.
ValuesSet findingBlocks to an empty list.Set findingBlocks to an empty list.
ValuesSet acceptedCount to 0.Set acceptedCount to 0.
ValuesSet droppedCount to 0.Set droppedCount to 0.
Decisions & LoopsFor each findingLine in findingsText split by a new line:For each findingLine in findingsText split by a new line:
Decisions & LoopsIf acceptedCount is greater than or equal to sourceCountIf acceptedCount is greater than or equal to sourceCount
Yes
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
TextTrim findingLine and save it as rawLine.Trim findingLine and save it as rawLine.
Decisions & LoopsIf rawLine is emptyIf rawLine is empty
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf rawLine doesn't contain |If rawLine doesn't contain |
Yes
ValuesAdd 1 to droppedCount.Add 1 to droppedCount.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
TextSplit rawLine by | and save it as lineParts.Split rawLine by | and save it as lineParts.
TextTrim the first item of lineParts with [ replaced by with ] replaced by with . replaced by and save it as citedNumber.Trim the first item of lineParts with [ replaced by with ] replaced by with . replaced by and save it as citedNumber.
TextTrim the items from index 1 onward of lineParts joined by | and save it as findingText.Trim the items from index 1 onward of lineParts joined by | and save it as findingText.
Decisions & LoopsIf findingText is emptyIf findingText is empty
Yes
ValuesAdd 1 to droppedCount.Add 1 to droppedCount.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf findingText contains http (ignoring case)If findingText contains http (ignoring case)
Yes
ValuesAdd 1 to droppedCount.Add 1 to droppedCount.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesSet citedUrl to blank.Set citedUrl to blank.
Decisions & LoopsFor each candidateSource in sources:For each candidateSource in sources:
Decisions & LoopsIf candidateSource.number is citedNumberIf candidateSource.number is citedNumber
Yes
ValuesChange citedUrl to candidateSource.url.Change citedUrl to candidateSource.url.
Decisions & LoopsStop repeating.Stop repeating.
No
No steps
Decisions & LoopsIf citedUrl is emptyIf citedUrl is empty
Yes
ValuesAdd 1 to droppedCount.Add 1 to droppedCount.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
ValuesAdd 1 to acceptedCount.Add 1 to acceptedCount.
ListsAdd a record of object, type, and paragraph to the end of findingBlocks and save it as findingBlocks.Add a record of object, type, and paragraph to the end of findingBlocks and save it as findingBlocks.
Decisions & LoopsIf acceptedCount is 0If acceptedCount is 0
Yes
Decisions & LoopsStop and report a problem: None of the write-up could be tied back to a page that was actually read, so nothing was filed. Nothing unsourced is ever written to Notion.Stop and report a problem: None of the write-up could be tied back to a page that was actually read, so nothing was filed. Nothing unsourced is ever written to Notion.
No
No steps
TextShorten researchTopic to 90 characters and save it as pageTitle.Shorten researchTopic to 90 characters and save it as pageTitle.
ValuesSet page to nothing.Set page to nothing.
ValuesSet pageId to blank.Set pageId to blank.
Decisions & LoopsIf a step below fails, save the error as notionErrorIf a step below fails, save the error as notionError
Try
NotionNotionCreate the page pageTitle in notionDatabaseId. Save it as page.Create the page pageTitle in notionDatabaseId. Save it as page.
TextTrim page.id and save it as pageId.Trim page.id and save it as pageId.
On error
Decisions & LoopsStop and report a problem: Could not create the page in Notion, so the write-up was not filed. Check that the database id is right and that the database is shared with your Notion integration.Stop and report a problem: Could not create the page in Notion, so the write-up was not filed. Check that the database id is right and that the database is shared with your Notion integration.
Decisions & LoopsIf pageId is empty or pageId is nullIf pageId is empty or pageId is null
Yes
Decisions & LoopsStop and report a problem: Notion did not return a page id, so there was nowhere to write the findings.Stop and report a problem: Notion did not return a page id, so there was nowhere to write the findings.
No
No steps
ValuesSet questionBlocks to an empty list.Set questionBlocks to an empty list.
Decisions & LoopsFor each askedQuestion in questions:For each askedQuestion in questions:
ListsAdd a record of object, type, and bulleted list item to the end of questionBlocks and save it as questionBlocks.Add a record of object, type, and bulleted list item to the end of questionBlocks and save it as questionBlocks.
ValuesSet sourceBlocks to an empty list.Set sourceBlocks to an empty list.
Decisions & LoopsFor each citedSource in sources:For each citedSource in sources:
ValuesSet sourceLabel to [citedSource.number] citedSource.title - .Set sourceLabel to [citedSource.number] citedSource.title - .
ListsAdd a record of object, type, and bulleted list item to the end of sourceBlocks and save it as sourceBlocks.Add a record of object, type, and bulleted list item to the end of sourceBlocks and save it as sourceBlocks.
ValuesSet coverageNote to Written from sourceCount sources found across questionCount research questions.Set coverageNote to Written from sourceCount sources found across questionCount research questions.
ValuesChange coverageNote to coverageNote droppedCount lines the model wrote were dropped because they did not point at one of those sources. Every statement above is what its own source says, not a conclusion drawn beyond it.Change coverageNote to coverageNote droppedCount lines the model wrote were dropped because they did not point at one of those sources. Every statement above is what its own source says, not a conclusion drawn beyond it.
ValuesSet pageBlocks to [{object:block,type:heading_2,heading_2:{rich_text:[{type:text,text:{content:Questions asked}}]}}].Set pageBlocks to [{object:block,type:heading_2,heading_2:{rich_text:[{type:text,text:{content:Questions asked}}]}}].
ListsCombine pageBlocks and questionBlocks into one list and save it as pageBlocks.Combine pageBlocks and questionBlocks into one list and save it as pageBlocks.
ListsAdd {object:block,type:heading_2,heading_2:{rich_text:[{type:text,text:{content:Findings}}]}} to the end of pageBlocks and save it as pageBlocks.Add {object:block,type:heading_2,heading_2:{rich_text:[{type:text,text:{content:Findings}}]}} to the end of pageBlocks and save it as pageBlocks.
ListsCombine pageBlocks and findingBlocks into one list and save it as pageBlocks.Combine pageBlocks and findingBlocks into one list and save it as pageBlocks.
ListsAdd {object:block,type:heading_2,heading_2:{rich_text:[{type:text,text:{content:Sources}}]}} to the end of pageBlocks and save it as pageBlocks.Add {object:block,type:heading_2,heading_2:{rich_text:[{type:text,text:{content:Sources}}]}} to the end of pageBlocks and save it as pageBlocks.
ListsCombine pageBlocks and sourceBlocks into one list and save it as pageBlocks.Combine pageBlocks and sourceBlocks into one list and save it as pageBlocks.
ListsAdd a record of object, type, and paragraph to the end of pageBlocks and save it as pageBlocks.Add a record of object, type, and paragraph to the end of pageBlocks and save it as pageBlocks.
NotionNotionAdd content to pageId.Add content to pageId.
ValuesShow in the output: Filed acceptedCount sourced findings into Notion from sourceCount sources.Show in the output: Filed acceptedCount sourced findings into Notion from sourceCount sources.