title: Save the file to Google App Script Google Drive and download it to your PC
body: <p>I am using js in Google Spreadsheet to create and use a script that automates work.</p>
  <p>I want to add one more feature, but it doesn't work.</p>
  <p>Save the saved file to Google Drive in the current script
  I want to download it to PC \ Download folder as well.</p>
  <p>I need to do both, but I don't know what to add to the blob.
  It's hard to get a sense even if you search Google Class and Stackflow.
  Ask a question.
  Can anyone help?</p>
  <pre><code>function sendEmail(){
        var ss = SpreadsheetApp.getActiveSpreadsheet();
        var spreadsheetId = ss.getId();
        var sheet = ss.getSheetByName(&quot;Main&quot;);
        var range = sheet.getRange(&quot;A1:K&quot;);
  
        var tempSheet = ss.insertSheet(`Main_PDD_`);
        range.copyTo(tempSheet.getRange(&quot;A1&quot;), SpreadsheetApp.CopyPasteType.PASTE_VALUES, false);
        range.copyTo(tempSheet.getRange(&quot;A1&quot;), SpreadsheetApp.CopyPasteType.PASTE_COLUMN_WIDTHS, false);
        range.copyFormatToRange(tempSheet, 1, 1, 1, 1);
        var nick = tempSheet.getSheetValues(2,2,1,1);
        SpreadsheetApp.flush();
  
        var tempSheetId = tempSheet.getSheetId();
        var spreadsheetName = tempSheet.getSheetName();
        
                          
        var url = &quot;https://docs.google.com/spreadsheets/d/&quot; + spreadsheetId + &quot;/export?format=xlsx&amp;gid=&quot; + tempSheetId ; // convert to excel
  
        // define date - pdd
        var date = new Date();
        date.setDate(date.getDate() + 1);
        var pdd = Utilities.formatDate(date , &quot;GMT+9&quot;, &quot;yyyyMMdd&quot;) ;
         
        // Attachments
        var token = ScriptApp.getOAuthToken();
        var response = UrlFetchApp.fetch(url, {
          headers: {
            'Authorization': 'Bearer ' + token
          },
          muteHttpExceptions: true
        });
  
        // Save to Google Drive
        var blobs = response.getBlob();
        blobs.setName(`${spreadsheetName}${pdd}.xlsx`)
        var folder = DriveApp.getFolderById('1Q3yA7BzqRSOGxw9ABe1oMaaweggwwe-0');
        backupFile = folder.createFile(blobs);
  
        Browser.msgBox(`${spreadsheetName}${pdd} Upload Complete.`, Browser.Buttons.OK);
  
  
        // delete temporary sheet
        ss.deleteSheet(tempSheet);
  }
  </code></pre>
  <p>Add.</p>
  <p>Because the account is using G-suit
  Google Spreadsheet in cell &quot;N3&quot;</p>
  <pre><code>=HYPERLINK(&quot;mailto:khan@123.com?
  &amp;subject=Main List
  &amp;body=
  Hello%0D%0AThank you.%0D%0A
  From &quot;&amp;B2&amp;&quot;.&quot;
  ,&quot; Send Email&quot;)
  </code></pre>
  <p>I put it in and use it.</p>
  <p>I'm using the question script and two hyperlinks.
  I want to combine them into one task.</p>
  <p>Is there a way to run the script above to upload to Google Drive &amp; download to PC and execute the hyperlink?
  Any way to insert hyperlink in google script please help me</p>