Spot Workplace Discrimination Patterns with AI
Configured with Chain LLM, Html, HTTP Request, Information Extractor, and additional nodes. Review the connections and setup before adapting this template.
Node categories in this workflow
- Trigger
- AI & models
- Transform
- Web / API
- Code
- Integration
Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.
Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.
How it works
The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| OpenAI Chat Model1 | AI & models | OpenAI Chat Model | See node parameters |
| OpenAI Chat Model2 | AI & models | OpenAI Chat Model | See node parameters |
| Merge | Transform | Merge | See node parameters |
| OpenAI Chat Model | AI & models | OpenAI Chat Model | See node parameters |
| SET company_name | Transform | Edit Fields | See node parameters |
| Define dictionary of demographic keys | Transform | Edit Fields | See node parameters |
| ScrapingBee Search Glassdoor | Web / API | HTTP Request | See node parameters |
| Extract company url path | Transform | Html | extractHtmlContent |
| ScrapingBee GET company page contents | Web / API | HTTP Request | See node parameters |
| Extract reviews page url path | Transform | Html | extractHtmlContent |
| ScrapingBee GET Glassdoor Reviews Content | Web / API | HTTP Request | See node parameters |
| Extract Overall Review Summary | Transform | Html | extractHtmlContent |
| Extract Demographics Module | Transform | Html | extractHtmlContent |
| Extract overall ratings and distribution percentages | AI & models | Information Extractor | See node parameters |
| Extract demographic distributions | AI & models | Information Extractor | See node parameters |
| Define contributions to variance | Transform | Edit Fields | See node parameters |
| Set variance and std_dev | Transform | Edit Fields | See node parameters |
| Calculate P-Scores | Code | Code | See node parameters |
| Sort Effect Sizes | Transform | Edit Fields | See node parameters |
| Calculate Z-Scores and Effect Sizes | Transform | Edit Fields | See node parameters |
| Format dataset for scatterplot | Code | Code | See node parameters |
| Specify additional parameters for scatterplot | Transform | Edit Fields | See node parameters |
| Quickchart Scatterplot | Web / API | HTTP Request | See node parameters |
| QuickChart Bar Chart | Integration | Quick Chart | See node parameters |
| Text Analysis of Bias Data | AI & models | Chain LLM | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.
Requirements
An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.
Credential types declared in the source
httpQueryAuthopenAiApi
Workflow notes
Due to javascript restrictions, a normal HTTP request cannot be used to gather user-reported details from Glassdoor.
Due to javascript restrictions, a normal HTTP request cannot be used to gather user-reported details from Glassdoor.
Instead, ScrapingBee offers a great tool with a very generous package of free tokens per month, which works out to roughly 4-5 runs of this workflow.
How this workflow works
How this workflow works
- Replace ScrapingBee and OpenAI credentials
- Replace company_name with company of choice (workflow performs better with larger US-based organizations)
- Preview QuickChart data visualizations and AI data analysis
Inspired by [Wes Medford's Medium Post](https://medium.com/@wryanmedford/an-open-letter-to-twilios-leadership-f06f661ecfb4)
Inspired by Wes Medford's Medium Post
Wes performed the initial data analysis highlighting problematic behaviors at Twilio. I wanted to try and democratize the data analysis they performed for those less technical.
Hi, Wes!
Sticky Note9
Glossary
Glossary
Z-Score – A statistical measure that indicates how many standard deviations a data point is from the mean. In this analysis, a negative z-score suggests a group rates their workplace experience lower than the average, while a positive z-score suggests a better-than-average experience.
Effect Size – A measure of the magnitude of difference between groups. Larger negative effect sizes indicate a more substantial disparity in workplace experiences for certain groups, making it useful for identifying meaningful gaps beyond just statistical significance.
P-Score (P-Value) – The probability that the observed differences occurred by chance. A lower p-score (typically below 0.05) suggests the difference is statistically significant and unlikely to be random. In this analysis, high p-scores confirm that the disparities in ratings for marginalized groups are unlikely to be due to chance alone.
Relevance to This Analysis
These metrics help quantify workplace disparities among demographic groups. Z-scores show which groups report better or worse experiences, effect sizes reveal the severity of these differences, and p-scores confirm whether the disparities are statistically meaningful. This data allows for a more informed discussion about workplace equity and areas needing improvement.
Example AI Analysis (Twilio Example)
Example AI Analysis (Twilio Example)
Key Takeaways
- Significant Disparity Among Disabled Employees Disabled employees reported the lowest average ratings, with a z-score of -5.50, indicating a far worse experience compared to their non-disabled peers.
- LGBTQIA Community's Challenges Members of the LGBTQIA community showed significantly lower ratings (z-score of -2.53), suggesting they may experience a workplace environment that is less inclusive or supportive compared to others.
- Transgender Experiences Are Particularly Negative Transgender employees rated their experiences considerably lower (z-score of -2.91), highlighting a critical area for improvement in workplace culture and acceptance.
- Veterans Report Higher Satisfaction In contrast, veterans had the highest ratings (z-score of 1.54), which could indicate a supportive environment or programs tailored to their needs.
- Overall Gender Discrepancies A noticeable gap exists in average ratings by gender, with female employees scoring below male employees, suggesting potential gender biases or challenges in workplace dynamics.
Employee Experiences
Perceptions of Workplace Environment
For members of groups reporting significantly worse experiences, such as disabled, transgender, and LGBTQIA employees, the workplace may feel alienating or unwelcoming. These individuals might perceive that their contributions are undervalued or overlooked and that necessary support systems are lacking, creating a culture of exclusion rather than one of inclusivity. This feeling of being marginalized can lead to poorer engagement, higher turnover rates, and diminished overall job satisfaction, adversely impacting both employees and the organization.
Spot Workplace Discrimination Patterns with AI
Spot Workplace Discrimination Patterns with AI
Purpose and structure
This folder contains the Spot Workplace Discrimination Patterns with AI workflow. Its executable nodes use chainLlm, code, html, httpRequest, informationExtractor, lmChatOpenAi, manualTrigger, merge, quickChart, set. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.
Setup
Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.
Entry points
When clicking ‘Test workflow’
Verification
Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.
Attribution
https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Code/1994_Code_Manual_Automation_Webhook.json MIT; preserve source notices.
Canvas section labels
These name areas of the original canvas; they do not include explanatory instructions.
- Spot Workplace Discrimination Patterns using ScrapingBee, Glassdoor, OpenAI, and QuickChart
- Use ScrapingBee to gather raw data from Glassdoor
- Extract details with AI
- Calculate variance and standard deviation from review rating distributions.
- Formatting datasets for Scatterplot
- Example Scatterplot output