Saltar para a documentação
Servidor MCP

Rascunhos

Mensagens por enviar guardadas na caixa de correio.

Ferramentas de rascunhos

FerramentaO que faz
listDraftsOs rascunhos, primeiro os guardados mais recentemente, cada um com o assunto, os destinatários e o remetente. query pesquisa-os.
getDraftUm rascunho completo: o remetente, os destinatários, o assunto, a conversa a que responde, os anexos e o corpo.
createDraftGuardar um rascunho novo sem o enviar. Todos os campos são opcionais, e threadId torna-o uma resposta.
updateDraftAlterar campos de um rascunho. Um campo que omitir mantém o valor, e uma lista substitui por inteiro a guardada.
deleteDraftEliminar um rascunho de vez. Não vai para o Lixo.

Ler exige «Read drafts» (drafts:read), e guardar, alterar ou eliminar exige «Create and edit drafts» (drafts:write). Um cliente limitado a alguns endereços só vê os rascunhos desses endereços, e um rascunho que guarde precisa de um from com que possa enviar.

No chat da aplicação, guardar, alterar e eliminar um rascunho pergunta primeiro, a menos que o tenha pedido.

Referência

listDrafts

Âmbitosdrafts:readO assistente da app executa-o sem perguntarConjunto de ferramentasdrafts

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.

Entradas

querystring
limitinteger
Pelo menos 1No máximo 100
pageTokenstring

Também disponível em

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

getDraft

Âmbitosdrafts:readO assistente da app executa-o sem perguntarConjunto de ferramentasdrafts

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.

Entradas

draftIdstringObrigatório
Não vazio

Também disponível em

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

createDraft

Âmbitosdrafts:writeO assistente da app pergunta primeiro, a menos que o tenha pedidoConjunto de ferramentasdrafts

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.

Entradas

tostring[]
ccstring[]
bccstring[]
subjectstring
Até 998 caracteres
htmlstring
Até 1000000 caracteres
textstring
Até 1000000 caracteres
fromstring
threadIdstring

Também disponível em

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

updateDraft

Âmbitosdrafts:writeO assistente da app pergunta primeiro, a menos que o tenha pedidoConjunto de ferramentasdrafts

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.

Entradas

draftIdstringObrigatório
Não vazio
tostring[]
ccstring[]
bccstring[]
subjectstring
Até 998 caracteres
htmlstring
Até 1000000 caracteres
textstring
Até 1000000 caracteres
fromstring
Pode ser null
threadIdstring

Também disponível em

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

deleteDraft

Âmbitosdrafts:writeO assistente da app pergunta primeiro, a menos que o tenha pedidoConjunto de ferramentasdrafts

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

Entradas

draftIdstringObrigatório
Não vazio

Também disponível em

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