Email AI GPT: MixerBox ChatEmail

Email AI GPT: MixerBox ChatEmail · Actions GPT

MixerBox ChatEmail

This plugin enables users to efficiently get information from Gmail inbox.

  • GET /api/gpt_plugins/email/authorizeAuthorize the user's Google account permissions to access his/her inbox.

    This api allow you to launch request for authorizing Google account permissions. A url will be returned, please ask the user to visit the url to continue.

  • GET /api/gpt_plugins/email/logoutLog out the user's Google account.

    This api allow you to log out from a Google account, so that the user can log in to another one.

  • GET /api/gpt_plugins/email/listList emails from the user's Gmail inbox.

    This api allow you to fetch emails from user's Gmail inbox.

  • GET /api/gpt_plugins/email/read/{id}Read an email by an ID from the user's Gmail inbox.

    This api allow you to read an email by ID from the user's Gmail inbox.

  • POST /api/gpt_plugins/email/draftCreate a draft that will be sent to reply to a thread ID by user's input.

    When a user wants to reply to an email, this api allow you to create a draft first so the user can determine when to send the email.

  • PUT /api/gpt_plugins/email/draft/{id}Update a draft that will be sent to reply to a thread ID by user's input.

    This api allow you to update a draft email by draft ID from the user's Gmail inbox. Note that this API can only update drafts created from the same conversation ID.

  • POST /api/gpt_plugins/email/draft/{id}Send a draft email by a draft ID from the user's Gmail inbox.

    This api allow you to send a draft email by draft ID from the user's Gmail inbox. Note that this API can only send drafts created from the same conversation ID.

  • DELETE /api/gpt_plugins/email/draft/{id}Delete a draft email by a draft ID from the user's Gmail inbox.

    This api allow you to delete a draft email by draft ID from the user's Gmail inbox. Note that this API can only delete drafts created from the same conversation ID.

