Hello, please help me with a problem.
The script for email notification of the current account balance does not work.
I need an email notification when the current account balance (not in MCC) is less than 500. Can you please see what is wrong with the code?
Google Ads account 384-537-7276
Name of the affected script Notification
Script Code:
var CONFIG = {
days: 7,
alertLimit: 3000,
email: ['vasi...@gmail.com'],
names: ['Nick', 'Nick2'],
}
function main() {
var accountName = AdWordsApp.currentAccount().getName();
var budgetNow = AdWordsApp.budgetOrders().get();
var messageHeader = CONFIG.names + ' / Заканчивается бюджет на аккаунте: ' + accountName;
var messageBody = 'Аккаунт ' + accountName + ' . Текущий остаток = ' + budgetNow +
'В аккаунте заканчиваются средства. Необходимо предупредить PM.';
if (budgetNow < CONFIG.alertLimit) {
MailApp.sendEmail(CONFIG.email, messageHeader, messageBody);
Logger.log([accountName, budgetNow]);
}
}
Hi,
Thank you for reaching out to the Google Ads Scripts support team.
Please be informed that this product officially offers support only in English. It would be best to reply in English if you can. If not, we will try to use Google Translate to support you as best as we can.
I would recommend that you replace the code “email: ['vasi...@gmail.com'],” with “email: 'vasi...@gmail.com',” to resolve the issue.
Kindly note that I have removed your first response from the forum as it contains the PII information.
I hope this helps! Kindly get back to us if you still face any issues.
Google Ads Scripts Team |
--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/e2dea92c-ae24-4f64-ae82-8401d4baf02dn%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/CAD5VN-EkS6qjekMX8pGV%3D3sgj17eHoNyppHhRHaOYy93bWG2wA%40mail.gmail.com.