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

ScheduleRun every 30 days.Run every 30 days.
ValuesSet businessDescription to blank.Set businessDescription to blank.
ValuesSet yourCompanyName to blank.Set yourCompanyName to blank.
ValuesSet notionDatabaseId to blank.Set notionDatabaseId to blank.
ValuesSet titleProperty to Name.Set titleProperty to Name.
ValuesSet maxCompetitors to 6.Set maxCompetitors to 6.
TextReplace the pattern [?#].*$ with in notionDatabaseId and save it as databasePath.Replace the pattern [?#].*$ with in notionDatabaseId and save it as databasePath.
TextReplace 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.
TextExtract the first match from databaseDigits and save it as databaseId.Extract the first match from databaseDigits and save it as databaseId.
Decisions & LoopsIf databaseId is emptyIf databaseId is empty
Yes
Decisions & LoopsStop 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
TextReplace 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.
TextReplace the pattern [\W_]+ with in ownWords and save it as ownKey.Replace the pattern [\W_]+ with in ownWords and save it as ownKey.
Decisions & LoopsIf the length of ownKey is less than or equal to 2If the length of ownKey is less than or equal to 2
Yes
Decisions & LoopsStop 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
ValuesSet filedKeys to |.Set filedKeys to |.
ValuesSet existingPages to {results:[]}.Set existingPages to {results:[]}.
ValuesSet nextPage to blank.Set nextPage to blank.
ValuesSet morePages to true.Set morePages to true.
Decisions & LoopsWhile morePages is yes:While morePages is yes:
Decisions & LoopsIf 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
Decisions & LoopsStop 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 your Notion connection: 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 your Notion connection: in Notion, open the database, click the ••• menu, choose Add connections and pick the integration you connected to Lodol. Notion said: databaseError.message.
Decisions & LoopsFor each existingPage in existingPages.results:For each existingPage in existingPages.results:
TextReplace 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.
TextReplace the pattern [\W_]+ with in existingWords and save it as existingKey.Replace the pattern [\W_]+ with in existingWords and save it as existingKey.
Decisions & LoopsIf the length of existingKey is greater than 2If the length of existingKey is greater than 2
Yes
TextBuild the text @filedKeys@existingKey| and save it as filedKeys.Build the text @filedKeys@existingKey| and save it as filedKeys.
No
No steps
TextUse 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.
ValuesChange morePages to existingPages.has_more is true.Change morePages to existingPages.has_more is true.
Decisions & LoopsIf nextPage is blankIf nextPage is blank
Yes
ValuesChange morePages to false.Change morePages to false.
No
No steps
Stored ValuesGet the stored value 'examined_competitor_sites'. Save it as examinedStore.Get the stored value 'examined_competitor_sites'. Save it as examinedStore.
ValuesSet examinedSites to an empty list.Set examinedSites to an empty list.
Decisions & LoopsIf examinedStore.found is yesIf examinedStore.found is yes
Yes
ValuesChange 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
ValuesSet candidates to discovery.results.Set candidates to discovery.results.
Decisions & LoopsIf candidates is emptyIf candidates is empty
Yes
Decisions & LoopsStop 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
ListsCount the items in candidates and save it as foundCount.Count the items in candidates and save it as foundCount.
ValuesSet 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...
ValuesSet profilesWritten to 0.Set profilesWritten to 0.
ValuesSet addedLines to an empty list.Set addedLines to an empty list.
ValuesSet failureLines to an empty list.Set failureLines to an empty list.
ValuesSet leftForNextRun to 0.Set leftForNextRun to 0.
TextBuild the text because 'maxCompetitors' is @maxCompetitors and save it as leftReason.Build the text because 'maxCompetitors' is @maxCompetitors and save it as leftReason.
ValuesSet thinPages to 0.Set thinPages to 0.
Decisions & LoopsFor each candidate in candidates:For each candidate in candidates:
TextExtract the first domain from candidate.url and save it as site.Extract the first domain from candidate.url and save it as site.
Decisions & LoopsIf examinedSites contains siteIf examinedSites contains site
Yes
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf the length of failureLines is greater than or equal to 3If the length of failureLines is greater than or equal to 3
Yes
ValuesChange 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.
ValuesAdd 1 to leftForNextRun.Add 1 to leftForNextRun.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf profilesWritten is greater than or equal to maxCompetitorsIf profilesWritten is greater than or equal to maxCompetitors
Yes
ValuesAdd 1 to leftForNextRun.Add 1 to leftForNextRun.
Decisions & LoopsSkip to the next item.Skip to the next item.
No
No steps
Decisions & LoopsIf a step below fails, save the error as profileErrorIf a step below fails, save the error as profileError
Try
ValuesSet pageUrl to blank.Set pageUrl to blank.
ValuesSet sourceText to blank.Set sourceText to blank.
Decisions & LoopsIf a step below fails, save the error as resultFieldErrorIf a step below fails, save the error as resultFieldError
Try
TextTrim candidate.url and save it as pageUrl.Trim candidate.url and save it as pageUrl.
TextTrim candidate.text and save it as sourceText.Trim candidate.text and save it as sourceText.
On error
ValuesShow 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..
Decisions & LoopsIf 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
ValuesSet 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
TextTrim verdict.response_text and save it as responseText.Trim verdict.response_text and save it as responseText.
ValuesSet companyName to blank.Set companyName to blank.
ValuesSet profileBody to blank.Set profileBody to blank.
Decisions & LoopsIf responseText contains ===PROFILE===If responseText contains ===PROFILE===
Yes
TextTrim 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.
TextShorten 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.
TextReplace 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.
TextReplace the pattern [\W_]+ with in nameWords and save it as nameKey.Replace the pattern [\W_]+ with in nameWords and save it as nameKey.
ValuesSet 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.
TextCheck whether filedKeys contains |nameKey| (ignoring case) and save it as alreadyFiled.Check whether filedKeys contains |nameKey| (ignoring case) and save it as alreadyFiled.
TextCheck whether nameKey contains ownKey (ignoring case) and save it as isOurselves.Check whether nameKey contains ownKey (ignoring case) and save it as isOurselves.
Decisions & LoopsIf 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
ValuesChange isOurselves to true.Change isOurselves to true.
No
No steps
Decisions & LoopsIf nameLooksUsable is noIf nameLooksUsable is no
Yes
ListsAdd - 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
Decisions & LoopsIf site isn't blankIf site isn't blank
Yes
ListsAdd 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.
TextBuild the text @filedKeys@nameKey| and save it as filedKeys.Build the text @filedKeys@nameKey| and save it as filedKeys.
ValuesAdd 1 to profilesWritten.Add 1 to profilesWritten.
ListsAdd - 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.
Decisions & LoopsIf site isn't blankIf site isn't blank
Yes
ListsAdd 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
ListsAdd - 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
ValuesAdd 1 to thinPages.Add 1 to thinPages.
On error
ListsAdd - 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.
Decisions & LoopsIf a step below fails, save the error as memoryErrorIf a step below fails, save the error as memoryError
Try
Stored ValuesSet the stored value 'examined_competitor_sites' to examinedSites.Set the stored value 'examined_competitor_sites' to examinedSites.
On error
ListsAdd - 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.
TextJoin addedLines with a new line and save it as addedText.Join addedLines with a new line and save it as addedText.
TextJoin failureLines with a new line and save it as failureText.Join failureLines with a new line and save it as failureText.
ValuesSet summaryLines to an empty list.Set summaryLines to an empty list.
Decisions & LoopsIf profilesWritten is greater than 0If profilesWritten is greater than 0
Yes
ListsAdd 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…
ListsAdd 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
ListsAdd 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.
Decisions & LoopsIf leftForNextRun is greater than 0If leftForNextRun is greater than 0
Yes
ListsAdd 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
Decisions & LoopsIf thinPages is greater than 0If thinPages is greater than 0
Yes
ListsAdd 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
Decisions & LoopsIf failureLines isn't emptyIf failureLines isn't empty
Yes
ListsAdd 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
TextJoin summaryLines with a blank line and save it as summary.Join summaryLines with a blank line and save it as summary.
Decisions & LoopsIf failureLines isn't emptyIf failureLines isn't empty
Yes
Decisions & LoopsStop and report a problem: summary.Stop and report a problem: summary.
No
No steps
Decisions & LoopsFinish the run: summary.Finish the run: summary.