Analyze Workplace Bias with n8n, OpenAI, and ScrapingBee

Discover how this unique n8n workflow uses ScrapingBee, Glassdoor data, and OpenAI to spot workplace discrimination patterns. Uncover meaningful insights on employee experience disparities with AI-driven analysis and visualizations.
lmChatOpenAi
httpRequest
code
+8
Workflow Identifier: 1154
NODES in Use: manualTrigger, lmChatOpenAi, merge, set, httpRequest, html, informationExtractor, code, quickChart, stickyNote, chainLlm
Analyze workplace bias with n8n and OpenAI

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What this workflow does

This workflow finds unfair differences in company reviews by demographic groups.
It solves the problem of slow, manual checking of lots of unstructured Glassdoor data.
The outcome is clear charts and text that shows where some groups rate a workplace much better or worse than others.
You get quick, statistical insights to spot bias and discrimination.

The automation scrapes Glassdoor reviews using a proxy that handles JavaScript.
Then AI reads the messy HTML to pull out numbers and ratings for different people groups.
It calculates statistics like averages, z-scores, effect sizes, and significance p-values.
Charts display the important rating gaps visually.
Finally, AI writes a simple summary report explaining the bias patterns found.


Who should use this workflow

This is for HR analysts wanting fast, repeatable checks for workplace bias using real employee reviews.
It helps teams avoid guesswork and saves hours otherwise spent scraping and crunching data by hand.
Ideal for those who understand company diversity concerns but lack time or advanced stats tools to analyze raw review data deeply.


Tools and services used

  • n8n automation platform: Runs the entire workflow and connects parts.
  • ScrapingBee API: Fetches Glassdoor pages by bypassing JavaScript blocks.
  • OpenAI API with ChatGPT models: Extracts key info from review HTML content using AI.
  • QuickChart API: Creates bar and scatterplot charts from stats data.
  • JavaScript Code node in n8n: Calculates p-values and reformats data.

Inputs, Processing Steps, and Outputs

Inputs

  • Company name (like Twilio) entered in a Set node.
  • API keys for ScrapingBee and OpenAI.

Processing Steps

  1. Search Glassdoor via ScrapingBee and extract company profile URL.
  2. Fetch company and review page HTML using ScrapingBee requests.
  3. Extract overall ratings and demographics HTML blocks by parsing the pages.
  4. Use OpenAI AI to pull numeric average ratings, counts, and star distributions from HTML text.
  5. Calculate variance and standard deviation from rating counts with Set nodes.
  6. Merge overall and group data for unified statistical analysis.
  7. Compute z-scores and effect sizes to measure group rating differences.
  8. Use JavaScript in Code node to calculate p-values showing statistical significance.
  9. Sort data and prepare datasets formatted exactly for chart generation.
  10. Create bar chart and scatterplot images using QuickChart API calls.
  11. Generate human-friendly bias report text with AI summarizing findings.

Outputs

  • Bar chart image showing effect sizes by demographic group.
  • Scatterplot image showing z-score versus effect size to highlight bias patterns.
  • AI-written text explaining key disparities and workplace experiences for leadership.

Beginner step-by-step: How to use this workflow in n8n for production

Download and import workflow

  1. On this page, find and click the Download button to get the workflow file.
  2. Open the n8n editor where you want to run the automation.
  3. Choose Import from File and upload the downloaded workflow JSON.

Configure necessary credentials and inputs

  1. Add API Key credentials for ScrapingBee and OpenAI via the n8n credentials manager.
  2. Edit the SET company_name node to enter the exact company to analyze.
  3. Update any email addresses, folder IDs, or other fields if you connected the workflow to other services.

Test and activate workflow

  1. Run the workflow manually using the Manual Trigger node once to check all steps complete without errors.
  2. Inspect outputs, charts, and AI summaries to verify data looks correct.
  3. If all good, activate the workflow in n8n so it can run on-demand or scheduled as preferred.
  4. Consider setting alerts for node failures to detect API or layout issues quickly.

If using self-host n8n or running n8n on server, check credential security and keep the instance updated.
You can find help on self-host n8n.


Customization ideas

  • Change the company by editing SET company_name node value.
  • Add or remove demographic groups by modifying the dictionary keys in the relevant Set node.
  • Adjust statistical significance thresholds or effect size filters by editing the JavaScript in the p-value Code node.
  • Switch scraping provider by replacing ScrapingBee HTTP request nodes with another proxy service, updating credentials accordingly.
  • Change chart colors or styles by editing JSON options in QuickChart nodes for branding match.

Common issues and troubleshooting

Problem: Empty or error responses from ScrapingBee API

Cause could be invalid API key, exceeding token usage, or Glassdoor website changes blocking scraping.
Solution: Verify API credentials, check token quotas, update URL paths or CSS selectors in extraction nodes.

Problem: AI extraction nodes give zero or incomplete data on demographics

Cause might be wrong input HTML or missing labels that AI expects.
Solution: Confirm extracted HTML matches expected content. Try adjusting AI prompt or nodes reading the HTML.

Problem: Charts show blank or broken data

Cause is likely data formatting errors before sending to chart API.
Solution: Review Code node formatting logic and ensure numeric rating variables are properly referenced.


Summary

✓ Detects and measures workplace rating bias across demographics using real Glassdoor reviews.
Automates tedious scraping, parsing, and statistical calculations for HR professionals.
✓ Produces clear charts and AI-written reports helping leadership understand disparities.
✓ Saves hours and improves accuracy over manual review analysis methods.
✓ Flexible for many companies and easily customized for specific needs.

→ You get reliable, visual, and text insights to guide actions improving workplace equity.
→ The workflow integrates HTTP scraping, AI text extraction, stats math, chart generation, and language models in a simple pipeline.
→ Configurable and ready for importing into any n8n instance, including self-host n8n setups.


Analyze workplace bias with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

Frequently Asked Questions

The workflow requires API Keys for ScrapingBee to scrape Glassdoor pages and OpenAI for AI extraction of data from HTML content.
Download the workflow file from this page, import it into the n8n editor using Import from File, add API credentials, set the target company name, run a manual test, then activate for production.
It produces charts showing effect sizes and z-scores by demographic groups, plus AI-written reports summarizing identified workplace biases.
Yes. You can replace ScrapingBee HTTP request nodes with another scraping provider that supports JavaScript pages and update credentials accordingly.

Promoted by BULDRR AI

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.