1
我已經拿到了劇本以下工作對我來說......(腳本自動生成與電子表格是填充了從表單數據的自動數據的谷歌組...)組腳本幫助需要
function onFormSubmit() {
var sheet = SpreadsheetApp.openById("17KZXpWHipISZSqgD9w255VrirzITrks0fLaBpXp7Ybk")
var email = sheet.getRange("B"+sheet.getLastRow()).getValue()
var name = sheet.getRange("C"+sheet.getLastRow()).getValue()
var user = sheet.getRange("AH"+sheet.getLastRow()).getValue()
try{
AdminDirectory.Groups.insert(
{
"email": email,
"name": name,
}
)
AdminDirectory.Members.insert(
{
"email": user,
"role": "OWNER",
}
, email)
GmailApp.sendEmail("[email protected]",email + " Group creation | Success", " address has been created for " + name)
} catch(e){}
}
有人能幫助我完成它的剩餘步驟,我不能獲得工作是:
集集團適度設置:跳過審覈隊列發佈消息組
設置發帖權限:公共
function onFormSubmit() {
var sheet = SpreadsheetApp.openById("17KZXpWHipISZSqgD9w255VrirzITrks0fLaBpXp7Ybk")
var email = sheet.getRange("B"+sheet.getLastRow()).getValue()
var name = sheet.getRange("C"+sheet.getLastRow()).getValue()
var user = sheet.getRange("AH"+sheet.getLastRow()).getValue()
try{
AdminDirectory.Groups.insert(
{
"email": email,
"name": name,
}
)
AdminDirectory.Members.insert(
{
"email": user,
"role": "OWNER",
}
)
AdminDirectory.Groups.update(
{
"whoCanJoin": "CAN_REQUEST_TO_JOIN",
"whoCanViewMembership": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanViewGroup": "ALL_IN_DOMAIN_CAN_VIEW",
"whoCanInvite": "ALL_MANAGERS_CAN_INVITE",
"allowExternalMembers": "false",
"whoCanPostMessage": "PUBLIC",
}
)
AdminDirectory.Groups.moderation(
{
"Spammessages": "Skip_the_moderation_queue_and_post_to_the_group"
}
, email)
GmailApp.sendEmail("[email protected]",email + " Group creation | Success", " address has been created for " + name)
} catch(e){}
}
我試過,但無論是我累了還是我失去了一些愚蠢的......?