Schéma original API
{
  "openapi": "3.1.0",
  "info": {
    "title": "MixerBox ChatEmail",
    "description": "This plugin enables users to efficiently get information from Gmail inbox.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://chatemail.mixerbox.com"
    }
  ],
  "paths": {
    "/api/gpt_plugins/email/authorize": {
      "get": {
        "operationId": "Authorize",
        "summary": "Authorize the user's Google account permissions to access his/her inbox.",
        "description": "This api allow you to launch request for authorizing Google account permissions. A url will be returned, please ask the user to visit the url to continue.",
        "parameters": [
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthorizeResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/email/logout": {
      "get": {
        "operationId": "Logout",
        "summary": "Log out the user's Google account.",
        "description": "This api allow you to log out from a Google account, so that the user can log in to another one.",
        "parameters": [
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LogoutResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/email/list": {
      "get": {
        "operationId": "ListEmail",
        "summary": "List emails from the user's Gmail inbox.",
        "description": "This api allow you to fetch emails from user's Gmail inbox.",
        "parameters": [
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          },
          {
            "in": "query",
            "name": "labelIds",
            "schema": {
              "type": "string",
              "default": "INBOX"
            },
            "example": "INBOX,UNREAD",
            "description": "To filter emails by labels, please join each labels with a comma. Valid labels are: 'INBOX', 'SPAM', 'TRASH', 'UNREAD', 'STARRED', 'IMPORTANT', 'SENT', 'DRAFT', 'CATEGORY_PERSONAL', 'CATEGORY_SOCIAL', 'CATEGORY_PROMOTIONS', 'CATEGORY_UPDATES', 'CATEGORY_FORUMS'",
            "required": false
          },
          {
            "in": "query",
            "name": "pageToken",
            "schema": {
              "type": "string"
            },
            "description": "To fetch data from the next page, provide the 'nextPageToken' from the response of this API.",
            "required": false
          },
          {
            "in": "query",
            "name": "q",
            "schema": {
              "type": "string"
            },
            "description": "Search query, to search emails by this keyword.",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListEmailResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/email/read/{id}": {
      "get": {
        "operationId": "ReadEmailByID",
        "summary": "Read an email by an ID from the user's Gmail inbox.",
        "description": "This api allow you to read an email by ID from the user's Gmail inbox.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the email to read.",
            "required": true
          },
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReadEmailResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/email/draft": {
      "post": {
        "operationId": "CreateDraftWithThreadID",
        "summary": "Create a draft that will be sent to reply to a thread ID by user's input.",
        "description": "When a user wants to reply to an email, this api allow you to create a draft first so the user can determine when to send the email.",
        "parameters": [
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDraftRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateDraftResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/gpt_plugins/email/draft/{id}": {
      "put": {
        "operationId": "UpdateDraft",
        "summary": "Update a draft that will be sent to reply to a thread ID by user's input.",
        "description": "This api allow you to update a draft email by draft ID from the user's Gmail inbox. Note that this API can only update drafts created from the same conversation ID.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the draft to update.",
            "required": true
          },
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDraftRequestSchema"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateDraftResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "SendEmailByDraftID",
        "summary": "Send a draft email by a draft ID from the user's Gmail inbox.",
        "description": "This api allow you to send a draft email by draft ID from the user's Gmail inbox. Note that this API can only send drafts created from the same conversation ID.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the draft to sent.",
            "required": true
          },
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendDraftResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "DeleteDraft",
        "summary": "Delete a draft email by a draft ID from the user's Gmail inbox.",
        "description": "This api allow you to delete a draft email by draft ID from the user's Gmail inbox. Note that this API can only delete drafts created from the same conversation ID.",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "description": "The ID of the draft to delete.",
            "required": true
          },
          {
            "in": "query",
            "name": "src",
            "schema": {
              "type": "string",
              "default": "google",
              "enum": [
                "google"
              ]
            },
            "description": "The source of the email inbox. If the user asks for an invalid source, tell the user that this is not supported.",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteDraftResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UpdateDraftRequestSchema": {
        "type": "object",
        "required": [
          "threadId",
          "to",
          "cc",
          "subject",
          "html",
          "text"
        ],
        "properties": {
          "threadId": {
            "type": "string",
            "description": "The thread ID that this draft is going to reply to."
          },
          "to": {
            "type": "string",
            "description": "The email addresses to reply to."
          },
          "cc": {
            "type": "string",
            "description": "The email addresses to send a carbon copy, pass an empty string if none. If the user does not provide any address, ask the user if this is needed."
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email, If the user does not provide any subject, ask the user if they want customize it."
          },
          "html": {
            "type": "string",
            "description": "The HTML in the body of the email, pass as same as 'text' if not specified."
          },
          "text": {
            "type": "string",
            "description": "The plain text in the body of the email."
          }
        }
      },
      "CreateDraftRequestSchema": {
        "type": "object",
        "required": [
          "threadId",
          "to",
          "cc",
          "subject",
          "html",
          "text"
        ],
        "properties": {
          "threadId": {
            "type": "string",
            "description": "The thread ID that this draft is going to reply to."
          },
          "to": {
            "type": "string",
            "description": "The email addresses to reply to."
          },
          "cc": {
            "type": "string",
            "description": "The email addresses to send a carbon copy, pass an empty string if none. If the user does not provide any address, ask the user if this is needed."
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email, If the user does not provide any subject, ask the user if they want customize it."
          },
          "html": {
            "type": "string",
            "description": "The HTML in the body of the email, pass as same as 'text' if not specified."
          },
          "text": {
            "type": "string",
            "description": "The plain text in the body of the email."
          }
        }
      },
      "AuthorizeResponse": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "The url to authorize Google account permissions."
          }
        }
      },
      "LogoutResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The result of logout."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "ListEmailResponse": {
        "type": "object",
        "properties": {
          "items": {
            "title": "Search results.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ListEmailItem"
            },
            "description": "The search results from the Gmail inbox."
          },
          "nextPageToken": {
            "title": "The 'pageToken' for the next page.",
            "type": "string",
            "description": "Provide this as 'nextPageToken' to fetch the next page."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "ListEmailItem": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "The date of the email"
          },
          "from": {
            "type": "string",
            "description": "The sender of the email"
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The label IDs of the email"
          },
          "reply-to": {
            "type": "string",
            "description": "If the email is replied, this is the address to reply to."
          },
          "snippet": {
            "type": "string",
            "description": "The snippet of the email"
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email"
          },
          "to": {
            "type": "string",
            "description": "The receiver of the email"
          }
        }
      },
      "ReadEmailResponse": {
        "type": "object",
        "properties": {
          "items": {
            "title": "Search results.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadEmailItem"
            },
            "description": "The search results from the Gmail inbox."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "ReadEmailItem": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "The date of the email"
          },
          "from": {
            "type": "string",
            "description": "The sender of the email"
          },
          "labelIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The label IDs of the email"
          },
          "snippet": {
            "type": "string",
            "description": "The snippet of the email"
          },
          "subject": {
            "type": "string",
            "description": "The subject of the email"
          },
          "attachments": {
            "type": "object",
            "description": "The attachments of the email."
          },
          "textHtml": {
            "type": "string",
            "description": "The HTML in the body of the email."
          },
          "textPlain": {
            "type": "string",
            "description": "The plain text in the body of the email."
          }
        }
      },
      "CreateDraftResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The id of created draft, use this to update/send the draft."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "UpdateDraftResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The updating result."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "SendDraftResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The sending result."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      },
      "DeleteDraftResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The deleting result."
          },
          "rules": {
            "title": "The array of rules which recommend gpt to follow.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "The array of rules which recommend gpt to follow."
          }
        }
      }
    }
  }
}