NaLU AI icon

NaLU AI

Semantic data validation and extraction for chatbots using NaLU AI.

Validate Phone (Validate_phone)

AI-generated

Summary

Extracts a phone number (with DDD area code) from a user's free-text chatbot reply by calling the NaLU AI API, which validates the DDD against active Brazilian ranges. Returns the API's JSON response for each input item.

Inputs

  • agent_input (required) — The question or statement the chatbot sent to the user (e.g. "What's your phone number?"). Gives the API context for interpreting the reply.
  • user_input (required) — The user's raw reply, from which the phone number is extracted.
  • language — Conversation language: English (en), Portuguese (Brazil) (pt-BR), or Spanish (es). Defaults to pt-BR.

Output shape

One output item per input item, whose json is the response body from NaLU AI's POST /v1/extract/phone endpoint, paired to the input item.

The exact response fields are not defined in the node source; they come from the NaLU AI API. Requires the naluAiApi credential. If Continue On Fail is enabled, failed items return json { error: message }; otherwise the node throws an error.

Examples

Example 1: Capture a customer's phone number in a WhatsApp chatbot flow after asking for it.

agent_input = "Qual o seu telefone com DDD?", user_input = {{ $json.message }}, language = pt-BR

Example 2: Validate a phone number given in English by a user in a support bot.

agent_input = "What's the best number to reach you?", user_input = {{ $json.reply }}, language = en

Links

Discussion