Решение
Этого легко достичь с помощью скрипта приложений. В таблице с адресами электронной почты от go до Инструменты-> Редактор сценариев и используйте приведенный ниже код, запустив сценарий ( Выполнить-> Выполнить функцию -> myFunction ).
Это кусок кода, который выполняет то, что вы пытались достичь с комментариями, объясняющими, как это работает:
function myFunction() {
// Get the value in the cell A1 (which will have the email to check the latest interaction)
var ss = SpreadsheetApp.getActive().getSheetByName('Sheet1').getRange('A1').getValue();
// Search the date of the last message of the search from the email in cell A1 and log it
var latestEmail = GmailApp.search('from:"'+ss+'"')[0].getLastMessageDate();
Logger.log(latestEmail);
// Print the date on the cell to the right
SpreadsheetApp.getActive().getSheetByName('Sheet1').getRange('B1').setValue(latestEmail);
}
Надеюсь, это помогло вам. Дайте мне знать, если вам нужно что-то еще или вы что-то не поняли. :)