Handling persistent user-specific values in Gmail Add-ons

前端 未结 2 1669
终归单人心
终归单人心 2020-12-06 13:08

I have created simple Gmail addon, now I\'m struggling with below strategies.

After installing the addon, when first inbox is opened, we ask basic info input from us

2条回答
  •  攒了一身酷
    2020-12-06 13:38

    Robert , have you tried caching the user input ?

    I do caching in the event handler.

    function onDomainChange(e){
        var cache = CacheService.getScriptCache();
        Logger.log(e.formInput);
        cache.put('domain',e.formInput.domain);
        Logger.log(cache.get('domain'));
    }

    Refer cache docs

提交回复
热议问题