Hello. The function works great only for one unread email in Gmail. If there are more than one unread letters, then an empty message is left in the next element. Please tell me, I’ve tried a lot of code variants and it doesn’t work.
Here’s a function that works for one unread email:
const item = $node[“Получить новые письма”].json[“text”];
items[0].json.cuttext = item.replace(/<.+>/g, “”);
return items;
Here the nodes: