{"product_id":"n8n-workflow-scrape-portfolio-credits-with-openai-google-sheets","title":"n8n Workflow: Scrape Portfolio Credits with OpenAI \u0026 Google Sheets","description":"\u003ch3\u003eScrape portfolio case-study pages from your Google Sheets and extract project credits with OpenAI\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow reads a list of portfolio URLs from Google Sheets, fetches each page, converts the HTML to clean text, and uses an OpenAI chat model to extract structured credits (Agency, Brand, Project Name). It then writes both results and errors back to Google Sheets—marking each input row as \u003cstrong\u003eDone\u003c\/strong\u003e so you can run it repeatedly.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRun manually\u003c\/strong\u003e to start the process.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLoad input rows\u003c\/strong\u003e from your Google Sheets \u003cem\u003eInput\u003c\/em\u003e tab and filter out URLs already marked as \u003cem\u003eDone\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003eFor each remaining row, it sets the \u003cem\u003eCompany\u003c\/em\u003e and \u003cem\u003ePage URL\u003c\/em\u003e fields, then \u003cstrong\u003efetches the portfolio page HTML\u003c\/strong\u003e using browser-like headers.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidate responses\u003c\/strong\u003e and log a fetch error to Google Sheets when retrieval fails.\u003c\/li\u003e\n  \u003cli\u003eIf the page loads, \u003cstrong\u003estrip HTML to plain text\u003c\/strong\u003e (with truncation) to prepare content for analysis.\u003c\/li\u003e\n  \u003cli\u003eSend the cleaned page text to an \u003cstrong\u003eOpenAI chat model\u003c\/strong\u003e extraction agent to return a structured list of projects and credits.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWrite outputs\u003c\/strong\u003e to the Google Sheets \u003cem\u003eOutput\u003c\/em\u003e tab:\n    \u003cul\u003e\n      \u003cli\u003eExtracted project credits when extraction succeeds\u003c\/li\u003e\n      \u003cli\u003eAn AI extraction error entry when extraction fails\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUpdate the input row status\u003c\/strong\u003e to \u003cem\u003eDone\u003c\/em\u003e and wait briefly before moving to the next URL.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomatically compile \u003cstrong\u003eagency\/brand\/project credit data\u003c\/strong\u003e from case-study pages into a structured sheet.\u003c\/li\u003e\n  \u003cli\u003eBatch-audit partner portfolios by running one job and reviewing \u003cstrong\u003eErrors\u003c\/strong\u003e for failed pages.\u003c\/li\u003e\n  \u003cli\u003eMaintain a clean, repeatable pipeline for SaaS teams tracking credits across many websites.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e (Input\/Output tabs): reads URLs, appends extracted projects, and writes fetch\/AI errors.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eOpenAI chat model\u003c\/strong\u003e: extracts structured credits from cleaned page text.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes \u0026amp; controls\u003c\/strong\u003e: if, set, code, wait, filter, sticky note.\u003c\/li\u003e\n\u003c\/ul\u003e\n\u003cp\u003eBest used when your spreadsheet schema includes: \u003cem\u003eCompany\u003c\/em\u003e, \u003cem\u003eWebsite\u003c\/em\u003e, \u003cem\u003ePage URL\u003c\/em\u003e, \u003cem\u003eStatus\u003c\/em\u003e (Input) and \u003cem\u003eAgency\u003c\/em\u003e, \u003cem\u003eBrand\u003c\/em\u003e, \u003cem\u003eProject Name\u003c\/em\u003e, \u003cem\u003eFull Page Content\u003c\/em\u003e, \u003cem\u003eError\u003c\/em\u003e (Output).\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45822086480051,"sku":"N8N-18099","price":28.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/BYScpwNPo3Qmd6CvrrwZq_Gwmr0ktt.png?v=1786525236","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-scrape-portfolio-credits-with-openai-google-sheets","provider":"N8N Commerce","version":"1.0","type":"link"}