Business Strategy|Finance|Consultant|Plan||Manage
Business Strategy|Finance|Consultant|Plan||Manage · GPT アクション
Gmail and Google Calendar API
Combined API to manage emails and calendar events in Google services.
GET /gmail/v1/users/{userId}/messagesList All EmailsLists all the emails in the user's mailbox.
POST /gmail/v1/users/{userId}/messages/sendSend EmailSends a new email.
GET /gmail/v1/users/{userId}/messages/{id}Read EmailGets the full email content including headers and body.
GET /calendar/v3/calendars/{calendarId}/eventsList EventsLists all events in a specific calendar.
POST /calendar/v3/calendars/{calendarId}/eventsCreate EventCreates a new event in a specified calendar.
GET /calendar/v3/calendars/{calendarId}/events/{eventId}Get EventRetrieves details of a specific event.
PUT /calendar/v3/calendars/{calendarId}/events/{eventId}Update EventUpdates an existing event.
DELETE /calendar/v3/calendars/{calendarId}/events/{eventId}Delete EventDeletes an existing event from a calendar.
元の API スキーマ
{
"openapi": "3.1.0",
"info": {
"title": "Gmail and Google Calendar API",
"description": "Combined API to manage emails and calendar events in Google services.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://www.googleapis.com"
}
],
"paths": {
"/gmail/v1/users/{userId}/messages": {
"get": {
"operationId": "listAllEmails",
"summary": "List All Emails",
"description": "Lists all the emails in the user's mailbox.",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The user's email address. Use 'me' to indicate the authenticated user."
},
{
"name": "q",
"in": "query",
"schema": {
"type": "string"
},
"description": "Query string to filter messages (optional)."
},
{
"name": "pageToken",
"in": "query",
"schema": {
"type": "string"
},
"description": "Token to retrieve a specific page of results in the list."
},
{
"name": "maxResults",
"in": "query",
"schema": {
"type": "integer"
},
"description": "Maximum number of messages to return."
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageList"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/gmail/v1/users/{userId}/messages/send": {
"post": {
"operationId": "sendEmail",
"summary": "Send Email",
"description": "Sends a new email.",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The user's email address. Use 'me' to indicate the authenticated user."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"responses": {
"200": {
"description": "Email sent successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/gmail/v1/users/{userId}/messages/{id}": {
"get": {
"operationId": "readEmail",
"summary": "Read Email",
"description": "Gets the full email content including headers and body.",
"parameters": [
{
"name": "userId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The user's email address. Use 'me' to indicate the authenticated user."
},
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the email to retrieve."
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FullMessage"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/calendar/v3/calendars/{calendarId}/events": {
"get": {
"operationId": "listEvents",
"summary": "List Events",
"description": "Lists all events in a specific calendar.",
"parameters": [
{
"name": "calendarId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the calendar to retrieve events from. Use 'primary' to indicate the primary calendar of the authenticated user."
},
{
"name": "timeMin",
"in": "query",
"schema": {
"type": "string",
"format": "date-time"
},
"description": "Lower bound (inclusive) for an event's start time to filter by."
},
{
"name": "timeMax",
"in": "query",
"schema": {
"type": "string",
"format": "date-time"
},
"description": "Upper bound (exclusive) for an event's end time to filter by."
},
{
"name": "maxResults",
"in": "query",
"schema": {
"type": "integer"
},
"description": "Maximum number of events to return."
}
],
"responses": {
"200": {
"description": "Successful response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EventList"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
},
"post": {
"operationId": "createEvent",
"summary": "Create Event",
"description": "Creates a new event in a specified calendar.",
"parameters": [
{
"name": "calendarId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the calendar to create an event in. Use 'primary' to indicate the primary calendar of the authenticated user."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"responses": {
"200": {
"description": "Event created successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"500": {
"description": "Internal Server Error"
}
}
}
},
"/calendar/v3/calendars/{calendarId}/events/{eventId}": {
"get": {
"operationId": "getEvent",
"summary": "Get Event",
"description": "Retrieves details of a specific event.",
"parameters": [
{
"name": "calendarId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the calendar containing the event."
},
{
"name": "eventId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the event to retrieve."
}
],
"responses": {
"200": {
"description": "Event details retrieved successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
},
"put": {
"operationId": "updateEvent",
"summary": "Update Event",
"description": "Updates an existing event.",
"parameters": [
{
"name": "calendarId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the calendar containing the event."
},
{
"name": "eventId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the event to update."
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"responses": {
"200": {
"description": "Event updated successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Event"
}
}
}
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
},
"delete": {
"operationId": "deleteEvent",
"summary": "Delete Event",
"description": "Deletes an existing event from a calendar.",
"parameters": [
{
"name": "calendarId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the calendar containing the event."
},
{
"name": "eventId",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "The ID of the event to delete."
}
],
"responses": {
"204": {
"description": "Event deleted successfully"
},
"400": {
"description": "Bad Request"
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
},
"404": {
"description": "Not Found"
},
"500": {
"description": "Internal Server Error"
}
}
}
}
},
"components": {
"schemas": {
"MessageList": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
}
},
"nextPageToken": {
"type": "string"
}
}
},
"Message": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"threadId": {
"type": "string"
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
}
},
"snippet": {
"type": "string"
},
"raw": {
"type": "string",
"format": "byte",
"description": "The entire email message in an RFC 2822 formatted and base64url encoded string."
}
}
},
"FullMessage": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"threadId": {
"type": "string"
},
"labelIds": {
"type": "array",
"items": {
"type": "string"
}
},
"snippet": {
"type": "string"
},
"payload": {
"type": "object",
"properties": {
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
"parts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"mimeType": {
"type": "string"
},
"body": {
"type": "object",
"properties": {
"data": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"EventList": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Event"
}
},
"nextPageToken": {
"type": "string"
}
}
},
"Event": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"summary": {
"type": "string"
},
"description": {
"type": "string"
},
"location": {
"type": "string"
},
"start": {
"type": "object",
"properties": {
"dateTime": {
"type": "string",
"format": "date-time"
}
}
},
"end": {
"type": "object",
"properties": {
"dateTime": {
"type": "string",
"format": "date-time"
}
}
},
"attendees": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"type": "string"
}
}
}
}
},
"required": [
"summary",
"start",
"end"
]
}
}
}
}