gam print users query "orgUnitPath='/Aztec'" fields primaryEmail,name,phones,organizations > "Users.csv"
gam csv "Users.csv" gam user ~primaryEmail signature file "Template.txt" replace Name ~name.fullName replace Title ~organizations.0.title replace OfficePhone ~phones.2.value replace Email ~primaryEmail
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. --
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/b5aef57a-52f0-493a-92bb-edef4ee21a77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Ashley,You'll need the script (MergeSendasUsers.py), Python2: https://github.com/taers232c/GAM-Scripts, Python3: https://github.com/taers232c/GAM-Scripts3Start with the Users.csv that you already have.Produce a Sendas.csv file, e.g., gam ou /Aztec print sendas > Sendas.csvMerge Sendas.csv with Users.csv into UpdatedUsers.csv: python MergeSendasUsers.py ./Sendas.csv ./Users.csv ./UpdatedUsers.csvUpdate all signatures:gam csv "UpdatedUsers.csv" gam user ~primaryEmail update sendas ~sendAsEmail file "Template.txt" replace Name ~name.fullName replace Title ~organizations.0.title replace OfficePhone ~phones.2.value replace Email~primaryEmailRoss
On Fri, Jul 6, 2018 at 5:24 AM Ashley Attwood <ashley....@aztecuk.com> wrote:
I've got GAM updating signatures autonomously by retrieving user information to CSV then writing the signatures from a HTML template file with variables being replaced. I've got different OUs with different signature templates.Retrieving the directory information:
gam print users query "orgUnitPath='/Aztec'" fields primaryEmail,name,phones,organizations > "Users.csv"Writing the signatures:
gam csv "Users.csv" gam user ~primaryEmail signature file "Template.txt" replace Name ~name.fullName replace Title ~organizations.0.title replace OfficePhone ~phones.2.value replace Email ~primaryEmailThis only updates the users primary signature and not any sendas signatures.Can I tweak my 2nd command so that all their signatures are updated with the same template?The bells and whistles would be if I could retrieve each sendas address into my CSV along with the directory fields. Then write out a custom signature to each where I would edit my "replace Email" function to use the sendas email rather than primaryEmail. I can read a single users sendas into a CSV and I can do all users but I can't get it to combine properly with either the "orgunitpath" filter or the "fields" search.Has anyone achieved this or similar?
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. --
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-manager+unsub...@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/b5aef57a-52f0-493a-92bb-edef4ee21a77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--Ross Scroggs
gam csv "UpdatedUsers.csv" gam user ~primaryEmail update sendas ~sendAsEmail file "Template.txt" replace Name ~name.fullName replace Title ~organizations.0.title replace OfficePhone ~phones.2.value replace Email~primaryEmail
ERROR: file is not a valid argument for "Gam <users> update sendas"
gam csv "UpdatedUsers.csv" gam user ~primaryEmail update sendas ~sendAsEmail signature file "Template.txt" replace Name ~name.fullName replace Title ~organizations.0.title replace OfficePhone ~phones.2.value replace Email~primaryEmail
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission.
--
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/a1994411-77af-4639-a1dc-cdb3516921de%40googlegroups.com.