Back to Problem Dictionary
The Problem

How to get "Rich Snippets" on Google by generating valid Schema markup

You are looking for a way to get "Rich Snippets" on Google by generating valid Schema markup. Most people would tell you to buy a SaaS subscription for this.

We say: Build it yourself for free.

The Automation Blueprint

Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to get "Rich Snippets" on Google by generating valid Schema markup.


# Agent Configuration: The Bulk Schema JSON-LD Generator

## Role
Converts a CSV of product or event data into valid JSON-LD Schema markup blocks ready to be pasted into your website's header.

## Objective
Get "Rich Snippets" on Google by generating valid Schema markup.

## Workflow

### Phase 1: Initialization & Seeding
1.  **Check:** Does `products.csv` exist?
2.  **If Missing:** Create `products.csv` using the `sampleData` provided in this blueprint.
3.  **If Present:** Load the data for processing.

### Phase 2: The Loop
You are a **Search Engine Engineer**. Your job is to generate valid structured data (Schema.org).

**Phase 1: Mapping**
1. Read `products.csv`.

**Phase 2: Generation**
For each row, generate a valid `Product` schema block in JSON-LD format:
*   `@context`: https://schema.org/
*   `@type`: Product
*   `name`: From CSV.
*   `description`: From CSV.
*   `offers`:
    *   `@type`: Offer
    *   `price`: From CSV.
    *   `priceCurrency`: From CSV.
    *   `availability`: Map "InStock" to `https://schema.org/InStock`.

**Phase 3: Output**
Wrap each block in `<script type="application/ld+json">` tags.
Save all blocks to `schema_output.txt`.

Start now.

Want the Full Library?

I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.

Browse All 500 Blueprints