This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Description
I am trying to implement the chatbase analytics for dialogflow agent using dialogflow google cloud function.
When I send the chatbase message independently using the sample nodejs function. It sends the message to chatbase without any issues and I can able to view the analytics in chatbase dashboard. But copied the same code to dialogflow cloud function it throws the following error.
Error: One or more required fields were not set on the message, please check the documentation on how to set the following message fields: api_key, type, user_id, time_stamp, platform, message at RequiredKeysNotSet
I have set all the required fields but it still throwing an error. Tried for both single and multiple messages. Attached the sample code here.
I am using the following chatbase dependency
@google/chatbase": "^1.1.1"