Overview
This node integrates with the PaySpace API, enabling users to manage various aspects of their PaySpace account programmatically. It supports a wide range of operations related to employee data, company information, payroll processing, and more. The "File Upload" operation specifically allows uploading files (such as employee photos or claim attachments) to the PaySpace system.
Common scenarios where this node is beneficial include automating HR workflows, synchronizing employee records, managing payroll data, and handling document uploads within PaySpace without manual intervention. For example, an HR team could automate the upload of employee photos or submit employee claims with attachments directly from other systems into PaySpace.
Properties
| Name | Meaning |
|---|---|
| Environment | Selects the target environment for the API call: Staging or Production. |
| Company ID | Numeric identifier of the company in PaySpace to operate on. |
| Api Request | Specifies the particular API endpoint or action related to the chosen operation. Options depend on the selected operation and endpoint. |
| Effective Date | A date-time value used for queries that require an effective date filter (e.g., fetching employment statuses or positions as of a certain date). |
| Employee Number | String identifier for an employee, used in specific API calls such as retrieving an employee's address. |
| ID | Identifier string used for various API calls; can represent different entities like EmployeeId or EmployeePositionId depending on the API request. |
| UserWorkflowStepId | Identifier for workflow steps, used in workflow-related API calls. |
| Category | String category used to filter custom forms by category. |
| Period | String representing a period, typically used in payslip comment updates. |
| Frequency | String representing frequency, also used in payslip comment updates. |
| Body (Raw) | JSON object containing the raw body data for POST or PATCH requests, specifying fields to create or update records. |
| Add Params | Boolean flag indicating whether to add optional query parameters to the API request. |
| Additional Fields | Collection of optional query parameters such as Order By, Top (limit), Skip (offset), Count (return count only), Select (fields to return), Filter (OData filter expressions), componentCodes, altLanguage, etc. |
| This node is still in beta | Notice field indicating the node is in beta status. |
Output
The node outputs the response from the PaySpace API in the json field of the output data. This typically contains the data returned by the API call, which varies depending on the operation performed. For example, it may include employee records, metadata, confirmation of file uploads, or error messages.
For file upload operations, the node handles sending multipart form-data but does not explicitly output binary data itself. Instead, the response JSON will confirm success or provide details about the uploaded file.
Dependencies
- Requires an API key credential with client ID and client secret for authentication.
- Uses OAuth2 token retrieval from PaySpace identity endpoints based on the selected environment (staging or production).
- Depends on external libraries such as Axios for HTTP requests and FormData for multipart uploads.
- Requires proper configuration of credentials in n8n to authenticate API calls.
Troubleshooting
- Authentication errors: Ensure the API key credential (client ID and secret) is correctly configured and has appropriate permissions.
- Invalid Operation errors: Occur if an unsupported or misspelled operation is selected. Verify the operation and API request names against PaySpace documentation.
- Missing required parameters: Some API calls require specific IDs or dates; missing these will cause errors. Double-check input properties.
- File upload issues: Multipart form-data must be correctly constructed; ensure the file data is properly attached and the ID parameter corresponds to a valid entity.
- API rate limits or network errors: May cause request failures; implement retry logic or check network connectivity.
- When
continueOnFailis enabled, errors are returned as part of the output JSON instead of stopping execution.