r/GoogleAppsScript • • Feb 04 '26

Question What does the Widget.setId() method do?

I noticed in the Apps Script IDE today while writing a widget that there was a (new?) method called setId() which I have not noticed before.

In the documentation, it says:

Sets the unique ID assigned that's used to identify the widget to be mutated. Widget mutation is only supported in Add-Ons.

Does anyone know what this does? What exactly is widget mutation? If it means the widget can be changed without rebuilding the whole card it would be a game changer...

2 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/WicketTheQuerent Feb 05 '26

The remarks are about the example which was referred to help you to understand Widget.setId. I suggest you to try it in your add-on.