WTS Chat icon

WTS Chat

Get data from Wts API

Overview

This node operation updates an existing card within a panel in the WTS CRM system. It allows users to modify various attributes of a card such as its title, description, due date, position, monetary amount, associated contacts, tags, responsible user, custom fields, metadata, and more. This is useful for workflows that need to programmatically adjust task or project cards based on changing data or events.

Practical examples include:

  • Automatically updating the status or details of a project card when a related event occurs.
  • Changing the responsible user or due date of a task card based on external triggers.
  • Adding or modifying custom fields or tags on a card to reflect new information.

Properties

Name Meaning
Card ID The unique identifier of the card to update.
Fields The list of card fields to update. Options include: Archived, ContactIds, CustomFields, Description, DueDate, Metadata, MonetaryAmount, Position, ResponsibleUserId, SessionId, StepId, TagIds, Title.
Include Archived Whether to include archived items (only applicable if "Archived" field is selected).
Contacts ID List of contact IDs to associate with the card (applicable if "ContactIds" field is selected).
Custom Fields Key-value pairs for custom fields to set on the card (applicable if "CustomFields" field is selected). Keys can be selected from existing custom fields for the card or specified by ID.
Description Text description of the card (applicable if "Description" field is selected).
Due Date Due date and time for the card in YYYY-MM-DD hh:mm format according to the user's timezone (applicable if "DueDate" field is selected).
Monetary Amount Numeric monetary value associated with the card (applicable if "MonetaryAmount" field is selected).
Position Numeric position/order of the card within the step or panel (applicable if "Position" field is selected).
User Name or ID Responsible user assigned to the card; can be chosen from a list or specified by ID (applicable if "ResponsibleUserId" field is selected).
Step ID Identifier of the step within the panel where the card belongs (applicable if "StepId" field is selected).
Tag Names or IDs Tags to assign to the card; can be selected from existing tags or specified by IDs (applicable if "TagIds" field is selected).
Title Title or name of the card (applicable if "Title" field is selected).
Session ID Session identifier related to the card (applicable if "SessionId" field is selected).
Metadata Key-value pairs of additional metadata to attach to the card (applicable if "Metadata" field is selected).

Output

The output is an array of JSON objects representing the updated card(s) returned from the API after the update operation. Each item contains the full details of the updated card including all fields and their current values.

If the update is successful, the output JSON will reflect the new state of the card as stored in the WTS CRM system.

Dependencies

  • Requires an API key credential for authenticating with the WTS API.
  • Uses the WTS CRM service endpoints to perform card updates.
  • The node expects proper configuration of the WTS API credentials in n8n.
  • Network access to the WTS API endpoint https://api.wts.chat is required.

Troubleshooting

  • Missing Card ID: If the Card ID is not provided or empty, the node throws an error indicating that the Card ID must be filled in.
  • No Fields Selected: If no fields are selected to update, the node throws an error asking to fill in the fields.
  • Invalid Field Values: Providing invalid values for fields like dates or user IDs may cause API errors.
  • API Errors: Any issues communicating with the WTS API (e.g., authentication failure, network issues) will result in errors wrapped as NodeApiError.
  • Metadata and Custom Fields Handling: Metadata and custom fields are converted from arrays of key-value pairs into objects before sending. Incorrect formatting may cause failures.
  • Include Archived Usage: The "Include Archived" option only applies if the "Archived" field is selected; otherwise, it is ignored.

To resolve errors:

  • Ensure all required parameters are filled correctly.
  • Validate date formats and IDs.
  • Confirm API credentials are valid and have necessary permissions.
  • Check network connectivity to the WTS API.

Links and References

Discussion