WaliChat icon

WaliChat

Interact with WaliChat WhatsApp API

Actions148

Departments → Create Department

AI-generated

Overview

This node enables creating a new department within the WaliChat WhatsApp API environment. Departments help organize agents and manage conversations by grouping team members under identifiable units with specific names, colors, icons, and descriptions.

Common scenarios for this node include:

  • Structuring customer support teams by product lines or service types.
  • Creating departments to route incoming WhatsApp messages to specialized agent groups.
  • Managing internal teams with clear visual identifiers (color and icon) for quick recognition in dashboards or reports.

For example, a company might create a "Sales" department with a green color and a handshake icon, including all sales agents, to handle all sales-related WhatsApp inquiries efficiently.

Properties

Name Meaning
WhatsApp Number The ID of the WhatsApp number (device) to which the department belongs.
Name Department name, must be between 2 and 25 characters.
Color Department color for quick identification. Options include Ruby, Tomato, Orange, Sunflower, Bubble, Rose, Poppy, Rouge, Raspberry, Purple, Lavender, Violet, Pool, Emerald, Kelly, Apple, Turquoise, Aqua, Gold, Latte, Cocoa, Iron.
Icon Department icon identifier for visual representation. Options include Briefcase, Users, User Tie, Chart Bar, Clipboard List, Comments, Headset, User Cog, User Edit, User Friends, Laptop Code, Network Wired, Building, Handshake, Address Book, Layer Group, Project Diagram, Calendar Check, Clipboard Check, Tasks, Chart Pie, Hands Helping, Shield Alt, User Lock, User Shield, Bullhorn, Comments Dollar, Comment Dots, Fingerprint, Check Circle, Chalkboard Teacher, Cogs, Rocket, Drafting Compass, Lightbulb, Envelope, Inbox, People Carry, Code Branch, Globe, Hand Holding USD, Money Bill Wave, Phone, Wrench, Balance Scale, Thumbs Up, User Secret, User Graduate, Landmark, Archive.
Description Optional department description, up to 300 characters.
Agents List of agent IDs to include in the department. Requires between 1 and 30 agents.

Output

The node outputs JSON data representing the newly created department object as returned by the WaliChat API. This typically includes details such as the department's unique ID, name, color, icon, description, associated WhatsApp number, and the list of assigned agents.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the WaliChat WhatsApp API via an API key credential configured in n8n.
  • The node depends on the WaliChat API endpoints responsible for managing departments.
  • The "WhatsApp Number" property requires loading available devices from the API.
  • The "Agents" property dynamically loads available team agents filtered by the selected WhatsApp number.

Troubleshooting

  • Invalid or missing WhatsApp Number: Ensure that the WhatsApp number (device) ID is valid and accessible with your API credentials.
  • Name length errors: The department name must be between 2 and 25 characters; otherwise, the API may reject the request.
  • Agent list issues: At least one agent and no more than thirty agents must be specified. Verify that agent IDs are correct and belong to the selected WhatsApp number.
  • API authentication errors: Confirm that the API key credential is correctly set up and has permissions to create departments.
  • Color or Icon invalid values: Use only the predefined options for color and icon to avoid validation errors.
  • If the node throws errors related to network or API limits, check connectivity and API usage quotas.

Links and References

Discussion