Overview
The "Request Mapper" node allows users to transform and map input data items by setting or modifying fields according to specified rules. It supports two modes: manual mapping, where fields are edited one by one, and JSON mode, where fields can be set from a JSON object. This node is useful for preparing or reshaping data before sending it to other nodes or external services, such as formatting API requests or cleaning up data structures.
Common scenarios include:
- Manually assigning or changing specific fields in each item.
- Including or excluding certain fields from the output.
- Using JSON objects to bulk update fields.
- Combining existing input fields with newly assigned values.
Properties
| Name | Meaning |
|---|---|
| Mode | Choose between "Manual Mapping" (edit item fields individually) or "From JSON" (edit item fields from a JSON object). |
| Fields to Set | In Manual Mapping mode, specify individual field assignments to set or modify on each item. |
| Include Other Input Fields | Whether to include all original input fields in the output along with the fields set in "Fields to Set". |
| Input Fields to Include | When including other input fields, select how to choose them: "All" (include all unchanged fields), "Selected" (include only listed fields), or "All Except" (include all except listed fields). |
| Fields to Include | Comma-separated list of field names to include in the output when "Selected" option is chosen above. |
| Fields to Exclude | Comma-separated list of field names to exclude from the output when "All Except" option is chosen above. |
Output
The node outputs an array of items where each item contains a json object representing the transformed data fields after applying the mappings and inclusion/exclusion rules. The output structure mirrors the input but with modifications based on the node's configuration.
No binary data output is produced by this node.
Dependencies
- No external services or API keys are required.
- The node relies on internal helper functions and an executor module bundled within its implementation.
- No special environment variables or n8n configurations are necessary beyond standard node setup.
Troubleshooting
Issue: Output does not contain expected fields.
- Cause: Incorrect configuration of "Include Other Input Fields" or "Input Fields to Include" options.
- Solution: Verify that the correct mode is selected and that fields to include or exclude are properly specified.
Issue: Fields set via JSON mode do not apply.
- Cause: The "From JSON" mode requires valid JSON input; malformed JSON or incorrect parameter usage may cause failure.
- Solution: Ensure JSON input is correctly formatted and matches expected structure.
Error Messages: Since the node uses internal execution helpers, errors related to invalid field names or types might occur if inputs are misconfigured. Review error details and adjust field names or data types accordingly.