What Does 'Project_number' Refer to in a Google Drive API Workflow Failure Due to Exceeded Query Quota?

This topic was automatically generated from Slack. You can find the original thread here.

I had a workflow fail with Quota exceeded for quota metric 'Queries' and limit 'Queries per minute' of service '[drive.googleapis.com](http://drive.googleapis.com)' for consumer 'project_number:342853642011'. for a nodejs step that uses the google drive API. Is that project_number specific to my one step, account, workflow, or all of pipedream? My step is only making at most two client calls to the google drive API.

cc

Hi Nicholas, looking into this.

Can you confirm specifically which API you are calling? I’m trying to narrow down the source of the quota issue on my end.

just client.files.list() and client.files.create() — here’s an excerpt of the relevant bits of code:

import { drive } from "@googleapis/drive";

const client = drive({
  version: 'v3',
});

export default defineComponent({
  props: {
    google_drive: {
      type: "app",
      app: "google_drive",
    }
  },
  async run({steps, $}) {
    const common_params = {
      corpora: 'user',
      oauth_token: this.google_drive.$auth.oauth_access_token,
    };

    async function get_subfolders (parent_id) {
      return await client.files.list({
        q: `'${parent_id}' in parents and mimeType = 'application/vnd.google-apps.folder' and trashed = false`,
        ...common_params
      });
    }

    async function create_subfolder (parent_folder, folder_name) {
      return await client.files.create({
        resource: {
          name: folder_name,
          parents: [ parent_folder ],
          mimeType: 'application/vnd.google-apps.folder'
        },
        fields: 'id',
        ...common_params
      });
    }
  },
})

Thanks for sharing – I’ve reached out to the Google team to request an increase for our quotas. Will keep you posted on this thread.

BTW I got this error on June 2 — just hadn’t had a chance to triage until now.

Ah, thanks for the context Nicholas – we actually got our quota increased last week, so that makes a lot more sense now. Let me know if you still run into this moving forward, and I’ll work to ensure that we can have enough headroom with Google as well.

Cool, thanks. So the answer to my original question was: “all of Pipedream” :slightly_smiling_face: