![]() | Justin Granger Associate, Information Technology Medullan Inc. | medullan.com t: +1 617 547 0273 e: jgra...@medullan.com |
--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/013e4505-1b30-4e63-b013-cc184664c98e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Justin, thanks for the script. I too am looking for a way to globally update all user signature files using variables for name, title, phone, etc. However, I having a hard time maintaining a seperate CSV file with all the correct data.Is it possible to grab the variable info directly from the User's account at runtime?
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/76c898a5-8349-486f-90b0-6b46fe9c3fd7%40googlegroups.com.
gam csv Users.csv gam user ~primaryEmail signature "This is a signature <br> {Name}" replace Name ~name.fullName
gam user ashley.attwood signature file Template.txt
gam csv Users.csv gam user ~primaryEmail signature file Template.txt
ERROR: 'ascii' codec can't decode byte 0xef in position 0: ordinal not in range(128)
gam csv Users.csv gam user ~primaryEmail signature file Template.txt replace
Name ~name.fullName ...
gam csv Users.csv gam user ~primaryEmail signature file Template.txt charset utf-8 replace
Name ~name.fullName ...
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9e2c0062-e8db-4c65-bb2e-7ed1827a7ff6%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/9e2c0062-e8db-4c65-bb2e-7ed1827a7ff6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "GAM for G Suite" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/r7pyKCrluyA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/1A69ECC6-8390-4A2E-B917-73F41C5BFCD4%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
const DEBUG=false;
const emailFolder = ("./");
var domini = ['example.com', 'example2.com', 'example3.it' ];
const gampath = "gam";
const fs = require('fs');
const { exec } = require('child_process');
function puts(error, stdout, stderr) { sys.puts(stdout) }
try {
domini.forEach(dominio => {
if (DEBUG) console.log ("LOG: "+emailFolder+dominio);
fs.readdir(emailFolder+dominio, (err, files) => {
files.forEach(file => {
var useremail = file.replace(/\.html/g,'').replace(/\-/g,'.').replace(/\.firma/g,'')+"@"+dominio;
var command = gampath+" user "+useremail+" signature file "+emailFolder+dominio+"/"+file+" html";
if (!DEBUG) {
exec(command, (error, stdout, stderr) => {
if (error) {
throw error;
}
console.log(stdout);
});
}
if (DEBUG) {
console.log("LOG: "+command);
}
});
});
});
} catch (e) {
console.log(e);
}