Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Obteniendo un error () al agregar usuarios al grupo de google por script de google

Recibo un error en AdminDirectory.Members.insert(member, groupEmail);

Falló con la llamada de API de error a directory.members.insert falló con el error: Recurso no encontrado: groupKey

no puedo agregar usuarios al grupo de google

¡por favor ayuda!

 function myFunction() { addMembersFromSheet(); } function addMembersFromSheet() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("groups"); // var emails = sheet.getRange(1,1,sheet.getLastRow()-1,1).getValues(); var emails = SpreadsheetApp.getActive().getRange("Sheet1!A1:A3").getValues(); var group = GroupsApp.getGroupByEmail("testingw@googlegroups.com"); for(i = 0; i < emails.length; i++) { try { addGroupMember(emails[i][0], 'testingw@googlegroups.com'); console.log(emails[i][0]); } catch(e) { console.error(e); continue; } } } function addGroupMember(userEmail,groupEmail) { const member = { email: userEmail, role: 'MEMBER' }; try { AdminDirectory.Members.insert(member, groupEmail); Logger.log('User %s added as a member of group %s.', userEmail, groupEmail); } catch (err) { // TODO (developer)- Handle exception from the API Logger.log('Failed with error %s', err.message); } }
about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!