Portal Community
Error Message: [Error-FlowStudio-100090] CRITICAL: Failed to parse ContentData for template ID {ID}. JSON Parse Error: Unexpected token...

What It Means

Flow Studio attempted to load a node template definition from the database, but the ContentData field contains invalid JSON that cannot be parsed. This means:

Common Causes

  1. Missing Comma in JSON (Most Common)

    A property is missing a comma before the next property:

    "category": "social"
    "headerImageUrl": "..."  ← Missing comma after "social"
  2. Unescaped Quotes in String Values

    String values containing quotes must be escaped:

    "description": "This is a "bad" example"  ← Quotes not escaped
  3. Unclosed Brackets or Braces

    JSON structure missing closing brackets or braces.

  4. Trailing Commas

    Extra comma after the last property in an object or array:

    {"name": "value",}  ← Trailing comma
  5. Invalid Characters

    Control characters, line breaks, or other invalid JSON content.

  6. Incomplete Data Seeding

    Template data was manually inserted into the database without proper JSON validation.

How to Fix

Step 1: Identify the Affected Template

Check the browser console for the error message. It will show:

Template Name: TikTok Video Upload Init
Template ID: 10000239
JSON Parse Error: Unexpected token '}' at position 245

Step 2: Locate the SQL Data File

Find the corresponding SQL file in the data templates directory:

C:\BizFirstGO_FI_AI\BizFirstFiDB\[DatabaseName]\dbo\Data\projects\[ProjectFolder]\DataTemplates\
Template_DataTemplates_{ID}_[name].data.sql

For example: Template_DataTemplates_10000239_tiktok-video-upload-init.data.sql

Step 3: Extract and Validate the JSON

Open the SQL file and find the @ContentData declaration. Copy the JSON content to a validator:

Step 4: Fix the JSON Syntax Error

Common fixes:

Step 5: Revalidate the JSON

After fixing, validate again using the tools from Step 3.

Step 6: Re-deploy the Database

Run the corrected SQL script against your database to update the template:

sqlcmd -S [server] -d [database] -i "Template_DataTemplates_10000239_[name].data.sql"

Step 7: Refresh Flow Studio

Restart the Flow Studio app or refresh the browser. The console error should no longer appear.

Examples

Example 1: Missing Comma (The TikTok Case)

❌ Before (Invalid):

{
  "category": "social"
  "headerImageUrl": "https://..."
}

✅ After (Fixed):

{
  "category": "social",
  "headerImageUrl": "https://..."
}

Example 2: Unescaped Quotes

❌ Before (Invalid):

DECLARE @ContentData NVARCHAR(MAX) = N'{
  "description": "Upload the "video" file"
}'

✅ After (Fixed):

DECLARE @ContentData NVARCHAR(MAX) = N'{
  "description": "Upload the \"video\" file"
}'

Example 3: Trailing Comma

❌ Before (Invalid):

{
  "name": "My Node",
  "type": "tool",
}

✅ After (Fixed):

{
  "name": "My Node",
  "type": "tool"
}

Prevention

For Developers Adding New Templates

  1. Validate JSON First

    Use JSONLint or VS Code to validate before inserting into SQL.

  2. Use Proper SQL String Escaping

    In SQL, double quotes must be escaped as \" in N'' strings.

  3. Test Before Deployment

    Run SQL scripts in a dev database first. Check the browser console for errors.

  4. Use Code Review

    Have another developer review SQL data files before merging to main branch.

  5. Automate Validation

    Add a pre-commit hook to validate JSON in all .data.sql files:

    #!/bin/bash
    # In .git/hooks/pre-commit
    find . -name "*.data.sql" -exec jq -e . {} \; || exit 1

For DevOps / Database Admins

  1. Monitor Logs

    Set up alerts for Error-FlowStudio-100090 in application logs.

  2. Validate on Import

    Before seeding data, run: jq '.[].ContentData | fromjson' data.json

  3. Backup Before Updates

    Always backup the Template_DataTemplates table before running update scripts.

Troubleshooting Checklist

Related Errors

Need Help?

Still stuck? Here are your options:

  1. Check the BizFirst Community forums for similar issues
  2. Open an issue on GitHub with the template ID and error message
  3. Contact the BizFirst support team with the complete console error output

📋 Reference Information: