Email: Draft Tool
Usage
All Portia tools using API endpoints that require OAuth are built with plug and play authentication support. They use Portia client credentials including client ID, client name and redirect URL. Such tools will raise a Action Clarification
with an OAuth link as the action URL. The portia.wait_for_ready()
method must be used in this scenario: Portia's OAuth server will listen for the authentication result and resolve the concerned clarification, allowing your plan run to resume again.
For more on this, please visit to the section on running Portia tools (↗).
Tool details
Tool ID: portia:google:gmail:draft_email
Tool description: Drafts an email for the recipients indicated. Should not be used with the send email tool.Instead to send a draft email use the send_draft_email_tool.
Args schema:
{
"description": "Input for DraftEmailTool.",
"properties": {
"recipients": {
"description": "The recipients that the email should be drafted for (should be a list of email addresses)",
"items": {
"type": "string"
},
"title": "Recipients",
"type": "array"
},
"email_title": {
"description": "The title of the email draft",
"title": "Email Title",
"type": "string"
},
"email_body": {
"description": "The body of the email draft",
"title": "Email Body",
"type": "string"
}
},
"required": [
"recipients",
"email_title",
"email_body"
],
"title": "DraftEmailToolSchema",
"type": "object"
}
Output schema:
('dict', 'dict: Output of the email drafted')