Actions23
Tenant → Get All
AI-generatedOverview
This node integrates with the Plain API to manage tenants and other related resources. Specifically, for the Tenant - Get All operation, it retrieves a list of tenants from the Plain system with support for pagination. This is useful in scenarios where you want to fetch multiple tenant records for reporting, synchronization, or further processing within an automation workflow.
Practical examples include:
- Retrieving all tenants to sync with another CRM or database.
- Fetching tenants page-by-page to display in a dashboard.
- Automating tenant data exports or backups.
Properties
| Name | Meaning |
|---|---|
| Additional Fields | Optional parameters to control the query: |
| - Limit | Maximum number of tenants to return (1-100). Default is 50. |
| - After Cursor | Cursor string to start pagination from (for forward pagination). |
| - Before Cursor | Cursor string to end pagination at (for backward pagination). |
Output
The output JSON contains tenant data objects with the following fields:
id: Unique identifier of the tenant.name: Tenant's name.externalId: External identifier associated with the tenant.url: URL related to the tenant.createdAt.iso8601: ISO 8601 timestamp when the tenant was created.updatedAt.iso8601: ISO 8601 timestamp when the tenant was last updated.
Additionally, the output includes pagination metadata under _metadata.pageInfo or pageInfo with these fields:
hasNextPage: Boolean indicating if there are more pages after the current one.hasPreviousPage: Boolean indicating if there are pages before the current one.startCursor: Cursor string representing the start of the current page.endCursor: Cursor string representing the end of the current page.
If no tenants are found, the output will contain a message "No tenants found" along with the pagination info.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the Plain API.
- The node uses GraphQL queries/mutations to interact with the Plain API endpoint.
- No additional external dependencies beyond the configured API credentials.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication errors.
- Providing invalid cursor values (
afterorbefore) may result in empty results or errors. - Requesting a limit outside the allowed range (1-100) may cause validation errors.
Error messages:
- Errors returned by the Plain API are surfaced as node operation errors with descriptive messages.
- Field-specific errors during mutations (not relevant for Get All) include detailed field error messages.
- If no tenants are found, the node returns a message but does not throw an error.
Resolution tips:
- Verify that the API key credential is correctly configured and has necessary permissions.
- Use valid cursor strings obtained from previous responses for pagination.
- Ensure the limit parameter is within the allowed range.
Links and References
- Plain API Documentation (hypothetical link as actual URL is not provided)
- GraphQL Pagination Concepts: https://graphql.org/learn/pagination/
- n8n Documentation on Credentials: https://docs.n8n.io/credentials/overview/