Infomaniak CoreResources icon

Infomaniak CoreResources

Interact with Infomaniak API

Overview

This node interacts with the Infomaniak API to retrieve information about countries. Specifically, the "Country" resource with the "Get Many" operation allows users to fetch multiple country records from Infomaniak's system. It supports filtering by search terms (country name or code), filtering only enabled countries, and pagination options.

Common scenarios where this node is beneficial include:

  • Populating dropdowns or selection lists with country data in workflows.
  • Filtering and retrieving active countries for user registration or localization purposes.
  • Integrating country data into CRM, marketing, or analytics pipelines.

Practical example:

  • A workflow that fetches all enabled countries ordered by name ascending to display in a user interface.
  • Retrieving a limited list of countries matching a search term like "United" to narrow down selections.

Properties

Name Meaning
Search Search countries by name or code (string).
Only Enabled Boolean flag to filter results to show only enabled countries.
Only Enabled Exception Comma-separated list of country IDs to include even if disabled (effective only if Only Enabled is true).
Return All Boolean flag indicating whether to return all results or limit the number of results.
Limit Maximum number of results to return when Return All is false (minimum 1, default 50).
Additional Options Collection of additional parameters:
- Order By Field to order results by: ID, Name, or Code.
- Order Direction Order direction for results: Ascending or Descending.
- Page Page number for pagination (number).
- Per Page Number of results per page (number).

Output

The node outputs an array of JSON objects representing countries retrieved from the Infomaniak API. Each object corresponds to a country record and includes fields as provided by the API, such as country ID, name, code, enabled status, and potentially other metadata.

No binary data output is produced by this operation.

Dependencies

  • Requires an API authentication token credential for the Infomaniak API.
  • The node makes HTTP GET requests to https://api.infomaniak.com/1/countries endpoint.
  • Proper configuration of the API key credential in n8n is necessary for successful requests.

Troubleshooting

  • Failed to retrieve countries: This error occurs if the API request fails or returns an unexpected result. Check the API token validity and network connectivity.
  • Invalid Only Enabled Exception format: The exception list must be a comma-separated string of numeric country IDs. Ensure correct formatting.
  • Pagination issues: If using pagination options (Page, Per Page), ensure values are positive integers.
  • Empty results: If no countries match the search or filters, the output will be empty. Adjust search terms or filters accordingly.
  • API rate limits or authorization errors: Verify that the API token has sufficient permissions and is not expired.

Links and References

Discussion