Auto-generate Shopify blog related articles with OpenAI text-embedding-3-small
Ready for 3.0What this workflow does
This workflow has 22 nodes and runs on a schedule (every week at 20:00). It uses only n8n's built-in nodes. It also calls api.openai.com over HTTP.
How it runs
Trigger: On a schedule (every week at 20:00).
- Workflow Configuration (Edit Fields (Set)): sets 5 fields: shopifyBlogId, shopifyBlogDomain, shopifyStoreName…
- Get articles from shopify (HTTP Request): calls an HTTP API
- Clean & Prepare Text (Code): runs custom JavaScript code
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Calculate similarities (Code): runs custom JavaScript code
- Set article fields (Edit Fields (Set)): sets 11 fields: shopify_id, blog_id, shopify_handle…
- Upsert article_relations (Data table): create or update
- OpenAI Get Embeddings (HTTP Request): calls api.openai.com (POST)
- Top 3 related articles (Code): runs custom JavaScript code
- Upsert articles (Data table): create or update
…plus 10 more steps. See the full node list below.
HTTP calls to: api.openai.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Data table
n8n-nodes-base.dataTable - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp
From the author
🪐 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…