flowprepRuns in your browser
THE FLOWPREP FIELD GUIDE

Validate event payloads

Mark event rows for review when required fields are missing.

Original starter · no credentials · manual execution

The sample transformation is tested against the output below. Import and execution in your specific n8n version still need verification.

When to use it

Understand a payload-validation step with local sample rows before attaching a webhook.

What is in the workflow?

  1. Manual Trigger: start a test deliberately.
  2. Sample data: synthetic rows in a Code node.
  3. Validate event payloads: a Code node with the transformation.
  4. Read first: a Sticky Note with setup and limitations.

Sample input

[
  {
    "event": "signup",
    "email": "alex@example.com"
  },
  {
    "event": "signup",
    "email": ""
  },
  {
    "event": "purchase",
    "email": "sam@example.com"
  }
]

Expected output

A valid flag and issue list for each row; all rows are retained.

[
  {
    "event": "signup",
    "email": "alex@example.com",
    "valid": true,
    "issues": []
  },
  {
    "event": "signup",
    "email": "",
    "valid": false,
    "issues": [
      "Invalid email shape"
    ]
  },
  {
    "event": "purchase",
    "email": "sam@example.com",
    "valid": true,
    "issues": []
  }
]

Import and adapt

  1. Download the JSON and use Import from File in your n8n editor.
  2. Review the Code nodes, then execute manually with the included sample.
  3. Compare the final output to the example above.
  4. Replace Sample data with your own source only after reviewing the input contract.

Before using real data

This is a basic field-shape check, not email verification, webhook authentication or a complete business schema.

This template does not send messages or contact external services. Adding a source or destination changes its behavior; test the complete workflow in your instance.

References

← All starter workflows