# I can't update 'Template Code'

**URL:** <https://community.n8n.io/t/i-cant-update-template-code/291384>\
**Category:** Questions\
**Tags:** workflow-building\
**Created:** [April 25, 2026, 10:45am UTC](https://community.n8n.io/t/i-cant-update-template-code/291384 "2026-04-25T10:45:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![devcodejourneyy](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/devcodejourneyy/32/130565_2.png) [@devcodejourneyy](https://community.n8n.io/u/devcodejourneyy)\
**Post date:** [April 25, 2026, 10:45am UTC](https://community.n8n.io/t/i-cant-update-template-code/291384/1 "2026-04-25T10:45:25Z")

</div>

![image](https://europe1.discourse-cdn.com/n8n/original/3X/7/b/7b44b75dec8d27cd27c4785339a4f2b286707478.png)

Why do I get an error when updating the “Template Code” in n8n workflow submission?

---

<div class="post-metadata">

**Author:** ![moosa](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/moosa/32/108437_2.png) [@moosa](https://community.n8n.io/u/moosa)\
**Post date:** [April 25, 2026, 10:51am UTC](https://community.n8n.io/t/i-cant-update-template-code/291384/3 "2026-04-25T10:51:54Z")

</div>

Hello @devcodejourneyy , The error you are seeing is a 400 Bad Request which means the n8n Creator Portal is rejecting the data you are trying to save. This is not a connection issue, it means something in the template code or the form is invalid. Check these things:

1. Make sure your JSON is valid, paste it into [jsonlint.com](http://jsonlint.com) to verify
2. Remove any instanceId or credential details from the JSON before submitting
3. Make sure your Purchase URL is properly formatted and complete

If all looks fine, clear the field, re-paste the JSON and try saving again. If it still fails contact n8n Creator Portal support directly.

---

<div class="post-metadata">

**Author:** ![Anshul\_Namdev](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/anshul_namdev/32/178229_2.png) [@Anshul\_Namdev](https://community.n8n.io/u/Anshul_Namdev)\
**Post date:** [April 25, 2026, 10:52am UTC](https://community.n8n.io/t/i-cant-update-template-code/291384/4 "2026-04-25T10:52:51Z")

</div>

@devcodejourneyy this seems like a temporary glitch, it would work in a couple of hours.

---

<div class="post-metadata">

**Author:** ![achamm](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/achamm/32/143734_2.png) [@achamm](https://community.n8n.io/u/achamm)\
**Post date:** [April 28, 2026, 1:51pm UTC](https://community.n8n.io/t/i-cant-update-template-code/291384/6 "2026-04-28T13:51:29Z")

</div>

Hi @devcodejourneyy, that `400` on teh PUT to `api.n8n.io/api/workflows/15280` is Cloudflare’s WAF flagging patterns in your template JSON as suspicious. Open your workflow JSON and strip out any `?.` optional chaining, template literals with `${}`, or inline `<script`-like strings before pasting it into the Template Code field — those trip the firewall every time. Re-save after each removal to find the exact offending line.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/36532_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [July 27, 2026, 1:52pm UTC](https://community.n8n.io/t/i-cant-update-template-code/291384/7 "2026-07-27T13:52:26Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
