تخطَّ إلى المستندات
خادم MCP

المسوّدات

رسائل غير مُرسَلة محفوظة في صندوق البريد.

أدوات المسوّدات

الأداةما تفعله
listDraftsالمسوّدات، الأحدث حفظًا أولًا، لكلٍّ منها موضوعها ومستلموها ومُرسِلها. ويبحث فيها query.
getDraftمسوّدة واحدة كاملة: مُرسِلها ومستلموها وموضوعها والمحادثة التي تردّ عليها ومرفقاتها ومتنها.
createDraftاحفظ مسوّدة جديدة دون إرسالها. كل حقل اختياري، وthreadId يجعلها ردًّا.
updateDraftغيّر حقولًا في مسوّدة. الحقل الذي تتركه يحتفظ بقيمته، والقائمة تحلّ محلّ القائمة المحفوظة بأكملها.
deleteDraftاحذف مسوّدة نهائيًا. ولا تذهب إلى سلة المهملات.

تتطلب القراءة «قراءة المسودات» (drafts:read)، ويتطلب الحفظ أو التغيير أو الحذف «إنشاء المسودات وتعديلها» (drafts:write). والعميل المقصور على بعض العناوين لا يرى إلا المسوّدات الصادرة منها، والمسوّدة التي يحفظها تحتاج إلى from يحق له الإرسال باسمه.

في محادثة التطبيق، تسأل عمليات حفظ المسوّدة وتغييرها وحذفها أولًا ما لم تطلبها أنت.

المرجع

listDrafts

الصلاحياتdrafts:readينفّذه مساعد التطبيق دون أن يسألمجموعة الأدواتdrafts

The unsent drafts in the mailbox, most recently saved first, each with its id, subject, recipients and sender. query searches the subject, the sender and the start of the body. When more follow, the last line gives a pageToken: call again with the same query and that pageToken.

المدخلات

querystring
limitinteger
على الأقل 1على الأكثر 100
pageTokenstring

متاح أيضًا في

API
GET /drafts
SDK
drafts.list()drafts.listAll()drafts.iterate()

getDraft

الصلاحياتdrafts:readينفّذه مساعد التطبيق دون أن يسألمجموعة الأدواتdrafts

One draft in full: its sender, recipients, subject, the thread it replies to, the names of its attachments and its body as saved. Take the id from listDrafts.

المدخلات

draftIdstringمطلوب
غير فارغ

متاح أيضًا في

API
GET /drafts/{id}
SDK
drafts.get()

createDraft

الصلاحياتdrafts:writeيسأل مساعد التطبيق أولًا ما لم تكن قد طلبت ذلكمجموعة الأدواتdrafts

Save a new draft without sending it, as the composer does when you close it. Every field is optional, and html wins over text when both are given. from is the address it will be sent as, and threadId makes it a reply to that thread. sendEmail with the draft id sends it later.

المدخلات

tostring[]
ccstring[]
bccstring[]
subjectstring
حتى 998 من الأحرف
htmlstring
حتى 1000000 من الأحرف
textstring
حتى 1000000 من الأحرف
fromstring
threadIdstring

متاح أيضًا في

API
PATCH /drafts/{id}POST /drafts
SDK
drafts.update()drafts.create()

updateDraft

الصلاحياتdrafts:writeيسأل مساعد التطبيق أولًا ما لم تكن قد طلبت ذلكمجموعة الأدواتdrafts

Change fields on a saved draft. A field you leave out keeps its value, and a list you give replaces the saved one whole, so to with one address drops the others. from null clears the sender. Take the id from listDrafts.

المدخلات

draftIdstringمطلوب
غير فارغ
tostring[]
ccstring[]
bccstring[]
subjectstring
حتى 998 من الأحرف
htmlstring
حتى 1000000 من الأحرف
textstring
حتى 1000000 من الأحرف
fromstring
يمكن أن يكون null
threadIdstring

متاح أيضًا في

API
PATCH /drafts/{id}POST /drafts
SDK
drafts.update()drafts.create()

deleteDraft

الصلاحياتdrafts:writeيسأل مساعد التطبيق أولًا ما لم تكن قد طلبت ذلكمجموعة الأدواتdrafts

Delete a draft for good. It does not go to the Bin and cannot be brought back. Take the id from listDrafts.

المدخلات

draftIdstringمطلوب
غير فارغ

متاح أيضًا في

API
DELETE /drafts/{id}
SDK
drafts.delete()