Plain icon

Plain

Interact with Plain API

Company → Delete

AI-generated

Overview

This node integrates with the Plain API to manage various resources such as companies, customers, threads, events, labels, and tenants. Specifically for the Company - Delete operation, it allows users to delete a company record from the Plain system by specifying an identifier (either the company ID or the domain name). This is useful in scenarios where you need to programmatically remove outdated or incorrect company data from your CRM or customer management platform.

Practical example:

  • Automatically deleting a company when it no longer meets certain criteria in your workflow.
  • Cleaning up test or duplicate company records during data synchronization processes.

Properties

Name Meaning
Company Identifier The unique identifier used to specify which company to delete. Options:
- Company ID: Use the plain company ID to identify the company.
- Domain Name: Use the company's domain name to identify the company.

The "Company Identifier" property is a fixed collection that requires one of these two identification methods to be provided.

Output

The output JSON object for the delete operation contains a single field indicating success:

{
  "success": true
}

This confirms that the company was successfully deleted. If an error occurs, the node throws an error instead of returning a success response.

No binary data is output by this operation.

Dependencies

  • Requires an active connection to the Plain API via an API key credential configured in n8n.
  • Uses GraphQL mutations to perform the delete operation on the Plain backend.
  • No additional external dependencies are required beyond the configured API authentication.

Troubleshooting

  • Common issues:

    • Missing or incomplete company identifier: The node requires either a company ID or domain name to identify the company to delete.
    • API errors returned from Plain, such as permission denied or company not found.
    • Network or authentication failures connecting to the Plain API.
  • Error messages and resolutions:

    • "Company identifier is required": Ensure you provide either the company ID or domain name in the input.
    • Errors returned from the API will include descriptive messages; check that your API credentials have sufficient permissions.
    • "Unknown error": Check network connectivity and API key validity.

Links and References

Discussion