Quick overview
This workflow runs daily to pull friction metrics from Microsoft Clarity, fetches the affected pages via Bright Data Web Unlocker, uses GPT-5.6 (OpenAI) to diagnose likely causes and fixes, then logs results to Google Sheets and posts a digest to Slack.
How it works
- Runs every day on a schedule.
- Fetches page-and-device friction metrics from the Microsoft Clarity Data Export API and reads the previous run history from Google Sheets.
- Normalizes and pivots Clarity’s metric output into per-page totals, removes junk/duplicate URL variants, ranks pages by friction percentage, and keeps only pages that are new or worse than last time.
- Retrieves the shortlisted page content as markdown through Bright Data Web Unlocker and extracts page headings and link text for context.
- Sends the Clarity breakdown and extracted page outline to GPT-5.6 (OpenAI) to return a likely cause, the first element to inspect, a concrete fix, and a confidence level.
- Appends one row per page (including fetch failures) to Google Sheets and posts a single formatted summary message to a Slack channel.
Setup
- Create a Microsoft Clarity Data Export API token and add an HTTP Header Auth credential that sends
Authorization: Bearer <token>.
- Set up a Bright Data Web Unlocker zone, add its HTTP Header Auth credential, and update the zone name in the workflow Settings.
- Connect Google Sheets OAuth and Slack credentials, replace the Google Sheet ID, and ensure both Google Sheets nodes point to the same tab (for reading history and appending new rows).
- Set the target Slack channel and tune
clarity_days, min_sessions, min_friction_percent, max_pages, and only_new_or_worse to match your reporting preferences.