Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROBLEM&UPDATE FEATURE] Gmail getMetadata does not support and update feature for modify mail labels #1575

Open
chanwookpark opened this issue Nov 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@chanwookpark
Copy link

Hello,
I'm following @alwestmo-openai 's Gmail action cookbook to study and appreciate the work. Thank you!

Describe the problem
After testing, I found that the getEmailMetadata action is no longer supported by the Gmail API, which causes a 404 error when querying emails in the prompt.

Describe a solution
When I remove getEmailMetadata and run the action, it works well with readEmail.
So, I would like to ask if we need to remove the getEmailMetadata related parts from the schema.

Request to Add feature
Additionally, I’ve added a schema to change email labels as shown below. I’ve created it to check emails and mark them as read, and I thought it might be a good idea to add it to the cookbook.
If you think adding it to the cookbook would be useful, I will submit a PR.

openapi: 3.1.0
info:
  title: Gmail Email API
  version: 1.0.0
  description: API to read, write, and send emails in a Gmail account.
servers:
  - url: https://gmail.googleapis.com
paths:
  …
  /gmail/v1/users/{userId}/messages/{id}/modify:
    post:
      summary: Modify label
      description: Modify label of email.
      operationId: modifyLabels
      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 change labels.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Label'
      responses:
        '200':
          description: Modify label success successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Message'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Internal Server Error       
components:
  schemas:
    Label:
      type: object
      properties:
        addLabelIds:
          type: array
          items:
            type: string
        removeLabelIds:
          type: array
          items:
            type: string
…

Thanks! :)

@chanwookpark chanwookpark added the bug Something isn't working label Nov 25, 2024
@alwestmo-openai
Copy link
Contributor

alwestmo-openai commented Nov 25, 2024 via email

@chanwookpark
Copy link
Author

hi, @alwestmo-openai .
I send PR for review. Thanks your supports !

@alwestmo-openai
Copy link
Contributor

alwestmo-openai commented Dec 2, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants