WhatGHL icon

WhatGHL

Send actions to WhatGHL API

Actions42

🏷️ **LABELS** · Save Labels For Chat

AI-generated

Summary

Save one or more labels to a specified chat by providing the chat ID and the label IDs to assign.

Inputs

  • Session Mode — Select how the node identifies the sending session (Auto, by session name, or by selecting a session).
  • Session — Choose the session from available WhatGHL sessions; required if Session Mode is 'Select Session'.
  • Session Name — Provide the WAHA session name; required if Session Mode is 'By Session Name'.
  • Chat ID (required) — Specify the destination chat identifier to which labels will be saved.
  • Label IDs (required) — Provide label IDs as a JSON array (e.g., ["36","29"]) or CSV string (e.g., "36,29") to assign to the chat.

Output shape

a JSON object reflecting the API response, paired with the input item index

Requires valid WhatGHL credentials (baseUrl and apiKey). The operation sends a POST request to the /actions endpoint with action 'save_labels_for_chat'. Errors specific to label saving may emit warnings without stopping workflow execution. The chat ID and label IDs must be valid and will throw errors if missing.

Examples

Example 1: Assign labels 36 and 29 to chat with ID 1234567890@c.us in automatic session mode

sessionMode=auto; chatId=1234567890@c.us; labelIds=["36","29"]

Links

Discussion