تنظيم صفحاتك في مجموعات يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تتيح الإجراءات بنقرة واحدة للمستخدمين تنفيذ عمليات مباشرةً من البريد الوارد بدون الحاجة إلى مغادرة Gmail. يتم تنفيذ الإجراءات بنقرة واحدة من خلال تعريف HttpActionHandler باستخدام عنوان URL الخاص بالخدمة. لمزيد من التفاصيل، يُرجى الرجوع إلى التعامل مع طلبات الإجراءات.
إجراءات بنقرة واحدة في Gmail
حالات الاستخدام
الإجراءات التي يمكن تنفيذها بنقرة واحدة والمتوفّرة حاليًا في Gmail هي:
يمكنك إضافة زر تأكيد بنقرة واحدة إلى الرسائل الإلكترونية التي تتطلّب من المستخدمين الموافقة على شيء ما أو تأكيده أو الإقرار به. بعد أن ينقر المستخدم على الزر، سيتم إرسال طلب http من Google إلى خدمتك لتسجيل التأكيد. لا يمكن التفاعل مع ConfirmAction إلا مرة واحدة.
يضيف البيان التالي زر ConfirmAction إلى رسالة إلكترونية حول تقرير نفقات:
JSON-LD
<scripttype="application/ld+json"> {"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ConfirmAction","name":"Approve Expense","handler":{"@type":"HttpActionHandler","url":"https://myexpenses.com/approve?expenseId=abc123"}},"description":"Approval request for John's $10.13 expense for office supplies"} </script>
البيانات الجزئية
<divitemscopeitemtype="http://schema.org/EmailMessage"> <divitemprop="potentialAction"itemscopeitemtype="http://schema.org/ConfirmAction"> <metaitemprop="name"content="Approve Expense"/> <divitemprop="handler"itemscopeitemtype="http://schema.org/HttpActionHandler"> <linkitemprop="url"href="https://myexpenses.com/approve?expenseId=abc123"/> </div> </div> <metaitemprop="description"content="Approval request for John's $10.13 expense for office supplies"/> </div>
حفظ الإجراء
يمكن استخدام SaveAction لوصف التفاعلات، مثل حفظ قسيمة أو إضافة أغانٍ إلى قائمة الاستماع. لا يمكن التفاعل مع SaveAction إلا مرة واحدة.
يضيف البيان التالي زر SaveAction إلى رسالة إلكترونية حول عرض ترويجي:
JSON-LD
<scripttype="application/ld+json"> {"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"SaveAction","name":"Save Offer","handler":{"@type":"HttpActionHandler","url":"https://offers-everywhere.com/save?offerId=xyz789"}},"description":"$5 meal at Joe's Diner"} </script>
يمكنك التحقّق من صحة الترميز باستخدام أداة اختبار ترميز البريد الإلكتروني. الصِق رمز الترميز وانقر على الزر التحقّق لفحص المحتوى وتلقّي تقرير عن أي أخطاء.
المواصفات
للاطّلاع على السمات المتاحة لهذه الإجراءات، يُرجى الرجوع إلى المستندات الخاصة بالنوعَين ConfirmAction وSaveAction.
تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","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-08-04 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["One-click actions allow users to perform operations directly from the inbox without having to leave Gmail. One-click actions are performed by declaring an `HttpActionHandler` with your service URL. For more details, refer to [Handling Action Requests](../actions/handling-action-requests).\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nOne-click actions in Gmail.\n\n\u003cbr /\u003e\n\nUse Cases\n\nOne Click actions currently supported in Gmail are:\n\n- [ConfirmAction](#confirm_action)\n- [SaveAction](#save_action)\n\n| **Note:** Before you start, make sure you understand how to [embed schemas in emails](/workspace/gmail/markup/embedding-schemas-in-emails) and you are familiar with [testing schemas](/workspace/gmail/markup/testing-your-schema).\n\nConfirm Action\n\nYou may add a one-click confirm button to emails requiring users to approve, confirm and acknowledge something. Once the user clicks on the button, an http request will be issued from Google to your service, recording the confirmation. `ConfirmAction` can only be interacted with **once**.\n\nThe following declaration adds a `ConfirmAction` button to an email about an expense report: \n\nJSON-LD \n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"potentialAction\": {\n \"@type\": \"ConfirmAction\",\n \"name\": \"Approve Expense\",\n \"handler\": {\n \"@type\": \"HttpActionHandler\",\n \"url\": \"https://myexpenses.com/approve?expenseId=abc123\"\n }\n },\n \"description\": \"Approval request for John's $10.13 expense for office supplies\"\n }\n \u003c/script\u003e\n\nMicrodata \n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/ConfirmAction\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Approve Expense\"/\u003e\n \u003cdiv itemprop=\"handler\" itemscope itemtype=\"http://schema.org/HttpActionHandler\"\u003e\n \u003clink itemprop=\"url\" href=\"https://myexpenses.com/approve?expenseId=abc123\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"description\" content=\"Approval request for John's $10.13 expense for office supplies\"/\u003e\n \u003c/div\u003e\n\nSave Action\n\n`SaveAction` can be used to describe interactions like saving a coupon or adding songs to the listen queue. `SaveAction` can only be interacted with **once**.\n\nThe following declaration adds a `SaveAction` button to an email about an offer: \n\nJSON-LD \n\n \u003cscript type=\"application/ld+json\"\u003e\n {\n \"@context\": \"http://schema.org\",\n \"@type\": \"EmailMessage\",\n \"potentialAction\": {\n \"@type\": \"SaveAction\",\n \"name\": \"Save Offer\",\n \"handler\": {\n \"@type\": \"HttpActionHandler\",\n \"url\": \"https://offers-everywhere.com/save?offerId=xyz789\"\n }\n },\n \"description\": \"$5 meal at Joe's Diner\"\n }\n \u003c/script\u003e\n\nMicrodata \n\n \u003cdiv itemscope itemtype=\"http://schema.org/EmailMessage\"\u003e\n \u003cdiv itemprop=\"potentialAction\" itemscope itemtype=\"http://schema.org/SaveAction\"\u003e\n \u003cmeta itemprop=\"name\" content=\"Save Offer\"/\u003e\n \u003cdiv itemprop=\"handler\" itemscope itemtype=\"http://schema.org/HttpActionHandler\"\u003e\n \u003clink itemprop=\"url\" href=\"https://offers-everywhere.com/save?offerId=xyz789\"/\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cmeta itemprop=\"description\" content=\"$5 meal at Joe's Diner\"/\u003e\n \u003c/div\u003e\n\nTest your markup\n\nYou can validate your markup using the [Email Markup Tester Tool](https://www.google.com/webmasters/markup-tester/). Paste in your markup code and click the **Validate** button to scan the content and receive a report on any errors present.\n\nSpecification\n\nFor properties available to these actions, refer to the documentation for the\nspecific types [ConfirmAction](/workspace/gmail/markup/reference/types/ConfirmAction) and\n[SaveAction](/workspace/gmail/markup/reference/types/SaveAction).\n| **Note:** Some of the schemas used by Google are still going through the standardization process of [schema.org](http://schema.org), and therefore, may change in the future. [Learn More](/workspace/gmail/markup/reference/schema-org-proposals)."]]