How to change google docs file owner without sending an email notice to the new owner -
i using drive api google apps script urlfetchapp change file owner. works great , sends email notice every single file new owner. how can suppress email notice?
here partial code snippet
var base = 'https://docs.google.com/feeds/'; var fetchargs = googleoauth_('docs', base); fetchargs.method = 'post'; var rawxml = "<entry xmlns='http://www.w3.org/2005/atom' xmlns:gacl='http://schemas.google.com/acl/2007'>" +"<category scheme='http://schemas.google.com/g/2005#kind' " +"term='http://schemas.google.com/acl/2007#accessrule'/>" +"<gacl:role value='owner'/>" +"<gacl:scope type='user' value='"+newowneremail+"'/>" +"</entry>"; fetchargs.payload = rawxml; fetchargs.contenttype = 'application/atom+xml'; var url = base + encodeuricomponent(oldowneremail) + '/private/full/'+fileorfolderid+'/acl?v=3&alt=json'; var content = urlfetchapp.fetch(url, fetchargs).getcontenttext();
you must add sendnotificationemails=false
request modify permissions of file
Comments
Post a Comment