This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Enviar Borradores creados previamente | |
| // IMPORTANTE: | |
| // Este script enviará TODOS los borradores que tengan destinatario asignado. | |
| // Antes de ejecutarlo, revisa cuidadosamente tu carpeta de borradores. | |
| function enviarBorradores() { | |
| const borradores = GmailApp.getDrafts(); // Obtener todos los borradores | |
| let enviados = 0; // Contador de enviados | |
| // Procesar cada borrador | |
| borradores.forEach(borrador => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Automatización de borradores con Google Sheets + Apps Script | |
| function crearBorradores() { | |
| const hoja = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("NOMBRE_DE_TU_HOJA"); | |
| const datos = hoja.getDataRange().getValues(); | |
| const fechaManual = "FECHA_O_TEXTO_QUE_QUIERAS_DE_ASUNTO"; // Esta es la fecha manual que pones para el asunto | |
| const carpetaId = "ID_DE_TU_CARPETA"; // ID de la carpeta | |
| const carpeta = DriveApp.getFolderById(carpetaId); // Obtener la carpeta |