How to Edit RenderDoc Templates with AI
You can use AI tools to modify existing RenderDoc templates based on your requirements. Whether you need to add new components, change styling, add conditional logic, or restructure your template, AI can help.
RenderDoc supports two editing modes:
- Full Document Editing - Update the entire template (variables + all pages)
- Page-Level Editing - Update just a single page (great for multi-page documents)
Prerequisites
- An AI Chat Account: ChatGPT Plus, Claude, Gemini Advanced, or similar.
- Your Existing Template: Export both the Variables JSON and Template Schema from RenderDoc.
- The RenderDoc Schema Reference: Use one of these options:
- Template Schema Reference - Interactive documentation page
- LLM-Optimized Docs - Plain text file for AI tools that accept URLs
For best results, provide the AI with both your existing template AND the schema reference so it understands the valid structure.
Quick Start: Using the Built-in AI Dialog
The easiest way to edit templates with AI is using the built-in Generate with AI dialog in the Template Designer.
Full Document Editing
- Open your template in the Template Designer
- Click the AI button in the toolbar
- Keep Generation Scope set to "Full Document (all pages)"
- Describe what you want to change
- Click Open ChatGPT or Open Claude
- Apply the generated JSON to your template
Page-Level Editing (Multi-Page Documents)
For PDF/Excel templates with multiple pages, you can edit just one page at a time:
- Open your template in the Template Designer
- Click the AI button in the toolbar
- In Generation Scope, select the specific page you want to edit (e.g., "Page 2: Summary")
- Describe your changes for that page
- Click Open ChatGPT or Open Claude
- The AI will generate JSON for only that page
- Click the Code button (
</>) on the page tab to apply the result
- Faster AI responses (smaller context)
- No risk of accidentally changing other pages
- Easier to review changes
- Great for iterative refinements
Manual Export: How to Get Your Current Template JSON
If you prefer to manually construct prompts, you'll need to export both the variables and schema.
Export Variables
- Open your template in the Template Designer
- Click Manage Variables in the toolbar
- Switch to the Raw JSON tab
- Copy the entire JSON array
Export Full Schema
- Click the code icon (
</>) in the toolbar to open Raw Schema Editor - Copy the entire JSON schema
Export Single Page Schema
- Click the code icon (
</>) on the specific page tab (not the toolbar) - Copy the page JSON schema
The Edit Prompt Template
Copy this prompt and customize it for your specific edit request:
I am providing you with an existing RenderDoc template that I need to modify. Please read the RenderDoc schema documentation first to understand the valid structure.
**EXISTING VARIABLES (Plain JSON Array):**
```json
[PASTE YOUR VARIABLES JSON HERE]
EXISTING TEMPLATE SCHEMA:
[PASTE YOUR SCHEMA JSON HERE]
MY EDIT REQUEST: [DESCRIBE WHAT YOU WANT TO CHANGE]
STRICT REQUIREMENTS:
-
Variables Format:
- Output variables as a PLAIN JSON ARRAY
[...]. - Do NOT wrap variables in an object like
{ "variables": [...] }. - Preserve ALL existing variables unless explicitly asked to remove them.
- Add
defaultValuefor any NEW variables.
- Output variables as a PLAIN JSON ARRAY
-
Schema Changes:
- Preserve existing component IDs unless they need to change.
- Use descriptive, kebab-case IDs for new components.
- Use
rich-textfor all text content (NOT the deprecatedtextcomponent).
-
Output Format:
- Provide EXACTLY two separate JSON code blocks:
- Block 1: The Updated Variables JSON (Plain Array)
- Block 2: The Updated Template JSON (Schema)
- Clearly indicate what changed with comments or explanations.
- Provide EXACTLY two separate JSON code blocks:
---
## Page-Level Edit Prompt Template
For editing a single page in a multi-page document, use this prompt:
```text
First, fetch and read the RenderDoc Template Schema Reference from: https://docs.renderdoc.dev/llms-templates.txt
I am providing you with a SINGLE PAGE from an existing RenderDoc document template that I need to modify. Please read the RenderDoc schema documentation first to understand the valid structure.
**IMPORTANT:** I am only updating **[PAGE NAME]** (Page [PAGE NUMBER]). Do NOT generate the full document - only this page's schema.
**EXISTING VARIABLES (for reference - these are shared across all pages):**
```json
[PASTE YOUR VARIABLES JSON HERE]
CURRENT PAGE SCHEMA ([PAGE NAME]):
[PASTE THE PAGE JSON HERE]
MY EDIT REQUEST: [DESCRIBE WHAT YOU WANT TO CHANGE ON THIS PAGE]
STRICT REQUIREMENTS:
-
Output Scope:
- Generate ONLY the page schema for "[PAGE NAME]".
- Do NOT generate the full document with all pages.
- Do NOT include variables in your output (they are managed separately).
-
Page Schema Format:
- Output a SINGLE JSON object representing this page.
- Include:
id,pageName,sectionsarray, andsettings(optional). - Preserve the existing page
id.
-
Schema Changes:
- Preserve existing component IDs unless they need to change.
- Use descriptive, kebab-case IDs for new components.
- Use
headingfor headings andtextfor styled paragraphs. - Use
tablefor data-driven tables from arrays.
-
Excel-Specific Features:
- Use
tableNameon tables to create Excel Named Tables. - Use
tableStylefor Excel table formatting (e.g., "TableStyleMedium2"). - Add
nameprop to components for Excel Named Ranges. - Use
excelFormulain columns for native Excel formulas.
- Use
-
Output Format: Provide EXACTLY ONE JSON code block:
- The Updated Page Schema (single page object with id, pageName, sections)
Example structure:
{
"id": "page-1",
"pageName": "Invoice",
"sections": [...],
"settings": { ... }
}
### Applying Page-Level Changes
After the AI generates the updated page JSON:
1. Navigate to the page you want to update in the Template Designer
2. Click the **Code** button (`</>`) on the **page tab** (not the main toolbar)
3. Paste the updated page JSON
4. Click **Apply Changes**
:::warning[Important]
When editing a single page, make sure you:
- Apply the result using the **page-level** Code button (on the page tab)
- NOT the document-level Code button (in the toolbar)
The document-level Code button expects the full schema with all pages.
:::
---
## Common Edit Requests
Here are prompts for common template modifications:
### Add a New Section
```text
Add a new section to my document template that displays a promotional banner.
The banner should:
- Have a colored background (#f0f9ff)
- Display a heading "Special Offer!"
- Show promotional text with a variable {{promoMessage}}
- Include a CTA button linking to {{promoUrl}}
Add Conditional Content
Add conditional logic to show a "Past Due" warning banner only when
the variable {{paymentStatus}} equals "overdue".
The banner should:
- Have a red background (#fef2f2)
- Display warning text "Payment is past due"
- Only appear when the condition is true
Add a Data Table
Add a table component to display line items from my {{items}} array variable.
The table should have columns for:
- Item Name (from item.name)
- Quantity (from item.quantity)
- Unit Price (from item.price, formatted as currency)
- Total (from item.total, formatted as currency)
Include a footer row showing the grand total from {{orderTotal}}.
Change Styling
Update the styling of my template:
- Change the header background color from #ffffff to #1e40af
- Make the header text white
- Increase the padding around the main content to 40px
- Add rounded corners (8px) to the main container
Add a Calculated Variable
Add a calculated variable called "subtotal" that:
- Sums up all item.price * item.quantity from the {{items}} array
- Uses the expression: items.reduce((sum, item) => sum + (item.price * item.quantity), 0)
- Has type "number" and isCalculated: true
Add a Loop Component
Replace the static list with a loop component that iterates over {{features}} array.
Each feature should display:
- A checkmark icon (use a green checkmark emoji or HTML entity)
- The feature text from {{feature.name}}
- A description from {{feature.description}}
Edit a Single Page (Page-Level)
I want to update the "Summary" page (Page 2) to:
- Add a pie chart showing expense breakdown by category
- Replace the current text summary with a key-value list
- Add a conditional section that shows "On Budget" or "Over Budget" based on {{budgetStatus}}
Add an Image
Add a company logo image at the top of the template:
- Use the variable {{companyLogo}} for the image source
- Set width to 150px
- Center the image
- Add 20px margin below
Convert to Excel Format
Convert this PDF template to an Excel template:
- Change outputFormats to ["xlsx"]
- Ensure tables work with Excel column formatting
- Preserve calculated columns
- Add appropriate cell styling
Merging Changes Back to RenderDoc
After the AI generates updated JSON:
Step 1: Validate Variables
- Open Manage Variables in the Template Designer
- Switch to Raw JSON tab
- Paste the updated variables array
- Click Validate to check for errors
- Review the changes - ensure no variables were accidentally removed
- Click Apply Changes
Step 2: Validate Schema
- Open the Raw Schema Editor (
</>icon) - Paste the updated schema JSON
- Click Validate to check for errors
- Review the visual preview to ensure it looks correct
- Click Apply Changes
Step 3: Test the Template
- Click Preview to see the template with sample data
- Test any conditional logic by changing variable values
- Verify loops render correctly with array data
- Generate a test document to verify the final output
Pro Tips for Better Edits
| Tip | Example |
|---|---|
| Be Specific | Instead of "make it look better", say "add 16px padding and #f3f4f6 background" |
| Reference Component IDs | "Update the component with id 'header-text' to use font-size 24px" |
| Preserve Structure | Ask AI to "add to" rather than "replace" when you want incremental changes |
| Request Explanations | Add "Explain what you changed and why" to understand the modifications |
| Iterate Incrementally | Make one change at a time for complex templates |
Troubleshooting
Issue: AI removes existing variables or components
Solution: Explicitly state "Preserve ALL existing variables and components. Only add/modify what I requested."
Issue: AI changes component IDs unnecessarily
Solution: Add "Keep all existing component IDs unchanged unless the component itself needs to change."
Issue: Validation fails after applying changes
Solution: Check for:
- Missing required fields (name, type for variables)
- Invalid component types
- Malformed JSON (missing commas, brackets)
- Variables referenced in template but not defined
Issue: AI uses deprecated text component
Solution: Remind the AI: "Use rich-text instead of text - the text component is deprecated."
See Also
- Generate Templates with AI - Create new templates from scratch
- Template Schema Reference - Complete JSON schema documentation
- Variables Guide - Understanding variables and data types
- Component Reference - All available components