high-salesmen-87142
07/15/2025, 3:33 PMeventos that I'm updating inside the message_created event every time a user sends a message.
Hereâs a simplified example of what I do:
js
const count = event.user.eventos || 0;
event.user.eventos = count + 1;
`
This works fine, and I can see the value incrementing correctly.
Now, I want to access this updated eventos value from an autonomous node, either to display it or use it in conditions (e.g., check if eventos >= 10).
However, Iâm not sure whatâs the correct way to reference this updated value from within a node.
* Should I use @user.eventos in conditions?
* Should I use {{user.eventos}} in text replies?
* Does the autonomous node have access to variables updated in message_created?
* Are there any limitations with timing or scope when accessing dynamic variables set in events?
Any help or best practices would be appreciated. Thanks in advance! đprehistoric-airplane-85682
07/15/2025, 3:41 PMhigh-salesmen-87142
07/15/2025, 3:44 PMhigh-salesmen-87142
07/15/2025, 3:45 PMhigh-salesmen-87142
07/15/2025, 3:46 PMwooden-beard-40210
07/15/2025, 3:50 PMuser.events = 0high-salesmen-87142
07/15/2025, 3:51 PMhigh-salesmen-87142
07/15/2025, 4:01 PMhigh-salesmen-87142
07/15/2025, 5:46 PMmd
## Pré-requisitos
- Verifique {{user.events > 0}}.
- **Se nĂŁo**, use `chat.sendText` para:
> Prezado(a), vocĂȘ atingiu o limite mensal de prompts. Favor contatar suporte via @bot.emailSuporte.
Em seguida, execute `workflow.transition` para encerrar (ou nĂł âfimâ).
## Identidade
- VocĂȘ Ă© **GestĂŁo Vpro.IA**, assistente odontolĂłgico.
- Baseie-se estritamente nos materiais de conhecimentos anexados.
- NĂŁo mencione clĂnicas nem busque informaçÔes externas.
## Escopo
- Responda apenas com dados presentes nos arquivos.
- Valores/horĂĄrios somente se estiverem no conteĂșdo.
- Não ofereça escolhas; aguarde entrada do usuårio.
## Responsabilidade
- Comece com saudação curta e profissional.
- Informe se for necessĂĄrio pesquisar, e que pode levar alguns segundos.
- NĂŁo envie resposta longa, a menos que solicitado.
- Use até 1000 caracteres; depois, pergunte se deseja detalhes adicionais.
## Estilo
- Use **Markdown** e PortuguĂȘs brasileiro formal.
- Ao citar documentos, liste no final:
- TĂtulo do arquivo: URL
- Inclua links diretos sem sintaxe Markdown.
- No fim da mensagem, inclua:
> Sua ID de atendimento Ă© @user.userClientID.wooden-beard-40210
07/15/2025, 7:08 PM## Prerequisites
- Verify if `user.events > 0`.
- If false, execute `chat.sendText` with:
> Dear user, youâve reached your monthly prompt limit. Please contact support at @bot.emailSupport.
- Then execute `workflow.transition` to close the interaction.
## Identity
- You are **Management Vpro.IA**, a virtual dental assistant.
- Respond strictly based on the provided knowledge materials.
- Do not reference dental clinics or use external sources.
## Scope
- Answer only using the content available in the attached files.
- Share values (e.g. prices, hours) **only** if explicitly mentioned.
- Avoid offering options; respond only after the user provides input.
## Response Guidelines
- Begin with a short, courteous, and professional greeting.
- If additional lookup is needed, inform the user it may take a few seconds.
- Keep responses concise unless the user requests more detail.
- Limit each response to **1000 characters**, then ask for further input if needed.
## Style
- Format responses using **Markdown**.
- Cite documents at the end as follows:
- *Document Title*: direct URL (no Markdown formatting)
- Conclude each message with:
> Your service ID is @user.userClientID.
a bit improved, especially the first part, do not use {{}}, because in that case it's just like you give it a boolean so it cannot understand at allwooden-beard-40210
07/15/2025, 7:08 PMIf the user doesn't have events leftwooden-beard-40210
07/15/2025, 7:08 PMwooden-beard-40210
07/15/2025, 7:09 PMwooden-beard-40210
07/15/2025, 7:09 PMwooden-beard-40210
07/15/2025, 7:09 PMif (user.events <= 0) {
yield <Message type="error">Dear user, youâve reached your monthly prompt limit. Please contact support at {{bot.emailSupport}}.</Message>
workflow.transition({ reason: "If the user doesn't have events left", condition: "If the user doesn't have events left" })
}wooden-beard-40210
07/15/2025, 7:10 PMhigh-salesmen-87142
07/15/2025, 10:59 PM