0

I am working on deploying signatures for new employees after creating their accounts in the Google Admin Console. I've retrieved this sample Python script. https://github.com/jnyada/Learning-Google-Workspace-API/blob/master/signatures.py

Line 25 is where you enter the string to patch the signature into the user's Gmail account. How do I add the user's fullName and email address into that string?

I would also like to set this as the default for new emails and reply/forwards, and activate the setting "Insert signature before quoted text in replies and remove the "--" line that precedes it.". Right now, all this script can do is patch the signature into the account. Is there a function that can activate those settings?

Any help would be much appreciated, thanks.

Phil Engel
  • 11
  • 2
  • I am reviewing the sample script presented. You could edit line 25 to something similar to this `DATA = {'signature': 'User Name \n user.name@domain.com'}`. I am not sure if the script is designed to set up a "default", as I am checking exactly what is being called. – Ricardo Jose Velasquez Cruz Jul 01 '22 at 18:25
  • @RicardoJoseVelasquezCruz I'm having a problem putting 'User Name \n user.name@domain.com' in the string. It's returning the following: SyntaxError: (unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape What I just want to do is have the executor manually input the user first name and last name, job role, phone number, and email address... then returns by adding those in the string before patching to the Gmail user. – Phil Engel Jul 01 '22 at 22:46
  • @RicardoJoseVelasquezCruz, did you find any code to set the signature up as the default for new emails and reply/forwards? – Phil Engel Jul 05 '22 at 17:27
  • It should be important to point out that the code itself is designed to update only the "sendAs". Not the signatures, so this code might no be that useful for you mainly because the code is automatically applying the setting to the primary "sendAs" address which is the primary email address of the user. – Ricardo Jose Velasquez Cruz Jul 08 '22 at 20:24

0 Answers0