NaLU AI icon

NaLU AI

Semantic data validation and extraction for chatbots using NaLU AI.

Validate CPF (Validate_cpf)

AI-generated

Summary

Extracts a Brazilian CPF tax ID from a chatbot user's free-text reply and validates it (mod 11) by calling the NaLU AI API endpoint /v1/extract/cpf.

Inputs

  • Agent Prompt/Question (required) — The question or statement the chatbot sent to the user (e.g. asking for their CPF). Sent as agent_input to give the validator context.
  • User Reply (required) — The user's response text that should contain the CPF. Sent as user_input.
  • Language — Conversation language: English (en), Portuguese (Brazil) (pt-BR, default), or Spanish (es).

Output shape

One output item per input item, whose JSON is the response body returned by the NaLU AI API for the CPF validator.

The exact response fields aren't defined in the node source; they come straight from the API. Requires the naluAiApi credential. With Continue On Fail enabled, a failed item returns {error: message} instead of stopping the workflow. Each item is processed with its own API request.

Examples

Example 1: A WhatsApp bot asks for the customer's CPF and the user replies with free text such as 'meu cpf é 123.456.789-09'.

Agent Prompt/Question: 'Qual o seu CPF?'; User Reply: expression for the incoming message text; Language: pt-BR.

Example 2: Validate CPFs in a batch of chat transcripts.

Feed one item per transcript row; map agent_input and user_input via expressions; enable Continue On Fail to capture per-item errors.

Links

Discussion