OpenRefine icon

OpenRefine

OpenRefine is an open-source desktop application for data wrangling

Actions10

Operations → Apply

AI-generated

Overview

This node integrates with an OpenRefine server to perform data wrangling operations on OpenRefine projects. Specifically, the Apply operation under the Operations resource allows users to apply a set of transformation operations (expressed as a JSON string) to an existing OpenRefine project.

Typical use cases include automating repetitive data cleaning tasks, applying complex transformations defined in OpenRefine's operations format, or integrating OpenRefine workflows into larger automation pipelines. For example, you might prepare a JSON describing a sequence of column splits, merges, or value replacements and then apply it programmatically to your dataset hosted in OpenRefine.

Properties

Name Meaning
Server The URL of the OpenRefine server instance. Default is http://127.0.0.1:3333. Change this if your OpenRefine runs elsewhere.
Project ID The identifier of the OpenRefine project to which the operations will be applied.
Operations JSON A valid OpenRefine operations JSON string describing the transformations to apply to the project.

Output

The node outputs a JSON array where each element corresponds to the response from the OpenRefine server after applying the operations. The exact structure depends on the server's response but generally includes status information about the application of the operations.

The output JSON typically contains fields such as:

  • statusCode: HTTP status code returned by the OpenRefine server.
  • Other response details as provided by OpenRefine, indicating success or failure of the operation.

No binary data is produced by this operation.

Dependencies

  • Requires access to a running OpenRefine server reachable at the specified Server URL.
  • No special API keys are needed, but the node fetches a CSRF token from the OpenRefine server to authorize requests.
  • The OpenRefine server must support the /command/core/apply-operations endpoint.
  • Network connectivity between n8n and the OpenRefine server is necessary.

Troubleshooting

  • Invalid Operations JSON: If the operations JSON string is malformed or invalid according to OpenRefine's specification, the server may reject the request or return an error. Validate your JSON against OpenRefine documentation before using.
  • Project Not Found: Providing an incorrect or non-existent Project ID will cause the operation to fail. Verify the project ID exists on the OpenRefine server.
  • CSRF Token Errors: If the node cannot retrieve a CSRF token from the server, requests will fail. Ensure the OpenRefine server is accessible and not blocking requests.
  • Network Issues: Connection timeouts or refusals indicate network problems or that the OpenRefine server is down or unreachable.
  • HTTP Errors: Non-200 HTTP responses should be inspected for clues; for example, 403 may indicate permission issues, 404 means resource not found.

To resolve errors, check the OpenRefine server logs, verify input parameters, and ensure the server is running and accessible.

Links and References

Discussion