Finds the companies competing with you from a description of your business, and files a researched profile of each in Notion.

UsesClaudeExaNotion

Find out who you are competing with

Every 30 days, what your company sells is turned into a search of a company index for up to 30 businesses offering something similar. Each one not already in your Notion database gets a short profile written from the text of its own website, filed as a new page in that database. Each run adds up to six (you choose the number) and the rest wait for the next run, so the list keeps growing as new companies appear.

Each profile covers what they sell, who they target, their positioning and their claims, with a link to its source. Anything the site does not say is marked 'Not stated on their site', and a page too thin to describe is skipped rather than filled in from memory. A company already in the database, or looked at in an earlier run, is never given a second page, and your own company is left out even when its name is written differently ('Acme' or 'Acme Ltd'). The run ends with a list of the new competitors and links to their pages. If the database cannot be read, the run stops before anything is searched; if a company cannot be profiled, the run is marked failed, names it, and tries it again next time.

You need Exa, Anthropic and Notion connected, and a Notion database shared with Lodol in Notion. Only its title column is written, so any database will do. When you add it, you are asked for what you sell, your company name and the database's link.

Run every 30 days.Run every 30 days.
Set businessDescription to blank.Set businessDescription to blank.
Set yourCompanyName to blank.Set yourCompanyName to blank.
Set notionDatabaseId to blank.Set notionDatabaseId to blank.
Set titleProperty to “Name”.Set titleProperty to “Name”.
Set maxCompetitors to 6.Set maxCompetitors to 6.
Replace the pattern “[?#].*$” with “” in notionDatabaseId and save it as databasePath.Replace the pattern “[?#].*$” with “” in notionDatabaseId and save it as databasePath.
Replace the pattern “([0-9a-fA-F]{8})-([0-9a-fA-F]{4})-([0-9a-fA-F]{4})-([0-9a-fA-F]{4})-([0-9a-fA-F]{12})” with “$1$2$3$4$5” in databasePath and save it as databaseDigits.Replace the pattern “([0-9a-fA-F]{8})-([0-9a-fA-F]{4})-([0-9a-fA-F]{4})-([0-9a-fA-F]{4})-([0-9a-fA-F]{12})” with “$1$2$3$4$5” in databasePath and save it as databaseDigits.
Extract the first match from databaseDigits and save it as databaseId.Extract the first match from databaseDigits and save it as databaseId.
If databaseId is emptyIf databaseId is empty
Yes
Stop and report a problem: The 'notionDatabaseId' step does not hold a Notion database link or ID. In Notion, open the database as a full page, click Share, then Copy link, and paste that link into 'notionDatabaseId'.Stop and report a problem: The 'notionDatabaseId' step does not hold a Notion database link or ID. In Notion, open the database as a full page, click Share, then Copy link, and paste that link into 'notionDatabaseId'.
No
No steps
Replace the pattern “(?i)\b(inc|incorporated|ltd|limited|llc|llp|lp|plc|corp|corporation|co|company|gmbh|ag|sa|sas|sarl|srl|spa|bv|nv|oy|ab|as|aps|pty|kk)\b\.?” with “ ” in yourCompanyName and save it as ownWords.Replace the pattern “(?i)\b(inc|incorporated|ltd|limited|llc|llp|lp|plc|corp|corporation|co|company|gmbh|ag|sa|sas|sarl|srl|spa|bv|nv|oy|ab|as|aps|pty|kk)\b\.?” with “ ” in yourCompanyName and save it as ownWords.
Replace the pattern “[\W_]+” with “ ” in ownWords and save it as ownKey.Replace the pattern “[\W_]+” with “ ” in ownWords and save it as ownKey.
If the length of ownKey is less than or equal to 2If the length of ownKey is less than or equal to 2
Yes
Stop and report a problem: The 'yourCompanyName' step needs your company's name, for example 'Physiodesk', so the search does not write a profile of you.Stop and report a problem: The 'yourCompanyName' step needs your company's name, for example 'Physiodesk', so the search does not write a profile of you.
No
No steps
Set filedKeys to “|”.Set filedKeys to “|”.
Set existingPages to a record of results.Set existingPages to a record of results.
Set nextPage to blank.Set nextPage to blank.
Set morePages to true.Set morePages to true.
While morePages is yes:While morePages is yes:
If a step below fails, save the error as databaseErrorIf a step below fails, save the error as databaseError
Try
NotionNotionFind pages in databaseId. Save it as existingPages.Find pages in databaseId. Save it as existingPages.
On error
Stop and report a problem: Could not read your Notion database, so nothing was searched or written. Check the database link in 'notionDatabaseId', and share the database with Lodol in Notion: open the database, click the ••• menu, choose Add connections and pick the integration you connected to Lodol. Notion said: databaseError.message.Stop and report a problem: Could not read your Notion database, so nothing was searched or written. Check the database link in 'notionDatabaseId', and share the database with Lodol in Notion: open the database, click the ••• menu, choose Add connections and pick the integration you connected to Lodol. Notion said: databaseError.message.
For each existingPage in existingPages.results:For each existingPage in existingPages.results:
Replace the pattern “(?i)\b(inc|incorporated|ltd|limited|llc|llp|lp|plc|corp|corporation|co|company|gmbh|ag|sa|sas|sarl|srl|spa|bv|nv|oy|ab|as|aps|pty|kk)\b\.?” with “ ” in existingPage.title and save it as existingWords.Replace the pattern “(?i)\b(inc|incorporated|ltd|limited|llc|llp|lp|plc|corp|corporation|co|company|gmbh|ag|sa|sas|sarl|srl|spa|bv|nv|oy|ab|as|aps|pty|kk)\b\.?” with “ ” in existingPage.title and save it as existingWords.
Replace the pattern “[\W_]+” with “ ” in existingWords and save it as existingKey.Replace the pattern “[\W_]+” with “ ” in existingWords and save it as existingKey.
If the length of existingKey is greater than 2If the length of existingKey is greater than 2
Yes
Build the text “@filedKeys@existingKey|” and save it as filedKeys.Build the text “@filedKeys@existingKey|” and save it as filedKeys.
No
No steps
Use existingPages.next_cursor, or “” if it is empty and save it as nextPage.Use existingPages.next_cursor, or “” if it is empty and save it as nextPage.
Change morePages to existingPages.has_more is true.Change morePages to existingPages.has_more is true.
If nextPage is blankIf nextPage is blank
Yes
Change morePages to false.Change morePages to false.
No
No steps
Get the stored value 'examined_competitor_sites'. Save it as examinedStore.Get the stored value 'examined_competitor_sites'. Save it as examinedStore.
Set examinedSites to an empty list.Set examinedSites to an empty list.
If examinedStore.found is yesIf examinedStore.found is yes
Yes
Change examinedSites to examinedStore.value.Change examinedSites to examinedStore.value.
No
No steps
ExaExaSearch the web for 'Companies selling a competing product or service to this business: businessDescription'. Save it as discovery.Search the web for 'Companies selling a competing product or service to this business: businessDescription'. Save it as discovery. Number of results: 30 Include relevant excerpts: No
Set candidates to discovery.results.Set candidates to discovery.results.
If candidates is emptyIf candidates is empty
Yes
Stop and report a problem: The company search found no companies for your 'businessDescription'. Describe what you sell in plainer, broader words - for example 'online booking software for physiotherapy clinics' - then run it again.Stop and report a problem: The company search found no companies for your 'businessDescription'. Describe what you sell in plainer, broader words - for example 'online booking software for physiotherapy clinics' - then run it again.
No
No steps
Count the items in candidates and save it as foundCount.Count the items in candidates and save it as foundCount.
Set promptIntro to:Set promptIntro to:You are writing one competitor profile for a company research database. Below is the text of one company's own website. Write the profile using ONLY facts stated in that text. Rules: - Never use anything you know about this company from anywhere else. - Never guess or estimate pricing, plans, customer numbers, headcount, funding or revenue. If the page does not state it, do not mention it. - If the page does not cover a section, write exactly: Not stated on their site. - Keep the whole profile under 200 words. Reply in exactly this format and nothing else: <the company's own short name, o...
Set profilesWritten to 0.Set profilesWritten to 0.
Set addedLines to an empty list.Set addedLines to an empty list.
Set failureLines to an empty list.Set failureLines to an empty list.
Set leftForNextRun to 0.Set leftForNextRun to 0.
Build the text “because 'maxCompetitors' is @maxCompetitors” and save it as leftReason.Build the text “because 'maxCompetitors' is @maxCompetitors” and save it as leftReason.
Set thinPages to 0.Set thinPages to 0.
For each candidate in candidates:For each candidate in candidates:
Extract the first domain from candidate.url and save it as site.Extract the first domain from candidate.url and save it as site.
If examinedSites contains siteIf examinedSites contains site
Yes
Skip to the next item.Skip to the next item.
No
No steps
If the length of failureLines is greater than or equal to 3If the length of failureLines is greater than or equal to 3
Yes
Change leftReason to “because 3 companies could not be profiled (listed below), so the rest were not tried”.Change leftReason to “because 3 companies could not be profiled (listed below), so the rest were not tried”.
Add 1 to leftForNextRun.Add 1 to leftForNextRun.
Skip to the next item.Skip to the next item.
No
No steps
If profilesWritten is greater than or equal to maxCompetitorsIf profilesWritten is greater than or equal to maxCompetitors
Yes
Add 1 to leftForNextRun.Add 1 to leftForNextRun.
Skip to the next item.Skip to the next item.
No
No steps
If a step below fails, save the error as profileErrorIf a step below fails, save the error as profileError
Try
Set pageUrl to blank.Set pageUrl to blank.
Set sourceText to blank.Set sourceText to blank.
If a step below fails, save the error as resultFieldErrorIf a step below fails, save the error as resultFieldError
Try
Trim candidate.url and save it as pageUrl.Trim candidate.url and save it as pageUrl.
Trim candidate.text and save it as sourceText.Trim candidate.text and save it as sourceText.
On error
Show in the output: “Skipped a search result that had no web address or no readable page text.”.Show in the output: “Skipped a search result that had no web address or no readable page text.”.
If the length of sourceText is greater than or equal to 200 and pageUrl contains…If the length of sourceText is greater than or equal to 200 and pageUrl contains…
Yes
Set prompt to promptIntroSet prompt to promptIntro OUR OWN BUSINESS (context only - never a source of facts about them): businessDescription THEIR WEBSITE TEXT (the only source of facts about them): sourceText truncated to 6000 characters.
ClaudeClaudeAsk Claude: prompt. Save it as verdict.Ask Claude: prompt. Save it as verdict. Maximum response length: 500
Trim verdict.response_text and save it as responseText.Trim verdict.response_text and save it as responseText.
Set companyName to blank.Set companyName to blank.
Set profileBody to blank.Set profileBody to blank.
If responseText contains “===PROFILE===”If responseText contains “===PROFILE===”
Yes
Trim the first item of responseText split by “===PROFILE===” and save it as companyName.Trim the first item of responseText split by “===PROFILE===” and save it as companyName.
Shorten the last item of responseText split by “===PROFILE===” to 1800 characters and save it as profileBody.Shorten the last item of responseText split by “===PROFILE===” to 1800 characters and save it as profileBody.
Replace the pattern “(?i)\b(inc|incorporated|ltd|limited|llc|llp|lp|plc|corp|corporation|co|company|gmbh|ag|sa|sas|sarl|srl|spa|bv|nv|oy|ab|as|aps|pty|kk)\b\.?” with “ ” in companyName and save it as nameWords.Replace the pattern “(?i)\b(inc|incorporated|ltd|limited|llc|llp|lp|plc|corp|corporation|co|company|gmbh|ag|sa|sas|sarl|srl|spa|bv|nv|oy|ab|as|aps|pty|kk)\b\.?” with “ ” in companyName and save it as nameWords.
Replace the pattern “[\W_]+” with “ ” in nameWords and save it as nameKey.Replace the pattern “[\W_]+” with “ ” in nameWords and save it as nameKey.
Set nameLooksUsable to the length of companyName is greater than 0 and the length of companyName is less than or equal to 80.Set nameLooksUsable to the length of companyName is greater than 0 and the length of companyName is less than or equal to 80.
Check whether filedKeys contains |nameKey| (ignoring case) and save it as alreadyFiled.Check whether filedKeys contains |nameKey| (ignoring case) and save it as alreadyFiled.
Check whether nameKey contains ownKey (ignoring case) and save it as isOurselves.Check whether nameKey contains ownKey (ignoring case) and save it as isOurselves.
If the length of nameKey is greater than 2 and ownKey contains nameKey (ignoring…If the length of nameKey is greater than 2 and ownKey contains nameKey (ignoring…
Yes
Change isOurselves to true.Change isOurselves to true.
No
No steps
If nameLooksUsable is noIf nameLooksUsable is no
Yes
Add - pageUrl: the AI did not give a usable company name to the end of failureLines and save it as failureLines.Add - pageUrl: the AI did not give a usable company name to the end of failureLines and save it as failureLines.
Else if @alreadyFiled is yes or @isOurselves is yes
If site isn't blankIf site isn't blank
Yes
Add site to the end of examinedSites and save it as examinedSites.Add site to the end of examinedSites and save it as examinedSites.
No
No steps
Otherwise
NotionNotionCreate the page companyName in databaseId. Save it as newPage.Create the page companyName in databaseId. Save it as newPage. Title column: titleProperty
Build the text “@filedKeys@nameKey|” and save it as filedKeys.Build the text “@filedKeys@nameKey|” and save it as filedKeys.
Add 1 to profilesWritten.Add 1 to profilesWritten.
Add - companyName: newPage.url to the end of addedLines and save it as addedLines.Add - companyName: newPage.url to the end of addedLines and save it as addedLines.
If site isn't blankIf site isn't blank
Yes
Add site to the end of examinedSites and save it as examinedSites.Add site to the end of examinedSites and save it as examinedSites.
No
No steps
No
Add - pageUrl: the AI's profile did not come back in the expected format to the end of failureLines and save it as failureLines.Add - pageUrl: the AI's profile did not come back in the expected format to the end of failureLines and save it as failureLines.
No
Add 1 to thinPages.Add 1 to thinPages.
On error
Add - candidate.url: profileError.message to the end of failureLines and save it as failureLines.Add - candidate.url: profileError.message to the end of failureLines and save it as failureLines.
If a step below fails, save the error as memoryErrorIf a step below fails, save the error as memoryError
Try
Set the stored value 'examined_competitor_sites' to examinedSites.Set the stored value 'examined_competitor_sites' to examinedSites.
On error
Add - Could not save the list of sites already looked at, so they will be looked at again next run: memoryError.message to the end of failureLines and save it as failureLines.Add - Could not save the list of sites already looked at, so they will be looked at again next run: memoryError.message to the end of failureLines and save it as failureLines.
Join addedLines with a new line and save it as addedText.Join addedLines with a new line and save it as addedText.
Join failureLines with a new line and save it as failureText.Join failureLines with a new line and save it as failureText.
Set summaryLines to an empty list.Set summaryLines to an empty list.
If profilesWritten is greater than 0If profilesWritten is greater than 0
Yes
Add Added profilesWritten new competitor(s) to your Notion database:Add Added profilesWritten new competitor(s) to your Notion database: addedText to the end of summaryLines and save it as summaryLines.
Else if @leftForNextRun plus @thinPages is 0 and @failureLi…
Add No new competitors this run. The search found foundCount companies, and each one is already in your Notion database, was looked at in an earlier run, or is your own company. to the end of summaryLines and save it as summaryLines.Add No new competitors this run. The search found foundCount companies, and each one is already in your Notion database, was looked at in an earlier run, or is your own company. to the end of summaryLines and save it as summaryLines.
Otherwise
Add “No new competitors were added this run.” to the end of summaryLines and save it as summaryLines.Add “No new competitors were added this run.” to the end of summaryLines and save it as summaryLines.
If leftForNextRun is greater than 0If leftForNextRun is greater than 0
Yes
Add leftForNextRun more companies from the search were left for the next run, leftReason. to the end of summaryLines and save it as summaryLines.Add leftForNextRun more companies from the search were left for the next run, leftReason. to the end of summaryLines and save it as summaryLines.
No
No steps
If thinPages is greater than 0If thinPages is greater than 0
Yes
Add thinPages had too little text on their website to profile, so they were skipped. to the end of summaryLines and save it as summaryLines.Add thinPages had too little text on their website to profile, so they were skipped. to the end of summaryLines and save it as summaryLines.
No
No steps
If failureLines isn't emptyIf failureLines isn't empty
Yes
Add Problems this run (these companies are tried again next run):Add Problems this run (these companies are tried again next run): failureText to the end of summaryLines and save it as summaryLines.
No
No steps
Join summaryLines with a blank line and save it as summary.Join summaryLines with a blank line and save it as summary.
If failureLines isn't emptyIf failureLines isn't empty
Yes
Stop and report a problem: summary.Stop and report a problem: summary.
No
No steps
Finish the run: summary.Finish the run: summary.