How can I update this app script to send SMS from rotating Twilio phone numbers?

Currently, I have app script that texts a column of phone numbers, “PHONE_NUMBER” from 1 Twilio number,+18778516645.

I would like to update this apps script to send from a column of Twilio Phone Numbers on a rotating basis. The “Send From” phone number is in column B. The “Send To” phone number is in Column C. The “Send To” number is already implemented in the script. How do I implement the “Send From” numbers?

Also is it necessary to implement a “pause” after ‘X’ messages to respect rate limits? Or would Twilio account for this already? If I should add a pause, how do I add Utilities.Sleep()?

Finally, I would like the script to start with a message box that reminds me of several “checks” to be completed. If I click “yes”, the the script runs. If “no”, then the script is cancelled. How can I do this?

I’m just getting started in coding. Sorry if this is not a great question. Thank you for your help!

// Spreadsheet column names mapped to 0-based index numbers.
var TIME_ENTERED = 0;
var PHONE_NUMBER = 1;
var MESSAGE = 2;
var STATUS = 3;

// Enter your Twilio account information here.
var TWILIO_ACCOUNT_SID = '';
var TWILIO_SMS_NUMBER = '+18778516645';
var TWILIO_AUTH_TOKEN = '';

/**
 * Installs a trigger in the Spreadsheet to run upon the Sheet being opened.
 * To learn more about triggers read: https://developers.google.com/apps-script/guides/triggers
 */
function onOpen1() {
  // To learn about custom menus, please read:
  // https://developers.google.com/apps-script/guides/menus
  var ui = SpreadsheetApp.getUi();
  ui.createMenu('Send SMS')
      .addItem('Send to all', 'sendSmsToAll')
      .addToUi();
};  

function onOpen() {
  // To learn about custom menus, please read:
  // https://developers.google.com/apps-script/guides/menus
  var ui = SpreadsheetApp.getUi();
  ui.createMenu('GetReplies')
      .addItem('GetReplies', 'GetReplies')
      .addToUi();
};  

/**
 * Sends text messages listed in the Google Sheet
 *
 */
function sendSmsToAll() {
  var sheet = SpreadsheetApp.getActiveSheet();
  var rows = sheet.getDataRange().getValues();
  
  // The `shift` method removes the first row and saves it into `headers`.
  var headers = rows.shift();
  
  // Try to send an SMS to every row and save their status.
  rows.forEach(function(row) {
    row[STATUS] = sendSms(row[PHONE_NUMBER], row[MESSAGE]);
  });
  
  // Write the entire data back into the sheet.
  sheet.getRange(2, 1, rows.length, headers.length).setValues(rows);
}


/**
 * Sends a message to a given phone number via SMS through Twilio.
 * To learn more about sending an SMS via Twilio and Sheets: 
 * https://www.twilio.com/blog/2016/02/send-sms-from-a-google-spreadsheet.html
 *
 * @param {number} phoneNumber - phone number to send SMS to.
 * @param {string} message - text to send via SMS.
 * @return {string} status of SMS sent (successful sent date or error encountered).
 */
function sendSms(phoneNumber, message) {
  var twilioUrl = 'https://api.twilio.com/2010-04-01/Accounts/' + TWILIO_ACCOUNT_SID + '/Messages.json';

  try {
    UrlFetchApp.fetch(twilioUrl, {
      method: 'post',
      headers: {
        Authorization: 'Basic ' + Utilities.base64Encode(TWILIO_AUTH_TOKEN)
      },
      payload: {
        To: phoneNumber.toString(),
        Body: message,
        From: TWILIO_SMS_NUMBER,
      },
    });
    return 'sent: ' + new Date();
  } catch (err) {
    return 'error: ' + err;
  }
}