Actions100
- Activity Logs Actions
- Articles Actions
- Asset Layouts Actions
- Asset Passwords Actions
- Assets Actions
- Get Assets
- Get Companies Company Id Assets
- Post Companies Company Id Assets
- Get Companies Company Id Assets Id
- Put Companies Company Id Assets Id
- Delete Companies Company Id Assets Id
- Put Companies Company Id Assets Id Archive
- Put Companies Company Id Assets Id Unarchive
- Put Companies Company Id Assets Id Move Layout
- Cards Actions
- Companies Actions
- Expirations Actions
- Exports Actions
- Folders Actions
- IP Addresses Actions
- Lists Actions
- Magic Dash Actions
- Matchers Actions
- Networks Actions
- Password Folders Actions
- Procedure Tasks Actions
- Procedures Actions
- Public Photos Actions
- Rack Storage Items Actions
- Rack Storages Actions
- Relations Actions
- Uploads Actions
Overview
This node operation allows you to create a new relation between two entities in the system. Relations define how different entities (such as assets, websites, procedures, companies, articles, etc.) are connected or associated with each other. This is useful for modeling complex data relationships and dependencies within your workflows.
Typical use cases include:
- Linking an asset to a company to indicate ownership.
- Associating a procedure with a website where it is applied.
- Creating bidirectional links between related articles or documents.
By using this node, users can automate the creation of these relations programmatically, ensuring data consistency and enabling richer data queries downstream.
Properties
Name | Meaning |
---|---|
Toable Id | The ID of the destination entity in the relation |
Toable Type | The type of the destination entity in the relation. Options: Asset, Website, Procedure, AssetPassword, Company, Article |
Fromable Id | The ID of the origin entity in the relation |
Fromable Type | The type of the origin entity in the relation. Options: Asset, Website, Procedure, AssetPassword, Company, Article |
Description | A description explaining the relationship between the two entities |
Is Inverse | Boolean flag indicating if this relation is the inverse one. When true, this relation represents the inverse link |
These properties are provided as additional body fields when creating the relation.
Output
The node outputs JSON data representing the newly created relation object. This typically includes all details of the relation such as IDs, types of both entities involved, description, and metadata about the relation creation.
If the API supports binary data output, it would be summarized here, but based on the code and properties, this node primarily deals with JSON data.
Dependencies
- Requires an API key credential for authenticating requests to the external service managing these relations.
- The base URL for the API must be configured in the node credentials.
- The node depends on the external AvantGuard API service (or similar) that exposes endpoints for managing relations between entities.
Troubleshooting
- Missing or invalid IDs: Ensure that both
fromable_id
andtoable_id
are valid existing entity IDs; otherwise, the API may return errors about missing entities. - Invalid entity types: Use only supported entity types (
Asset
,Website
,Procedure
,AssetPassword
,Company
,Article
). Using unsupported types will likely cause validation errors. - Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions to create relations.
- Inverse relation confusion: If unexpected duplicate relations appear, check the
is_inverse
flag usage. Setting it incorrectly might create redundant inverse relations.
Common error messages might include:
- "Entity not found" – Check IDs.
- "Unauthorized" – Check API credentials.
- "Invalid relation data" – Check property values and types.
Links and References
- AvantGuard API Documentation (hypothetical link)
- n8n documentation on Creating Custom Nodes
- General REST API best practices for relations and linked resources