سرویس Admin SDK Groups Migration به شما امکان می دهد از API انتقال گروه های Admin SDK در Apps Script استفاده کنید. این API به مدیران می دهد Google Workspace دامنه ها (از جمله فروشندگان) امکان انتقال ایمیل ها از پوشه های عمومی و لیست های توزیع به آرشیو بحث گروه های Google.
مرجع
برای اطلاعات دقیق درباره این سرویس، به مستندات مرجع Admin SDK Groups Migration API مراجعه کنید. مانند همه سرویسهای پیشرفته در Apps Script، سرویس Admin SDK Groups Migration از اشیاء، روشها و پارامترهای مشابه API عمومی استفاده میکند. برای اطلاعات بیشتر، نحوه تعیین امضای روش را ببینید.
این نمونه سه پیام با فرمت RFC 822 را از هر یک از سه رشته جدید در صندوق ورودی Gmail کاربر دریافت میکند، یک لکه از محتوای ایمیل (شامل پیوستها) ایجاد میکند و آن را در یک گروه Google در دامنه درج میکند.
/** * 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;}
تاریخ آخرین بهروزرسانی 2025-01-09 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-01-09 بهوقت ساعت هماهنگ جهانی."],[[["The Admin SDK Groups Migration service enables administrators to migrate emails from public folders and distribution lists to Google Groups using Apps Script."],["This advanced service requires prior enabling in Google Workspace domains (including resellers) before use."],["Developers can leverage the Admin SDK Groups Migration API to programmatically manage email migration workflows."],["Sample code provided demonstrates how to migrate RFC 822 formatted emails from Gmail to a designated Google Group."],["Comprehensive documentation and support resources are available to guide developers in utilizing the service effectively."]]],[]]