function processEmails() {
var emails = [];
var label = GmailApp.getUserLabelByName("vtb");
var threads = label.getThreads();
for (var i = threads.length - 1; i >= 0; i--) {
var msgs = threads[i].getMessages();
for (var j in msgs) {
var totalsum = msgs[j].getBody().replace(/<.*?>/g, '').replace(/.
var category = msgs[j].getBody().replace(/<.*?>/g, '').replace(/.
var mydate = msgs[j].getBody().replace(/<.*?>/g, '').replace(/.
emails.push([totalsum, category, mydate])
//emails.push([aaa])
}
function saveEmails() {
var array2d = processEmails();
if (array2d) {
appendData_(SpreadsheetApp.openById('1yQN1B3fgg4kyIketUt0X0C9MW7h83mmkTAuxc9TO2eI').getSheetByName('bank'), array2d);
}
}