New Message
Template Design
Custom Draft
Welcome Card
Newsletter
Receipt
Hi there,

I hope you are doing well.

This is a custom email draft sent using our new Resend Hub dispatcher app. It uses clean formatting and text structure, which is designed to land directly in your Primary Inbox instead of the Promotions tab.

Best regards,
Sender
Live Frame Preview
General Settings

Resend API Key

Your API Key is encrypted and stored in Cloudflare's server KV database.

Input a new key and save to update.

Google Sheets Real-time Logging

Enter your Web App URL to mirror your logs in Google Sheets in the background.

View Apps Script Setup Code
  1. Open **Google Sheets** -> **Extensions** -> **Apps Script**.
  2. Paste the code, click **Deploy** -> **New deployment** -> **Web app**.
  3. Set: *Execute as: Me*, *Who has access: Anyone*.
// Handles Reading logs (GET)
function doGet(e) {
  try {
    var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    var rows = sheet.getDataRange().getValues();
    if (rows.length <= 1) {
      return ContentService.createTextOutput(JSON.stringify([]))
        .setMimeType(ContentService.MimeType.JSON);
    }
    var logList = [];
    for (var i = 1; i < rows.length; i++) {
      var row = rows[i];
      logList.push({
        date: row[0],
        to: row[1],
        subject: row[2],
        status: row[3],
        id: row[4],
        error: row[5] || "",
        body: row[6] || ""
      });
    }
    logList.reverse();
    return ContentService.createTextOutput(JSON.stringify(logList))
      .setMimeType(ContentService.MimeType.JSON);
  } catch (error) {
    return ContentService.createTextOutput(JSON.stringify({ success: false, error: error.message }))
      .setMimeType(ContentService.MimeType.JSON);
  }
}

// Handles Writing logs (POST)
function doPost(e) {
  try {
    var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
    var data = JSON.parse(e.postData.contents);
    if (sheet.getLastRow() === 0) {
      sheet.appendRow(["Timestamp", "Recipient (To)", "Subject", "Status", "Resend ID", "Error Detail", "Email Body"]);
    }
    sheet.appendRow([
      new Date().toLocaleString(),
      data.to,
      data.subject,
      data.status,
      data.id,
      data.error || "",
      data.body || ""
    ]);
    return ContentService.createTextOutput(JSON.stringify({ success: true }))
      .setMimeType(ContentService.MimeType.JSON);
  } catch (error) {
    return ContentService.createTextOutput(JSON.stringify({ success: false, error: error.message }))
      .setMimeType(ContentService.MimeType.JSON);
  }
}

API Configuration & Optimization

  • Resend Sandbox: If using a free sandbox account, you can only send to your own registered account email address.
  • Domain Verification: Set up and verify a custom domain under the Resend dashboard to send emails to any recipient address and bypass spam filters.
Open Resend Console