Skip to content

Webhook Input

The Webhook Input component lets you bring data from an external webhook into your Nappai workflow. Simply paste the JSON payload you receive from the webhook into the Data field, and the component will parse it and pass the structured data to the next steps in your automation.

How it Works

When you drop the Webhook Input into your flow, it waits for a JSON string in its Data field.

  • If the field is empty, the component reports “No data provided.”
  • If the string is valid JSON, it is parsed into a structured object.
  • If the string is not valid JSON, the component treats the whole string as a single payload value and shows an error message so you can correct the format.
    The parsed data is then wrapped in a Data object and sent out through the Data output, ready for any downstream component to use.

Inputs

Input Fields

  • Data: Paste the JSON payload you receive from the webhook. This field is used to test the component quickly and to provide the data that will be sent to the rest of the workflow.

Outputs

The component produces a single output:

  • Data: A Data object containing the parsed JSON. This output can be connected to any other component that expects structured data, such as a database writer, an AI model, or another webhook.

Usage Example

  1. Add the Webhook Input to your flow.

  2. In the Data field, paste a sample JSON payload, e.g.:

    {
    "user_id": 12345,
    "action": "purchase",
    "amount": 49.99
    }
  3. Connect the Data output to the next component in your workflow (e.g., a database insert or an AI analysis step).

  4. When the webhook triggers, the component will automatically parse the incoming JSON and forward it to the connected component.

  • Webhook Output – Sends data from the flow back to an external system via a webhook.
  • Webhook Trigger – Listens for incoming webhook requests and starts a flow automatically.

Tips and Best Practices

  • Validate JSON: Use a JSON validator before pasting data to avoid errors.
  • Keep payloads small: Large payloads can slow down the flow; trim unnecessary fields if possible.
  • Use placeholders: If you need to test with dynamic data, use placeholders like {{user_id}} and replace them later in the workflow.
  • Check for required fields: Ensure the JSON contains all fields needed by downstream components to prevent runtime errors.

Security Considerations

  • Secure transmission: Make sure the webhook endpoint uses HTTPS to protect data in transit.
  • Authentication: Add authentication headers or tokens to the webhook request to verify the source.
  • Data sanitization: Validate and sanitize incoming data before using it in database writes or external API calls to prevent injection attacks.
  • Access control: Restrict who can edit the Webhook Input component to prevent accidental exposure of sensitive payloads.