Actions23
Company → Create
AI-generatedOverview
This node integrates with the Plain API to manage company data. Specifically, the "Company - Create" operation allows users to create or update a company record in the Plain system by providing essential details such as the company name and domain name, along with optional additional fields.
Common scenarios where this node is beneficial include:
- Automating the creation of new company records when onboarding clients.
- Synchronizing company information from other systems into Plain.
- Enriching company profiles with contract values or assigning account owners programmatically.
For example, you might use this node to automatically add a newly registered client's company to Plain with their domain and assign an internal user as the account owner.
Properties
| Name | Meaning |
|---|---|
| Company Name | The official name of the company to be created. |
| Domain Name | The company's domain name (e.g., example.com), used as a unique identifier. |
| Additional Fields | Optional extra data for the company: - External ID: An external identifier string. - Contract Value: Numeric value representing the contract amount. - Account Owner: Select a user to assign as the account owner (loaded dynamically). |
Output
The output JSON contains the full company object returned by the Plain API after creation or update. This includes:
id: Unique identifier of the company.name: Company name.domainName: Company's domain.logoUrl: URL to the company's logo if available.createdAt/updatedAt: Timestamps of creation and last update.tier: Object containing tier id and name.contractValue: Numeric contract value if set.accountOwner: Object with assigned user's id, full name, and public name.isDeleted: Boolean indicating if the company is deleted.
If the API returns errors, the node throws an error with detailed messages including field-specific issues.
No binary data is output by this operation.
Dependencies
- Requires an API key credential for authenticating with the Plain API.
- Uses GraphQL queries and mutations to interact with the Plain backend.
- The node dynamically loads options for the "Account Owner" field by querying available users via the API.
Troubleshooting
- Missing Required Fields: Ensure "Company Name" and "Domain Name" are provided; otherwise, the API will reject the request.
- API Errors: If the API returns errors, they are surfaced with messages describing the problem, including field-level validation errors.
- Account Owner Selection: The "Account Owner" must be a valid user ID loaded from the system; invalid IDs will cause errors.
- Network Issues: Connectivity problems with the Plain API will cause execution failures.
- Unsupported Identifiers: Attempting to get companies by unsupported identifiers (like external ID) will throw errors.
To resolve errors, verify input correctness, ensure valid credentials, and check network connectivity.
Links and References
- Plain API Documentation (hypothetical link)
- GraphQL mutation reference for upserting companies in Plain API.