گسترش Gmail با افزونه های Google Workspace، گسترش Gmail با افزونه های Google Workspace، گسترش Gmail با افزونه های Google Workspace
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
هدف بسیاری از ایمیل ها این است که گیرنده را وادار به انجام یک کار خاص یا رسیدن به یک هدف کنند، مانند افزودن یک رویداد تقویم، پر کردن یک فرم، رزرو یا استفاده از برنامه های کاربردی دیگر. با این حال، گیرندگان باید کار را بدون هیچ گونه درخواست دیگری تکمیل کنند، اغلب تعدادی از مراحل دستی را انجام می دهند.
میتوانید با خودکار کردن این وظایف با افزونههای Google Workspace در زمان و تلاش کاربران خود صرفهجویی کنید. هنگامی که یک کاربر پیامی را در Gmail می خواند یا می نویسد، یک افزونه Google Workspace می تواند یک رابط کاربری تعاملی و سفارشی ارائه دهد که به کاربر اجازه می دهد به روش های مختلف روی پیام عمل کند، مانند:
- نمایش اطلاعات اضافی برای کاربر در رابط کاربری Gmail.
- اتصال به خدمات غیر Google، برای بازیابی اطلاعات یا انجام اقدامات دیگر.
- ارائه ابزاری برای کنترل رفتار افزونه یا ارسال اطلاعات به سرویس دیگری.
افزونههای Google Workspace میتوانند انواع افزونههای زیر را در Gmail تعریف کنند:
علاوه بر این، افزونههای Google Workspace که Gmail را گسترش میدهند، این کار را هم در کلاینتهای دسکتاپ و هم برای تلفن همراه انجام میدهند.
صفحات اصلی جیمیل
Gmail از نمایش صفحات اصلی افزونه Google Workspace پشتیبانی می کند. برای نشان دادن صفحه اصلی مشترک افزونه خود در Gmail، فقط مطمئن شوید که یک فیلد addOns.gmail
در مانیفست افزونه وجود دارد.
از طرف دیگر، یک gmail.homepageTrigger
را به مانیفست افزودنی اضافه کنید تا یک صفحه اصلی مخصوص Gmail ارائه شود.
در هر صورت، باید نام یک تابع راهاندازی صفحه اصلی را در پروژه اسکریپت افزونه خود وارد کنید. این تابع به طور خودکار برای ساختن صفحه اصلی Gmail در صورت نیاز فراخوانی می شود. شما باید این تابع را برای ساختن و برگرداندن یک Card
یا آرایه ای از اشیاء Card
که صفحه اصلی را تشکیل می دهند، پیاده سازی کنید. تابع ماشه صفحه اصلی به یک شی رویداد به عنوان پارامتر ارسال می شود که حاوی برخی اطلاعات کلی مانند پلت فرم مشتری است. میتوانید از دادههای شی رویداد برای تنظیم ساخت صفحه اصلی استفاده کنید.
ببین چی میتونی درست کنی
افزونههای Google Workspace با استفاده از Apps Script ساخته میشوند و رابطهای آنها با استفاده از سرویس Apps Script Card تعریف میشوند. برای مرور کلی به ساخت افزونههای Google Workspace مراجعه کنید. رفتار افزونه Google Workspace با استفاده از مانیفست پیکربندی میشود که شامل بخشهای خاص Gmail است.
هنگام پیکربندی افزونه Google Workspace خود برای گسترش Gmail، باید تصمیم بگیرید که چه رابط هایی برای افزونه خود ایجاد کنید و چه اقداماتی می تواند انجام دهد. برای اطلاعات بیشتر به راهنماهای زیر مراجعه کنید:
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-08-29 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eGoogle Workspace add-ons automate tasks within Gmail, saving users time and effort by providing interactive UI elements within emails.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons enhance the Gmail experience by displaying extra information, connecting to external services, and letting users control add-on behavior.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can build custom add-ons with Apps Script and the Card service to extend Gmail's functionality on both desktop and mobile.\u003c/p\u003e\n"],["\u003cp\u003eGmail add-ons can have homepages, contextual interfaces triggered by opening or composing emails, and the ability to create new drafts automatically.\u003c/p\u003e\n"],["\u003cp\u003eTo learn more about building and configuring Gmail add-ons, explore the provided resources on extending UI, composing messages, manifests, and scopes.\u003c/p\u003e\n"]]],["Google Workspace add-ons automate tasks within Gmail, saving users time. They enable interactive UIs when users read or compose messages, allowing actions like displaying information, connecting to external services, and controlling add-on behavior. Add-ons can create contextual interfaces for messages and compose actions, or automatically generate drafts. Developers can define homepages and other interfaces, customize them with event objects, and use Apps Script to build and configure these add-ons through manifests. They support both desktop and mobile Gmail clients.\n"],null,["# Extending Gmail with Google Workspace add-ons\n\nThe purpose of many emails is to get the recipient to do a specific task or\nreach a goal, such as adding a calendar event, filling out a form, making a\nreservation, or using other applications. However, recipients then have to\ncomplete the task without any further prompting, often doing a number of\nmanual steps.\n\nYou can save time and effort for your users by automating these tasks with\nGoogle Workspace add-ons. When a user reads or composes a message in Gmail,\na Google Workspace add-on can present an interactive, customized UI that lets\nthe user act on the message in various ways, such as by:\n\n- Displaying additional information for the user in the Gmail UI.\n- Connecting to non-Google services, to retrieve information or take other actions.\n- Providing the means to control the add-on behavior or send information to another service.\n\n| **Note:** You can also [develop your own chatbots](/hangouts/chat) to enhance the Gmail experience.\n\nGoogle Workspace add-ons can define the following kinds of extensions within\nGmail:\n\n- [Homepages](/workspace/add-ons/concepts/homepages) and other non-contextual cards.\n- Contextual interfaces that appear when users [open Gmail messages](/workspace/add-ons/gmail/extending-message-ui).\n- Contextual interfaces that appear when a user [composes a message or reply](/workspace/add-ons/gmail/extending-compose-ui).\n- Automatically [create new message drafts](/workspace/add-ons/gmail/compose) in response to user interactions.\n\nIn addition, Google Workspace add-ons that extend Gmail do so on both desktop and mobile\nclients.\n\nGmail homepages\n---------------\n\nGmail supports displaying Google Workspace add-on\n[homepages](/workspace/add-ons/concepts/homepages).\nTo show your add-on's common homepage in Gmail simply make sure there\nis a [`addOns.gmail`](/apps-script/manifest/addons#AddOns.FIELDS.gmail)\nfield in the add-on's manifest.\n\nAlternatively, add a\n[`gmail.homepageTrigger`](/apps-script/manifest/gmail-addons#Gmail.FIELDS.homepageTrigger)\nto the add-on manifest to provide a Gmail-specific homepage.\n\nIn either case, you must provide the name of a homepage trigger function in your\nadd-on's script project. This function is automatically called to build the\nGmail homepage when it is needed. You must implement this function to build\nand return a single\n[`Card`](/apps-script/reference/card-service/card) or an array of\n[`Card`](/apps-script/reference/card-service/card)\nobjects that make up the homepage. The homepage trigger function is passed an\n[event object](/workspace/add-ons/concepts/event-objects)\nas a parameter that contains some general information such as the client's\nplatform. You can use the event object data to tailor the construction of the\nhomepage.\n\nSee what you can make\n---------------------\n\nGoogle Workspace add-ons are built using [Apps Script](/apps-script), and their\ninterfaces defined using the Apps Script\n[Card service](/apps-script/reference/card-service). See\n[Building Google Workspace add-ons](/workspace/add-ons/how-tos/building-workspace-addons)\nfor an overview. Google Workspace add-on behavior is configured using a\n[manifest](/workspace/add-ons/concepts/workspace-manifests), which includes\nGmail-specific sections.\n\nWhen configuring your Google Workspace add-on to extend Gmail, you must\ndecide what interfaces to create for your add-on and what actions it can take.\nSee the following guides for more information:\n\n- [Extending the message UI](/workspace/add-ons/gmail/extending-message-ui)\n- [Extending the compose UI with compose actions](/workspace/add-ons/gmail/extending-compose-ui)\n- [Compose draft messages](/workspace/add-ons/gmail/compose)\n- [Manifests](/workspace/add-ons/concepts/workspace-manifests)\n- [Gmail scopes](/workspace/add-ons/concepts/workspace-scopes#gmail_add-on_scopes)\n- Try a sample: [Analyze and label Gmail messages with Gemini and Vertex AI](/workspace/add-ons/samples/gmail-sentiment-analysis-ai)"]]