I am trying to copy slides from a source presentation and append them to the end of destination presentation. I have searched solution on SO but they use the google apps script. I am looking for a solution that can use the google slides or google drive REST API. What I have attempted so far is getting each element of the source presentation's slides and using batch updates to add them to the destination presentation, but obviously this is tedious and does not cover all cases. Does anyone have any possible ways to perform this task? Thanks in advance.
相关问题
- How can I force all files in a folder to be owned
- google-drive can't get push notifications
- File upload via REST v3 appears as “Untitled”
- PyDrive Upload and Remove
- Android: Google Drive onActivityResult() getting r
相关文章
- How can my Google Apps Script be run by others the
- Google Drive raw data?
- how to programmatically download a public Google D
- Is it possible to send HTTP request from inside Go
- Google Drive API is not working after Proguard obf
- How to style a Google Doc using Google Drive API?
- Google Drive Realtime API OAuth2 Refresh Errors (P
- keep getting kicked out my google login when using
Unfortunately, in the current stage, there are no methods for directly copying a slide (It's like the method of copyTo of Sheets API.) to other Google Slides, yet. So in order to copy a slide to other Slides, I think that there are 2 workarounds.
I recommend the latter, because I think that the former will be the complicated script. So I would like to propose a sample script for the latter workaround.
When you use this script, please do the following flow.
Preparation flow
https://script.google.com/macros/s/#####/exec
.By this flow, the Web Apps was deployed as own API. In this sample, "Anyone, even anonymous" for "Who has access to the app:" was used as a test. If you want to use the access token, please modify this. You can see the detail information at below "References".
Sample script
Google Apps Script:
curl command:
After Web Apps was deployed, you can use the Web Apps as own API. The sample curl for requesting to the deployed Web Apps is as follows.
Before you use this, please set the source and destination file ID of Slides. When you want to copy the 1st page of the source Slides, please set
1
tosrcPage
. And also please set the endpoint which was retrieved above.When this command is run,
Done.
is returned. At that time, you can see the appended slide to the last page in the destination Slides.References