WTS Chat icon

WTS Chat

Get data from Wts API

Overview

The "Duplicate Card" operation in the Panel resource allows users to create a copy of an existing card within a specified step of a panel. This operation is useful when you want to replicate a card's data and move or organize it into another step without manually recreating all its details. It supports selectively including specific fields from the original card in the duplicated version and optionally archiving the original card after duplication.

Common scenarios:

  • Moving a task or item represented by a card from one workflow step to another while keeping its details intact.
  • Creating templates or copies of cards for similar tasks or projects.
  • Archiving the original card automatically after duplication to keep the workspace clean.

Practical example:
You have a project management board with multiple steps (e.g., "To Do", "In Progress", "Done"). You want to duplicate a card from "To Do" to "In Progress" while including only certain fields like Amount, Contacts, and Tags, and archive the original card to avoid confusion.

Properties

Name Meaning
Card ID The unique identifier of the card to be duplicated.
Step ID The target step ID where the duplicated card will be placed.
Archive Original Card Boolean flag indicating whether the original card should be archived after duplication.
Fields Specifies which fields to include in the duplicated card. Options: All, Amount, Contacts, CustomFields, DueDate, MonetaryAmount, Notes, ResponsibleUser, Tags, Undefined

Output

The output is a JSON object representing the duplicated card as returned by the external service. It contains the details of the newly created card, including any fields that were included based on the selected options.

If the node supports binary data output for this operation, it is not indicated in the source code; thus, the output is purely JSON-based.

Dependencies

  • Requires an API key credential for authentication with the external WTS API.
  • Uses the WtsCrmService.duplicateCard method to perform the duplication via the API.
  • The node expects proper configuration of the API base URL and credentials within n8n.

Troubleshooting

  • Missing Card ID: If the Card ID is empty or not provided, the node throws an error stating "CardID is empty, please fill it in." Ensure the Card ID parameter is correctly set.
  • API Errors: Any errors returned from the external API during duplication are wrapped and thrown as node errors. Check the API response for details.
  • Invalid Step ID: If the Step ID is invalid or does not exist, the duplication may fail. Verify the Step ID corresponds to a valid step in the panel.
  • Field Selection Issues: Selecting incompatible or unsupported fields might cause unexpected results. Use the provided field options to ensure compatibility.

Links and References

  • No direct links are present in the source code. For more information, consult the documentation of the external WTS API related to panel card management and duplication.

Discussion