# having issues with generate asset block

**URL:** <https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992>\
**Category:** Support\
**Created:** [May 26, 2025, 2:12pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992 "2025-05-26T14:12:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![amandayal](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@amandayal](https://community.mindstudio.ai/u/amandayal)\
**Post date:** [May 26, 2025, 2:12pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992/1 "2025-05-26T14:12:39Z")

</div>

![image](https://canada1.discourse-cdn.com/flex008/uploads/mindstudio/original/1X/f22ebd95ca04b633201b03be7ffd483761659efa.png)

When i try using templating in generate asset block, to generate a pdf from a json variable, the pdf shows the json path of variables ad not the values.

Help me debug this, i have tries using get also the doesn’t work either.

---

<div class="post-metadata">

**Author:** ![Alex\_MindStudio](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.mindstudio.ai/alex_mindstudio/32/27_2.png) [@Alex\_MindStudio](https://community.mindstudio.ai/u/Alex_MindStudio)\
**Post date:** [May 26, 2025, 2:44pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992/2 "2025-05-26T14:44:37Z")

</div>

Hi @amandayal,

The most likely cause is incorrect variable references in the Generate Asset block. Here are a couple of resources that might help:

- [Help Doc on variables](https://help.mindstudio.ai/building-ai-agents/variables)
- [Troubleshooting guide on the Generate Asset block](https://community.mindstudio.ai/t/troubleshooting-guide-101/71)

If you can share some screenshots or a Loom of your setup, especially the Generate Asset block code, its configuration, and a sample run in the Debugger, that would help us better understand what’s going on.

---

<div class="post-metadata">

**Author:** ![amandayal](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@amandayal](https://community.mindstudio.ai/u/amandayal)\
**Post date:** [May 26, 2025, 3:45pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992/3 "2025-05-26T15:45:29Z")

</div>

here is the asset block html,

 Payment Analysis Report body { font-family: Arial, sans-serif; margin: 40px; } h1, h2 { color: #2c3e50; } table { width: 100%; border-collapse: collapse; margin-bottom: 20px; } th, td { padding: 8px 12px; border: 1px solid #ccc; text-align: left; } th { background-color: #f4f4f4; } .section { margin-bottom: 30px; } 
# Payment Analysis Report

**Date:** May 26, 2025

```
<div class="section">
    <h2>1. Total Contract Value</h2>
    <p>${{ paymentAnalysisResults.totalContractValue }}</p>
</div>

<div class="section">
    <h2>2. Payment Schedule</h2>
    <table>
        <tr>
            <th>Milestone</th>
            <th>Percentage</th>
            <th>Amount</th>
        </tr>
        {{#each paymentAnalysisResults.paymentSchedule %}}
        <tr>
            <td>{{ this.milestone }}</td>
            <td>{{ this.percentage }}%</td>
            <td>${{ this.amount }}</td>
        </tr>
        {{/each}}}
    </table>
</div>

<div class="section">
    <h2>3. Compliance Analysis</h2>
    <h3>Initial Deposit</h3>
    <ul>
        <li>Percentage: {{ paymentAnalysisResults.initialDeposit.percentage }}%</li>
        <li>Amount: ${{paymentAnalysisResults.initialDeposit.amount }}</li>
        <li>Guideline Limit: {{ paymentAnalysisResults.initialDeposit.guidelineLimit }}%</li>
        <li>Status: {{ paymentAnalysisResults.initialDeposit.complianceStatus }}</li>
    </ul>
    <h3>Final Payment</h3>
    <ul>
        <li>Percentage: {{ paymentAnalysisResults.finalPayment.percentage }}%</li>
        <li>Amount: ${{ paymentAnalysisResults.finalPayment.amount }}</li>
        <li>Guideline Minimum: {{ paymentAnalysisResults.finalPayment.guidelineMinimum }}%</li>
        <li>Status: {{ paymentAnalysisResults.finalPayment.complianceStatus }}</li>
    </ul>
</div>

<div class="section">
    <h2>4. Deviations from Guidelines</h2>
    <table>
        <tr>
            <th>Item</th>
            <th>Deviation</th>
            <th>Impact</th>
        </tr>
        {{#each paymentAnalysisResults.deviationsFromGuidelines }}
        <tr>
            <td>{{ this.item }}</td>
            <td>{{ this.deviation }}</td>
            <td>{{ this.impact }}</td>
        </tr>
        {{/each}}}
    </table>
</div>

<div class="section">
    <h2>5. Recommendations</h2>
    <table>
        <tr>
            <th>Recommendation</th>
            <th>Rationale</th>
        </tr>
        {{#each paymentAnalysisResults.recommendations }}
        <tr>
            <td>{{ this.recommendation }}</td>
            <td>{{ this.rationale }}</td>
        </tr>
        {{/each}}}
    </table>
</div>

```

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/mindstudio/original/1X/2d2b7006e392acb26a8819428c81ede22c948279.png)

---

<div class="post-metadata">

**Author:** ![sean](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sean](https://community.mindstudio.ai/u/sean)\
**Post date:** [May 26, 2025, 3:47pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992/4 "2025-05-26T15:47:59Z")

</div>

If you have invalid Handlebars syntax in your template, the entire template will fail to compile. So somewhere in your template something is breaking, which is causing the entire thing to break. Try removing sections until you get it to compile successfully, and then re-add sections until you find what is broken. As a start, I’m not sure what the `{{#each paymentAnalysisResults.paymentSchedule %}}` % symbol is doing here—you might want to try removing that as it doesn’t look like valid Handlebars syntax to me.

---

<div class="post-metadata">

**Author:** ![amandayal](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@amandayal](https://community.mindstudio.ai/u/amandayal)\
**Post date:** [May 26, 2025, 3:58pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992/5 "2025-05-26T15:58:35Z")

</div>

thanks for pointing it out, but the entire thing will fail due to one issue?

---

<div class="post-metadata">

**Author:** ![sean](https://avatars.discourse-cdn.com/v4/letter/s/f0a364/32.png) [@sean](https://community.mindstudio.ai/u/sean)\
**Post date:** [May 26, 2025, 4:38pm UTC](https://community.mindstudio.ai/t/having-issues-with-generate-asset-block/992/6 "2025-05-26T16:38:55Z")

</div>

Correct. The Generate Asset block uses [Handlebars](https://handlebarsjs.com/guide/), which is a templating language. If the template fails to compile due to a syntax error (e.g., if you try to use a helper function that doesn’t exist or have something that is improperly formatted), it will break completely and will not render anything. If there is an error in the data at runtime (e.g., a variable can’t be found, or its value is weird, or something like that), however, it will still compile just with weird/broken data.
