Skip to content

Instantly share code, notes, and snippets.

function forwardLabeledEmails() {
const labelName = "";
const workerEndpoint = "";
const authToken = "";
const recipientEmail = ""; // Replace with your email address
// Get the date 24 hours ago
const now = new Date();
const twentyFourHoursAgo = new Date(now.getTime() - 24 * 60 * 60 * 1000);
@TownLake
TownLake / multi-label-summary.js
Created January 27, 2025 15:33
multi-label-summary
function forwardLabeledEmails() {
const labels = ["label1", "label2", "label3"]; // Multiple labels
const workerEndpoint = "";
const authToken = "";
const recipientEmail = ""; // Replace with your email address
// Get the date 24 hours ago
const now = new Date();
const twentyFourHoursAgo = new Date(now.getTime() - 24 * 60 * 60 * 1000);