Block 1 - Webhook: Receive JSON String
- Type / Role
- n8n-nodes-base.webhook - webhook
- Config choices
- Version 2
This workflow is provided as-is. Please review and test before using in production.
This n8n template provides a simple yet powerful utility for validating if a given string input is a valid JSON format. You can use this to pre validate data received from external sources, ensure ...
n8n-nodes-base.webhook, n8n-nodes-base.respondtowebhook, n8n-nodes-base.code, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by ist00dent.
Original n8n.io sourceThis n8n template provides a simple yet powerful utility for validating if a given string input is a valid JSON format. You can use this to pre-validate data received from external sources, ensure data integrity before further processing, or provide immediate feedback to users submitting JSON strings.
Webhook: This node acts as the entry point for the workflow, listening for incoming POST requests. It expects a JSON body with a single property:
Code (JSON Validator): This node contains custom JavaScript code that attempts to parse the jsonString provided in the webhook body.
Respond to Webhook: This node sends the validation result (either valid: true or valid: false with an error message) back to the service that initiated the webhook request.
When you trigger the webhook, send a POST request with a JSON body structured as follows:
{
"jsonString": "{\"name\": \"n8n\", \"type\": \"workflow\"}"
}
Example of an invalid JSON string:
{
"jsonString": "{name: \"n8n\"}" // Missing quotes around 'name'
}
The workflow will return a JSON response indicating validity:
For a valid JSON string:
{
"valid": true
}
For an invalid JSON string:
{
"valid": false,
"error": "Unexpected token 'n', \"{name: \"n8n\"}\" is not valid JSON"
}
Import Workflow:
Configure Webhook Path:
Activate Workflow:
This JSON validator workflow is a solid starting point. Consider these enhancements:
Enhanced Error Feedback:
Logging Invalid Inputs:
Transforming Valid JSON:
Asynchronous Validation:
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Json string validator via webhook |
|---|---|
| Complexity | intermediate |
| Nodes | 6 |
| Categories | Engineering |
| Author | ist00dent |
| Published | 05 Jun 2025 |
Use the JSON export at /data/workflows/4704/4704.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
This n8n template provides a simple yet powerful utility for validating if a given string input is a valid JSON format. You can use this to pre validate data received from external sources, ensure ...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering use case.