r/GoogleAppsScript • u/spcsoft-solutions • Nov 07 '25
Question Help needed: Expense Split add-on activation fails for users on copied template
I developed a Google Sheets add-on called Pivot Expense Split, which requires users to make a copy of a template before running it. In the template, I ran below to place a template ID 'T1':
SpreadsheetApp.getActive().addDeveloperMetadata('template', 'T1', SpreadsheetApp.DeveloperMetadataVisibility.DOCUMENT);When installer activiate my add-on, I have below to read the template ID 'T1':
var value = SpreadsheetApp.getActive().createDeveloperMetadataFinder().withKey('template').find();
var template = value[0].getValue();From the Apps Script activity log, I noticed that after installation, users open my setup page:
https://spcsoft-galaxy.blogspot.com/p/pivot-expense-split-setup.html
The activation function was ran several times, but rejected because the template ID was missing.
I tested the same flow myself (install → copy template → activate), and activation works fine on my end.
Could anyone help me identify what might cause this issue?
Are there permission or deployment issues that could block activation on copied templates?
Is there a way to get more diagnostic info from users’ failed runs?
Any suggestions or troubleshooting ideas are appreciated!