Plain icon

Plain

Interact with Plain API

Company → Get All

AI-generated

Overview

This node integrates with the Plain API to manage company data. Specifically, the "Company" resource with the "Get All" operation retrieves multiple companies from the Plain system. It supports pagination and filtering options such as limiting the number of results and including deleted companies.

Common scenarios where this node is beneficial include:

  • Synchronizing a list of companies from Plain into another system.
  • Retrieving all companies for reporting or analysis.
  • Automating workflows that require bulk access to company information.

For example, you could use this node to fetch up to 50 companies at a time, optionally including those marked as deleted, and then process each company record in subsequent workflow steps.

Properties

Name Meaning
Additional Fields Collection of optional parameters:
- Limit Maximum number of companies to return (default 50).
- Include Deleted Boolean flag indicating whether to include companies marked as deleted (default false).

Output

The output is an array of company objects, each containing fields such as:

  • id: Unique identifier of the company.
  • name: Company name.
  • domainName: Company's domain name.
  • logoUrl: URL to the company's logo.
  • createdAt.iso8601: Creation timestamp in ISO 8601 format.
  • updatedAt.iso8601: Last update timestamp in ISO 8601 format.
  • tier: Object with id and name representing the company's tier.
  • contractValue: Numeric value representing contract amount.
  • accountOwner: Object with id, fullName, and publicName of the account owner.
  • isDeleted: Boolean indicating if the company is deleted.
  • deletedAt.iso8601: Timestamp when the company was deleted (if applicable).

If no companies are found, the output contains a message and pagination info. If exactly one company is found, it returns that single company object with metadata. For multiple companies, it returns a summary with total count, pagination info, and an array of companies.

Each output item also includes metadata about pagination (pageInfo) and the operation performed.

Dependencies

  • Requires an API key credential for authenticating with the Plain API.
  • Uses GraphQL queries to interact with the Plain backend.
  • The node depends on the plainApiRequest helper function to perform authenticated requests.
  • Pagination cursors (after, before) can be used to navigate through large result sets.

Troubleshooting

  • No companies found: This means the query returned zero results. Check filters and ensure companies exist in the Plain system.
  • API errors: Errors returned by the Plain API will be thrown as node operation errors with descriptive messages. Common causes include invalid credentials, malformed queries, or permission issues.
  • Limit too high: Setting a very high limit may cause performance issues or API rate limits. Use reasonable limits and paginate results.
  • Include Deleted flag: If set incorrectly, you might get unexpected results. Ensure you understand whether deleted companies should be included.

Links and References

Discussion