PortaOne icon

PortaOne

Consume PortaOne API (v.1.0.24)

Overview

This node interacts with the PortaOne API to retrieve custom field values for a specific Account. It is particularly useful when you need to fetch and process additional, user-defined data associated with an account in your PortaOne system. Common scenarios include synchronizing custom account attributes with other systems, reporting, or automating workflows based on these custom fields.

Practical Example:
You might use this node to pull all custom field values for a given account ID, then use those values in subsequent steps of your n8n workflow (e.g., updating a CRM, sending notifications, or triggering conditional logic).


Properties

Name Meaning
Authentication The authentication method to use. Options: Token Authentication, Basic Authentication.
Account ID The unique ID of the account record whose custom fields you want to retrieve.
Simplify Whether to simplify the output data. If enabled, only the specified property is returned.
SimplifyPath Path to the property that should be returned when "Simplify" is enabled (default: custom_fields_values).

Output

  • json:
    • By default, the output contains the full response from the PortaOne API for the requested account's custom fields.
    • If "Simplify" is enabled, only the value at the path specified by "SimplifyPath" (default: custom_fields_values) is returned.
    • The structure of custom_fields_values typically includes key-value pairs representing each custom field and its value for the account.

Example Output (simplified):

{
  "custom_fields_values": {
    "field1": "value1",
    "field2": "value2"
  }
}

If "Simplify" is enabled and "SimplifyPath" is set to custom_fields_values, the output will be:

{
  "field1": "value1",
  "field2": "value2"
}

Dependencies

  • External Services: Requires access to a PortaOne instance with API enabled.
  • API Credentials:
    • For Token Authentication: PortaOne API token credentials (portaOneTokenApi)
    • For Basic Authentication: PortaOne username/password credentials (portaOneBasicApi)
  • n8n Configuration:
    • Credentials must be configured in n8n under the appropriate credential types.

Troubleshooting

  • Common Issues:

    • Invalid Credentials: If the provided API credentials are incorrect or lack permissions, authentication will fail.
    • Account Not Found: Supplying an invalid or non-existent Account ID will result in an error from the API.
    • Incorrect SimplifyPath: If the path specified in "SimplifyPath" does not exist in the response, the output may be empty or throw an error.
  • Error Messages & Resolutions:

    • "Authentication failed" – Check that the correct authentication method and valid credentials are used.
    • "Account not found" – Verify the Account ID is correct and exists in PortaOne.
    • "Cannot read property '...' of undefined" – Ensure "SimplifyPath" matches a valid property in the API response.

Links and References

Discussion