Auto-generate Shopify blog related articles with OpenAI text-embedding-3-small
🪐 Use case Automatically surface and insert the three most relevant “Related articles” at the end of every Shopify blog post to boost session depth, SEO, and reader engagement. --- ⚙️ What this workflow does Pulls al...
Template notes
🪐 Use case
Automatically surface and insert the three most relevant “Related articles” at the end of every Shopify blog post to boost session depth, SEO, and reader engagement.
---
⚙️ What this workflow does
Pulls all published articles from a selected Shopify Blog using the Admin API. Cleans the HTML content (removes existing .related-articles blocks) and extracts text for embeddings. Generates OpenAI embeddings (text-embedding-3-small) and stores them in n8n Data Tables. Calculates semantic similarity (cosine distance) between articles to identify the top matches. Selects the Top 3 most relevant related posts for each article (configurable). Dynamically builds a <div HTML section and updates the article on Shopify. Runs on a weekly schedule to keep relations fresh as new content is added.
---
🧩 Setup
1. Create 3 Data Tables: