π¬ Publish operational assessment microsites from Supabase records
β‘ 1 views Β· π¬ Content Creation & Video
Description
Quick Overview
This workflow runs manually or every six hours to pull approved operational assessment records from Supabase, validate required fields, generate a structured microsite content object, upsert it into a Supabase microsites table, and update the source assessment with a published URL or failure reason.
How it works
- Runs on a manual trigger or a six-hour schedule.
- Fetches up to the configured maximum number of Supabase
assessment_microsite_queuerecords wherestatus = approved. - Splits the response into individual assessments, normalizes the microsite slug, and validates that required fields like company, slug, and assessment summary are present.
- Builds a microsite page payload with headlines, summary, cards, opportunity ideas, and a call-to-action URL.
- Upserts the page into the Supabase
micrositestable using the slug as the conflict key and requests the merged record back. - Updates the original Supabase assessment record as
publishedwith the generated microsite URL, or marks it asfailedwith a validation or publish error.
Setup
- Create the Supabase tables referenced by the workflow (a source queue table like
assessment_microsite_queueand a destination table likemicrosites) with columns that match the fields being read and written. - Add a Supabase API credential and select it in each Supabase HTTP Request step.
- Update the values in βSet Microsite Settingsβ (Supabase project URL, table names, public site base URL, booking URL, CTA label, and max record limit).
- Ensure your Supabase REST API access is configured so the workflow can read approved records and PATCH status updates, and can upsert into the
micrositestable. - Add a test assessment record with
statusset toapproved, run the workflow manually, and confirm your front end renders the published record at the configured URL pattern.
π Nodes Used
HTTP Request, Schedule Trigger
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File