r/GoogleAppsScript • u/Embarx • 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
View all comments
Show parent comment
2
u/WicketTheQuerent Feb 04 '26
Checkout this https://developers.google.com/workspace/add-ons/studio/update-cards#example_insert_and_remove_sections_and_widgets
Remarks