How to Enrich Product Listings Using a Persistent Brand Guidelines Collection

Build a scheduled Spojit workflow that reads your brand voice and style rules from a persistent Knowledge collection, then rewrites Shopify product descriptions so every listing sounds on brand.

What This Integration Does

Product copy drifts. Different people write listings at different times, agencies hand over inconsistent text, and imported catalogs arrive with thin or off-brand descriptions. This workflow gives you a single source of truth for how your store should sound. You store your brand voice, tone rules, banned words, and formatting conventions as documents in a persistent Knowledge collection, then have Spojit rewrite each Shopify product description against those rules. Because the collection is workspace-scoped, you maintain it in one place and every workflow that needs your brand guidelines can read from it.

The workflow runs on a Schedule trigger (for example every weekday morning), pulls a batch of products from Shopify with list-products, and loops over them. For each product it queries the brand guidelines collection with the Knowledge node, asks an Agent-mode Connector node to rewrite the description on brand, then writes the result back with update-product. Re-runs are safe and idempotent: rewriting an already on-brand description simply produces equivalent copy, and you can scope each run to only the products that still need attention by filtering on a tag. Nothing is deleted, and the brand collection itself is read-only during a run.

Prerequisites

  • A Shopify connection with permission to read and write products. See the Shopify connector article for setup.
  • A persistent Knowledge collection holding your brand guidelines (voice, tone, banned terms, formatting). Create it first via Creating a Knowledge Collection and upload your style documents per Uploading Documents to a Collection.
  • Note the exact collection name and the embedding model you chose at creation. The same model is used automatically when you query.
  • A way to mark products as already processed (a tag such as brand-reviewed) so scheduled runs do not reprocess everything.

Step 1: Add a Schedule trigger

Start a new workflow and add a Trigger node, then set its type to Schedule. Schedules use a 5-field Unix cron expression plus an IANA timezone. To run at 9:00 AM on weekdays, set the expression to 0 9 * * 1-5 and the timezone to your store's zone, for example Australia/Sydney. A single Schedule trigger can hold more than one schedule if you want extra runs. The trigger output is {{ scheduledAt }}, which you can use later for logging.

Step 2: Fetch a batch of products from Shopify

Add a Connector node in Direct mode, choose the Shopify connector, and select the list-products tool. Direct mode is deterministic and costs no AI credits, which is what you want for a plain fetch. Use the query field with Shopify search syntax to scope the batch to active products that have not yet been reviewed, and set first to keep batches manageable (max 250):

query: status:active -tag:brand-reviewed
first: 50

The result is a paginated list. Keep {{ list_products.data.products }} available for the loop, and hold on to {{ list_products.data.pageInfo.endCursor }} if you plan to page through more (see Tips).

Step 3: Loop over each product

Add a Loop node set to ForEach and point it at the product list from Step 2, for example {{ list_products.data.products }}. Each iteration exposes the current product as a loop item (referenced as {{ item }} inside the loop body). Everything in Steps 4 through 6 lives inside this loop so it runs once per product. If a product has no description or only a stub, that is fine: the rewrite step treats sparse copy as input to enrich rather than a blocker.

Step 4: Query the brand guidelines collection

Inside the loop, add a Knowledge node in Query mode. In the Collection dropdown pick your persistent brand guidelines collection (not Transient: you want the long-lived archive that every run reads). Write a Prompt that pulls back the rules relevant to this product, and set a Response Schema so the output is structured and easy to consume downstream:

Prompt: Return the brand voice, tone rules, required formatting, and any
banned or discouraged words that apply when writing a product description
for a "{{ item.productType }}" product from vendor "{{ item.vendor }}".

Set Result Count to a small number such as 5 to keep the most relevant guideline chunks, choose your synthesis Model, and store the result in an Output Variable such as brand_rules. Because the collection is persistent and workspace-scoped, you never re-upload guidelines here: you simply read them.

Step 5: Rewrite the description on brand

Still inside the loop, add a Connector node in Agent mode. Agent mode lets the agent reason over the product and your guidelines, and its Response Schema forces clean JSON output. Provide a prompt that hands the agent the current copy plus the rules retrieved in Step 4, and ask for a single rewritten description:

Rewrite the product description below so it follows our brand guidelines.

Product title: {{ item.title }}
Current description: {{ item.descriptionHtml }}
Brand guidelines: {{ brand_rules }}

Return HTML in a field called "descriptionHtml". Keep factual details
(materials, dimensions, care instructions) accurate. Do not invent claims.
Avoid any banned words listed in the guidelines.

Define a Response Schema with a single descriptionHtml string property so the result is predictable. Store the node output in a variable such as rewritten. If you prefer a fully deterministic generation step without an agent loop, you can instead use a Transform node, but Agent mode is the better fit here because applying nuanced voice rules is a judgment task.

Step 6: Write the new description back to Shopify

Add a Connector node in Direct mode, choose the Shopify connector, and select the update-product tool. Map id to the current product and descriptionHtml to the rewritten copy. Add your processed marker to tags so the next scheduled run skips this product. Note that tags replaces all tags, so include the product's existing tags plus the new one:

id: {{ item.id }}
descriptionHtml: {{ rewritten.descriptionHtml }}
tags: {{ item.tags }}, brand-reviewed

That completes one iteration. The loop advances to the next product until the batch is done.

Step 7: Notify yourself when the batch finishes

After the Loop node, add a Send Email node so you have a record of each run. Send Email uses Spojit's built-in mail service and needs no connection. Set Recipients to your address, a Subject like Brand rewrite run finished, and a Body that references the run, for example noting the schedule time {{ scheduledAt }}. For a low-stakes notification set If sending fails to Continue anyway so a mail hiccup never fails the whole run. External recipients must be on your org allowlist under Settings > General > Email recipients.

Tips

  • Keep batches small with first and run the schedule more often rather than rewriting your whole catalog in one pass. This spreads AI cost and keeps each run quick.
  • To page through a large catalog in one run, add a Condition node that checks whether {{ list_products.data.pageInfo.hasNextPage }} is true and feed endCursor back into a second list-products call via the after field.
  • When you update your style rules, just upload a new or replacement document to the same persistent collection. Every future run reads the latest guidelines with no workflow changes. Ask Miraxa, the intelligent layer across your automation, "Why did my last run rewrite fewer products than expected?" to investigate a thin batch.
  • Always query a persistent collection with the same embedding model that was used to embed it, which Spojit handles for you when you pick the collection.

Common Pitfalls

  • Forgetting that update-product tags replace all tags. If you set tags to just brand-reviewed, you wipe the product's other tags. Always include {{ item.tags }} in the value.
  • Omitting the processed-marker filter in the query field. Without -tag:brand-reviewed, each scheduled run reprocesses every product and burns AI credits needlessly.
  • Choosing Transient instead of your persistent collection in the Knowledge node. Transient collections are auto-created and discarded per run, so they would be empty here. Pick your named brand collection.
  • Cron timezone mismatch. The schedule fires in the IANA timezone you set, not your browser's. Confirm the timezone so a 9:00 AM run is actually 9:00 AM for your store.

Testing

Before turning the schedule on, validate against a tiny scope. Temporarily set the query in Step 2 to a single known product (for example tag:test-rewrite) and set first to 1, then use the Run button to execute manually. Open the execution log to confirm the Knowledge node returned guideline text, the Agent step produced clean descriptionHtml, and update-product succeeded. Check the product in Shopify to see the new copy and the brand-reviewed tag. When you are satisfied, restore the real query and batch size and enable the schedule.

Learn More

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.