Skip to content

Instantly share code, notes, and snippets.

@tanaikech
Last active Sep 30, 2020
Embed
What would you like to do?
Drive API got to be able to create Google Apps Script project again

Drive API got to be able to create Google Apps Script project again

I have reported "Drive API cannot create Google Apps Script project no longer". Ref About this, I had reported the future request. Ref Today, I could confirm that the Google Apps Script project of the standalone type got to be able to be created by multipart/form-data using Drive API. This is a good news for me. By this, the following 2 patterns can be used from now.

Pattern 1:

  1. Create new standalone GAS project by Apps Script API.
  2. Put the local script to the created GAS project by updating the project with Apps Script API.
  3. Move the GAS project from the root folder to the specific folder using Drive API.

In this pattern, 3 API calls are required.

Pattern 2:

  1. Create new standalone GAS project by multipart/form-data using Drive API. Ref

In this pattern, the process of pattern 1 can be achieved by only one API call.

I would like to expect this is not the temporal situation.

Added:

As the additional information, in the current stage, I could confirm that the standalone Google Apps Script can be created, updated and exported by Drive API. In this case, it was found that in order to manage the Google Apps Script project of the standalone type, Apps Script API is not required.

  • The Google Apps Script of the standalone type can be created by the method of Files: create in Drive API v3.

  • The Google Apps Script of the standalone type can be updated by the method of Files: update in Drive API v3.

  • The Google Apps Script of the standalone type can be retrieved by the method of Files: export in Drive API v3.

For above situation, I published a Google Apps Script library for creating, updating and exporting Google Apps Script project of the standalone type using Drive API. In this case, Apps Script API is not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment