'Can an automated apps script email notification link back to specific sheet?

much to my surprise I've successfully made an apps scripts that sends me email notifications when a specific cell is changed to 'Submitted,' but I have no idea how to make this identify the sheet it came from - have linked a copy of the sheet below, there are going to be around 20 of these, each with 6 submission sheets, and I need to do a thing as soon as the sheet has been marked submitted, i.e. same day. I'd rather not hard code in separate messages for each sheet, can I do something around getting the URL and sheet with the get active sheet coding and insert it into the email message? I'm also aware currently I've hard coded in the sheet names and therefore need 6 different triggers, I'm working on that - tried loads of different coding pages and this is the only one that worked! https://docs.google.com/spreadsheets/d/1b0LOr9vhmFu4WtYy_RbS-1cvXncNOI_x3YT0f30fZgY/edit#gid=1979912158

Cheers, Meg

    function emailSubmit() {
MailApp.sendEmail("Testemail", "Test", "Test message");
}
function onEdit(e) {
  const specificSheet = "Sub1"
  const specificCell = "C11"

  let sheetCheck = (e.range.getSheet().getName() == specificSheet)
  let cellCheck = (e.range.getA1Notation() == specificCell)
  if (!(sheetCheck && cellCheck) || e.value !== "Submitted") {
    return;
  }
  else {
    emailSubmit()
  }
}
function onEdit2(e) {
  const specificSheet = "Sub2"
  const specificCell = "C11"

  let sheetCheck = (e.range.getSheet().getName() == specificSheet)
  let cellCheck = (e.range.getA1Notation() == specificCell)

  if (!(sheetCheck && cellCheck)) {
    return
  }
  else {
    emailSubmit()
  }
}


Solution 1:[1]

To obtain the spreadsheet object bound to the fired onEdit trigger, use the event object source

enter image description here

Sample:

function emailSubmit(spreadsheet, sheet) {
  console.log("spreadsheet: " + spreadsheet);
  console.log("sheet: " + sheet);
  MailApp.sendEmail("Testemail", "Test", "Spreadsheet " + spreadsheet + " and tab " + sheet + "have been submitted");
}
function onEdit(e) {
  const allowedSheets = ["Sub1","Sub2"];
  const specificCell = "C11";
  const spreadsheetName = e.source.getName();
  const sheetName = e.range.getSheet().getName();
  
  let sheetCheck = (allowedSheets.indexOf(sheetName) != -1);
  let cellCheck = (e.range.getA1Notation() == specificCell);
  if (!(sheetCheck && cellCheck) || e.value !== "Submitted") {
    return;
  }
  else {
    emailSubmit(spreadsheetName, sheetName);
  }
}

References:

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ziganotschka