Make Agent not returning scenario output from tool use

I’m building a Telegram chatbot automation. Currently the chatbot has access to two tools:

  1. Fetch latest emails
  2. Fetch last report date

The agent uses the second tool to get a timestamp from a data store and include it in the output report to the user.

The problem is the agent isn’t actually fetching a real timestamp and is hallucinating one instead. I’ve tried using both the Return output and Webhook response modules–neither work.

I can see the agent calling the tool in the test chat interface. The input is {} and the output is Accepted.

I can’t figure out what I’m doing wrong. Please help! Thanks. :slight_smile:

Chatbot scenario:

Get lastReportDate scenario:

What is your agent’s prompt? Usually that’s the first place to check.

Also, do you have to use a webhook or can you get the information from a sub scenario? When using a scenario, I think you have a better idea of what’s happening, what’s coming in, and what’s coming out.

L