I am following Google's "Data Merge" tutorial to import data from Google Sheets into Google Slides, and the part that does not work fully is "Copying an existing presentation." When I run the provided Apps Script code, I am getting a copy of the file with the name "Copy of ..." instead of "New presentation title".
// Duplicate the template presentation using the Drive API.
var copyTitle = 'New presentation title';
var requests = {
name: copyTitle
};
var driveResponse = Drive.Files.copy({
resource: requests
}, originalpresentationID);
var presentationCopyId = driveResponse.id;
Logger.log(driveResponse.title) # Logger returns: "Copy of ..."
How can I properly create a copy of an existing file, with my desired name? It seems the tutorial is wrong.