RAW Action icon

RAW Action

Envia actions de volta para o RAW via callbackUrl.

Add Chat State

AI-generated

Summary

Merge the supplied JSON data into the specified chat’s state by sending an ADD_CHAT_STATE action to the RAW callback endpoint. Existing state keys are preserved, and keys set to null are removed.

Inputs

  • Callback URL / Environment (required) — Version 1 requires the callback URL, defaulting to meta.callbackUrl from the input item. Version 2 defaults to Automatic and reads that same URL; you can instead choose Homologation or Production, or provide a custom callback URL.
  • Client ID (required) — Identifies the RAW client; defaults to meta.clientId from the input item.
  • Chat ID (required) — Identifies the chat whose state to update; defaults to meta.chatId from the input item.
  • Bot ID — Optional bot identifier; defaults to meta.botId. When provided, the server uses that bot’s configuration.
  • State Data (JSON) (required) — JSON object to merge into the chat state. Existing keys are preserved; setting a key to null removes it. Invalid JSON is treated as an empty object.
  • Next Step — Optionally updates the session step along with the action without navigating to it.
  • Next Sub Step — Optionally updates the session substep along with the action.

Output shape

One output item per input item, containing { ok: true, operation, response } on success.

The response field contains the callback response, or null if none is returned. With Continue On Fail enabled, a failed item instead contains { error }; otherwise the node raises an item-scoped error.

Links

Discussion