Yönetici SDK'sı Gruplar Taşıma Hizmeti
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Yönetici SDK'sı Gruplar Taşıma hizmeti, Google Apps Komut Dosyası'nda Yönetici SDK'sının Groups Migration API'sini kullanmanıza olanak tanır. Bu API, Google Workspace alanlarının (bayiler dahil) yöneticilerine ortak klasörlerdeki ve dağıtım listelerindeki e-postaları Google Gruplar tartışma arşivlerine taşıma olanağı tanır.
Bu hizmet hakkında ayrıntılı bilgi için Yönetici SDK'sı Groups Migration API'nin referans belgelerine bakın. Apps Komut Dosyası'ndaki tüm Gelişmiş hizmetler gibi, Yönetici SDK'sı Gruplar Taşıma hizmeti de genel API ile aynı nesneleri, yöntemleri ve parametreleri kullanır. Daha fazla bilgi için Yöntem imzaları nasıl belirlenir? başlıklı makaleyi inceleyin.
Aşağıdaki örnek kodda API'nin 1. sürümü kullanılmaktadır.
E-postaları Gmail'den Google Grubu'na taşıma
Bu örnek, kullanıcının Gmail gelen kutusundaki son üç ileti dizisinden RFC 822 biçimli üç ileti alır, e-posta içeriğinden (ekler dahil) bir blob oluşturur ve bunu alandaki bir Google Grubu'na ekler.
/** * Gets three RFC822 formatted messages from the each of the latest three * threads in the user's Gmail inbox, creates a blob from the email content * (including attachments), and inserts it in a Google Group in the domain. */functionmigrateMessages(){// TODO (developer) - Replace groupId value with yoursconstgroupId="exampleGroup@example.com";constmessagesToMigrate=getRecentMessagesContent();for(constmessageContentofmessagesToMigrate){constcontentBlob=Utilities.newBlob(messageContent,"message/rfc822");AdminGroupsMigration.Archive.insert(groupId,contentBlob);}}/** * Gets a list of recent messages' content from the user's Gmail account. * By default, fetches 3 messages from the latest 3 threads. * * @return {Array} the messages' content. */functiongetRecentMessagesContent(){constNUM_THREADS=3;constNUM_MESSAGES=3;constthreads=GmailApp.getInboxThreads(0,NUM_THREADS);constmessages=GmailApp.getMessagesForThreads(threads);constmessagesContent=[];for(leti=0;i < messages.length;i++){for(letj=0;j < NUM_MESSAGES;j++){constmessage=messages[i][j];if(message){messagesContent.push(message.getRawContent());}}}returnmessagesContent;}
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2026-05-05 UTC."],[],[]]