Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 97 additions & 26 deletions examples/chatgpt/gpt_actions_library/gpt_action_gmail.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,15 @@
"outputs": [],
"source": [
"openapi: 3.1.0\n",
"\n",
"info:\n",
" title: Gmail Email API\n",
" version: 1.0.0\n",
" description: API to read, write, and send emails in a Gmail account.\n",
"\n",
"servers:\n",
" - url: https://gmail.googleapis.com\n",
"\n",
"paths:\n",
" /gmail/v1/users/{userId}/messages:\n",
" get:\n",
Expand Down Expand Up @@ -197,6 +200,7 @@
" in: query\n",
" schema:\n",
" type: integer\n",
" format: int32\n",
" description: Maximum number of messages to return.\n",
" responses:\n",
" '200':\n",
Expand All @@ -215,6 +219,7 @@
" description: Not Found\n",
" '500':\n",
" description: Internal Server Error\n",
"\n",
" /gmail/v1/users/{userId}/messages/send:\n",
" post:\n",
" summary: Send Email\n",
Expand Down Expand Up @@ -248,6 +253,7 @@
" description: Forbidden\n",
" '500':\n",
" description: Internal Server Error\n",
"\n",
" /gmail/v1/users/{userId}/messages/{id}:\n",
" get:\n",
" summary: Read Email\n",
Expand Down Expand Up @@ -283,11 +289,12 @@
" description: Not Found\n",
" '500':\n",
" description: Internal Server Error\n",
" /gmail/v1/users/{userId}/messages/{id}/metadata:\n",
" get:\n",
" summary: Get Email Metadata\n",
" description: Gets the metadata of an email, including subject line.\n",
" operationId: getEmailMetadata\n",
"\n",
" /gmail/v1/users/{userId}/messages/{id}/modify:\n",
" post:\n",
" summary: Modify Label\n",
" description: Modify labels of an email.\n",
" operationId: modifyLabels\n",
" parameters:\n",
" - name: userId\n",
" in: path\n",
Expand All @@ -300,24 +307,29 @@
" required: true\n",
" schema:\n",
" type: string\n",
" description: The ID of the email to retrieve metadata for.\n",
" description: The ID of the email to change labels.\n",
" requestBody:\n",
" required: true\n",
" content:\n",
" application/json:\n",
" schema:\n",
" $ref: '#/components/schemas/LabelModification'\n",
" responses:\n",
" '200':\n",
" description: Successful response\n",
" description: Labels modified successfully\n",
" content:\n",
" application/json:\n",
" schema:\n",
" $ref: '#/components/schemas/MessageMetadata'\n",
" $ref: '#/components/schemas/Message'\n",
" '400':\n",
" description: Bad Request\n",
" '401':\n",
" description: Unauthorized\n",
" '403':\n",
" description: Forbidden\n",
" '404':\n",
" description: Not Found\n",
" '500':\n",
" description: Internal Server Error\n",
"\n",
" /gmail/v1/users/{userId}/drafts:\n",
" post:\n",
" summary: Create Draft\n",
Expand Down Expand Up @@ -351,6 +363,41 @@
" description: Forbidden\n",
" '500':\n",
" description: Internal Server Error\n",
"\n",
" /gmail/v1/users/{userId}/drafts/send:\n",
" post:\n",
" summary: Send Draft\n",
" description: Sends an existing email draft.\n",
" operationId: sendDraft\n",
" parameters:\n",
" - name: userId\n",
" in: path\n",
" required: true\n",
" schema:\n",
" type: string\n",
" description: The user's email address. Use \"me\" to indicate the authenticated user.\n",
" requestBody:\n",
" required: true\n",
" content:\n",
" application/json:\n",
" schema:\n",
" $ref: '#/components/schemas/SendDraftRequest'\n",
" responses:\n",
" '200':\n",
" description: Draft sent successfully\n",
" content:\n",
" application/json:\n",
" schema:\n",
" $ref: '#/components/schemas/Message'\n",
" '400':\n",
" description: Bad Request\n",
" '401':\n",
" description: Unauthorized\n",
" '403':\n",
" description: Forbidden\n",
" '500':\n",
" description: Internal Server Error\n",
"\n",
"components:\n",
" schemas:\n",
" MessageList:\n",
Expand All @@ -362,6 +409,7 @@
" $ref: '#/components/schemas/Message'\n",
" nextPageToken:\n",
" type: string\n",
"\n",
" Message:\n",
" type: object\n",
" properties:\n",
Expand All @@ -373,12 +421,21 @@
" type: array\n",
" items:\n",
" type: string\n",
" addLabelIds:\n",
" type: array\n",
" items:\n",
" type: string\n",
" removeLabelIds:\n",
" type: array\n",
" items:\n",
" type: string\n",
" snippet:\n",
" type: string\n",
" raw:\n",
" type: string\n",
" format: byte\n",
" description: The entire email message in an RFC 2822 formatted and base64url encoded string.\n",
"\n",
" FullMessage:\n",
" type: object\n",
" properties:\n",
Expand Down Expand Up @@ -416,28 +473,31 @@
" properties:\n",
" data:\n",
" type: string\n",
" MessageMetadata:\n",
"\n",
" LabelModification:\n",
" type: object\n",
" properties:\n",
" id:\n",
" type: string\n",
" threadId:\n",
" type: string\n",
" labelIds:\n",
" addLabelIds:\n",
" type: array\n",
" items:\n",
" type: string\n",
" snippet:\n",
" type: string\n",
" headers:\n",
" removeLabelIds:\n",
" type: array\n",
" items:\n",
" type: string\n",
"\n",
" Label:\n",
" type: object\n",
" properties:\n",
" addLabelIds:\n",
" type: array\n",
" items:\n",
" type: string\n",
" removeLabelIds:\n",
" type: array\n",
" items:\n",
" type: object\n",
" properties:\n",
" name:\n",
" type: string\n",
" value:\n",
" type: string\n",
" type: string\n",
"\n",
" EmailDraft:\n",
" type: object\n",
" properties:\n",
Expand All @@ -463,13 +523,24 @@
" enum: [text/plain, text/html]\n",
" content:\n",
" type: string\n",
"\n",
" Draft:\n",
" type: object\n",
" properties:\n",
" id:\n",
" type: string\n",
" message:\n",
" $ref: '#/components/schemas/Message'"
" $ref: '#/components/schemas/Message'\n",
"\n",
" SendDraftRequest:\n",
" type: object\n",
" properties:\n",
" draftId:\n",
" type: string\n",
" description: The ID of the draft to send.\n",
" userId:\n",
" type: string\n",
" description: The user's email address. Use \"me\" to indicate the authenticated user."
]
},
{
Expand Down