google chat app does it have two methods like Jul 11, 2025, 11:59:31 AM Error Script…
- User
google chat app does it have two methods like Jul 11, 2025, 11:59:31 AM Error Script function not found: onAddedToSpace and Jul 11, 2025, 11:52:36 AM Error Script function not found: onAddToSpace
Assistant
Yes, Google Chat apps can use both those event handler methods, but they're actually different versions of the same functionality:
onAddToSpacewas the original method name used in older versions of the Google Chat APIonAddedToSpaceis the newer version that replaced it
The error messages you're seeing indicate that your script is looking for these functions but they're not defined in your code. You'll need to implement at least one of them (preferably the newer
onAddedToSpace) to handle the event when your app is added to a Chat space.Would you like me to show you a basic implementation example of one of these functions?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.