Overview
This node integrates with Liferay, a popular enterprise portal platform, allowing users to interact with Liferay's APIs in two main ways: via Headless API endpoints or Object Operations. It supports authentication through Basic Auth or OAuth2.
Common scenarios include:
- Automating content management by calling Liferay's headless REST APIs.
- Managing custom objects and their data within Liferay using object operations.
- Integrating Liferay data with other systems by fetching, creating, updating, or deleting records programmatically.
For example, you could use this node to create a new user profile in Liferay via an object operation or retrieve blog posts using a headless API endpoint.
Properties
| Name | Meaning |
|---|---|
| Authentication | The method used to authenticate with Liferay. Options: Basic Auth, OAuth2. |
| Liferay Base URL | The base URL of the Liferay instance, e.g., http://localhost:8080. |
| Type | The type of operation to perform. Options: Headless API Endpoint, Object Operation. |
| Object Definition Name or ID | (Shown if Type is Object Operation) Select or specify the object definition to operate on. |
| Operation Name or ID | (Shown if Type is Object Operation) Select or specify the operation to perform on the chosen object definition. |
| Parameters | (Shown if Type is Object Operation) Define parameters for the selected object operation. Supports mapping fields dynamically based on the operation. |
| Body | (Shown if Type is Object Operation and operation is PATCH, POST, or PUT) JSON body content to send with the request. |
| REST Application Name or ID | (Shown if Type is Headless API Endpoint) Select or specify the REST application to call. |
| Endpoint Name or ID | (Shown if Type is Headless API Endpoint) Select or specify the endpoint within the REST application. |
| Method Name or ID | (Shown if Type is Headless API Endpoint) Select or specify the HTTP method to use for the endpoint. |
| Parameters | (Shown if Type is Headless API Endpoint) Define parameters for the selected endpoint and method. Supports dynamic field mapping. |
| Body | (Shown if Type is Headless API Endpoint and method is PATCH, POST, or PUT) JSON body content to send with the request. |
Output
The node outputs JSON data representing the response from the Liferay API call made during execution. This includes any data returned by the requested headless API endpoint or object operation.
If the API returns binary data (not typical for these operations), it would be included in the binary output field, but this node primarily deals with JSON responses.
Dependencies
- Requires a valid Liferay instance accessible via the provided base URL.
- Requires authentication credentials configured in n8n, either Basic Auth or OAuth2 token.
- Uses internal helper functions to load options dynamically for applications, endpoints, methods, object definitions, and operations.
- No external npm packages beyond those bundled with n8n are required.
Troubleshooting
- Authentication errors: Ensure that the correct authentication method is selected and credentials are valid. For OAuth2, verify token validity and scopes.
- Invalid base URL: Confirm the Liferay base URL is reachable and correctly formatted.
- Missing or incorrect object definitions/operations: When using object operations, ensure the selected object definition and operation exist and are accessible with your credentials.
- Incorrect parameters or body format: Validate JSON bodies and parameter mappings match the expected schema for the selected operation or endpoint.
- API rate limits or permission issues: Check Liferay server logs or API documentation for limits and required permissions.
Links and References
- Liferay Headless APIs Documentation
- Liferay Object Framework Documentation
- n8n Expressions Documentation (for dynamic property values)