Actions13
- Validate Birthdate (Validate_birthdate)
- Validate Cancel Intent (Validate_cancel_intent)
- Validate CEP (Validate_cep)
- Validate CNPJ (Validate_cnpj)
- Validate CPF (Validate_cpf)
- Validate Email (Validate_email)
- Validate Handoff (Validate_handoff)
- Validate License Plate BR (Validate_plate_br)
- Validate Name (Validate_name)
- Validate Phone (Validate_phone)
- Validate Postal Code (Validate_postal_code)
- Validate Reply Context (Validate_reply)
- Validate Yes/No (Validate_yes_no)
Validate CNPJ (Validate_cnpj)
AI-generatedSummary
Extracts a Brazilian CNPJ (company tax ID) from a user's chatbot reply and validates it (mod 11 check) by sending the question and reply to the NaLU AI API.
Inputs
- agent_input (required) — The question or statement the chatbot sent to the user (e.g. asking for the company CNPJ). Gives the API context for interpreting the reply.
- user_input (required) — The user's free-text reply, from which the CNPJ is extracted.
- language — Conversation language: English (en), Portuguese (Brazil) (pt-BR, default), or Spanish (es).
Output shape
One output item per input item, containing the JSON response from the NaLU AI API (POST https://naluai.dev/v1/extract/cnpj), with pairedItem linking to the input item.
The exact response fields are not defined in the node source; they are passed through as returned by the API. Requires the naluAiApi credential. With Continue On Fail enabled, failed items return {error: message}; otherwise the node throws a NodeOperationError.
Examples
Example 1: Validate a CNPJ a customer typed in a chat flow.
agent_input: 'Qual o CNPJ da empresa?'; user_input: '{{ $json.message }}'; language: pt-BR.
Example 2: Handle a reply with extra text around the number.
user_input: 'Claro, o CNPJ é 11.222.333/0001-81'; the API extracts and validates the CNPJ.