Nodes:
name: When clicking "Execute Workflow"
type: n8n-nodes-base.manualTrigger
name: HTTP Request
type: n8n-nodes-base.httpRequest
parameters: url: =https://www.{{ $node["Split In Batches"].json["Domain"] }}
options: redirect: redirect: followRedirects: yes
continueOnFail: yes
name: HTML Extract
type: n8n-nodes-base.htmlExtract
parameters: options: trimValues: no
extractionValues: values: html
continueOnFail: yes
name: OpenAI
type: n8n-nodes-base.openAi
parameters: prompt: =This is the content of the website {{ $node["Split In Batches"].json["Domain"] }}:"{{ $json["contentShort"] }}"

In a JSON format:

- Give me the value proposition of the company. In less than 25 words. In English. Casual Tone. Format is: "[Company Name] helps [target audience] [achieve desired outcome] and [additional benefit]"

- Give me the industry of the company. (Classify using this industry list: [Agriculture, Arts, Construction, Consumer Goods, Education, Entertainment, Finance, Other, Health Care, Legal, Manufacturing, Media & Communications, Public Administration, Advertisements, Real Estate, Recreation & Travel, Retail, Software, Transportation & Logistics, Wellness & Fitness] if it's ambiguous between Sofware and Consumer Goods, prefer Consumer Goods)

- Guess the target audience of each company.(Classify and choose 1 from this list: [sales teams, marketing teams, HR teams, customer Service teams, consumers, C-levels] Write it in lowercase)

- Tell me if they are B2B or B2C

format should be:
{"value_proposition": value_proposition,
"industry": industry,
"target_audience": target_audience, 
"market": market }

JSON:
options: topP: 1
maxTokens: 120
temperature: 0
continueOnFail: yes
name: Merge
type: n8n-nodes-base.merge
parameters: mode: combine
combinationMode: mergeByPosition
name: Clean Content
type: n8n-nodes-base.code
parameters: mode: runOnceForEachItem
jsCode: if ($input.item.json.body){



$input.item.json.content = $input.item.json.body.replaceAll('/^\s+|\s+$/g', '').replace('/(\r\n|\n|\r)/gm', "").replace(/\s+/g, ' ')


  $input.item.json.contentShort = $input.item.json.content.slice(0, 10000)
}




return $input.item
executeOnce: no
continueOnFail: yes
alwaysOutputData: yes
name: Update Google Sheets
type: n8n-nodes-base.googleSheets
parameters: fieldsUi: values: column: Market
fieldValue: ={{ $json["market"] }}
column: Industry
fieldValue: ={{ $json["industry"] }}
column: Value Proposition
fieldValue: ={{ $json["value_proposition"] }}
column: Target Audience
fieldValue: ={{ $json["target_audience"] }}
operation: update
sheetName: __rl: yes
mode: list
value: gid=0
cachedResultUrl: https://docs.google.com/spreadsheets/d/13h8HPWKha5kZHDeKxAPQvQqAOonof5cgpxzh79tIQfY/edit#gid=0
cachedResultName: Sheet1
documentId: __rl: yes
mode: url
value: https://docs.google.com/spreadsheets/d/18iZ59I0q2AeElqcEpyJECNlSv4M6iJll9PQzXQkqEUk/edit#gid=0
__regex: https:\/\/(?:drive|docs)\.google\.com\/\w+\/d\/([0-9a-zA-Z\-_]+)(?:\/.*|)
valueToMatchOn: ={{ $json["Domain"] }}
columnToMatchOn: Domain
name: Parse JSON
type: n8n-nodes-base.code
parameters: mode: runOnceForEachItem
jsCode: // Add a new field called 'myNewField' to the
// JSON of the item
$input.item.json.value_proposition=JSON.parse($input.item.json.text).value_proposition

$input.item.json.industry=JSON.parse($input.item.json.text).industry

$input.item.json.market=JSON.parse($input.item.json.text).market

$input.item.json.target_audience=JSON.parse($input.item.json.text).target_audience

return $input.item;
name: Read Google Sheets
type: n8n-nodes-base.googleSheets
parameters: sheetName: __rl: yes
mode: list
value: gid=0
cachedResultUrl: https://docs.google.com/spreadsheets/d/13h8HPWKha5kZHDeKxAPQvQqAOonof5cgpxzh79tIQfY/edit#gid=0
cachedResultName: Sheet1
documentId: __rl: yes
mode: url
value: https://docs.google.com/spreadsheets/d/18iZ59I0q2AeElqcEpyJECNlSv4M6iJll9PQzXQkqEUk/edit#gid=0
__regex: https:\/\/(?:drive|docs)\.google\.com\/\w+\/d\/([0-9a-zA-Z\-_]+)(?:\/.*|)
name: Split In Batches
type: n8n-nodes-base.splitInBatches
name: Wait
type: n8n-nodes-base.wait
parameters: unit: seconds

Connections:
Wait: main: node: Split In Batches
type: main
Merge: main: node: Update Google Sheets
type: main
OpenAI: main: node: Parse JSON
type: main
Parse JSON: main: node: Merge
type: main
HTML Extract: main: node: Clean Content
type: main
HTTP Request: main: node: HTML Extract
type: main
Clean Content: main: node: OpenAI
type: main
Split In Batches: main: node: HTTP Request
type: main
node: Merge
type: main
Read Google Sheets: main: node: Split In Batches
type: main
Update Google Sheets: main: node: Wait
type: main
When clicking "Execute Workflow": main: node: Read Google Sheets
type: main