Trigger Ads Script function remotely with Apps Script

112 views
Skip to first unread message

Mahmud Haque

unread,
Mar 27, 2023, 10:04:39 AM3/27/23
to Google Ads Scripts Forum
Hello. I've developed an Ads script that enables/pauses ads. Is there a way to trigger it remotely using Apps Script?

I'd like to develop a custom menu in Google sheets, which when called will run the ads script function. I'd like to know if this is possible or not.

Thanks

Nils Rooijmans

unread,
Mar 28, 2023, 2:47:33 AM3/28/23
to Google Ads Scripts Forum
Hi Mahmud,

as far as I know, Apps Script does not support calling/triggering functions in your Google Ads Script environment.

What you could do instead is have your Google Ads Scripts check for a setting in your Google Sheet (ie: value in hidden cell), run the Google  Ads Script every hour and if the value in your sheet has a certain value, it can use the value during execution.

Your App Script could change the value in the sheet to whatever you want, and that way pass data to the Google Ads script.

Hope this helps,

Nils Rooijmans
https://nilsrooijmans.com
See my Google Ads Scripts FAQ to avoid the same mistakes I made: https://nilsrooijmans.com/google-ads-scripts-faq/

Google Ads Scripts Forum Advisor

unread,
Mar 28, 2023, 5:56:12 AM3/28/23
to adwords...@googlegroups.com

Hi All,

 

@Nils - Thank you very much for your insights on this! It is very much appreciated.

 

@Mahmud - You may follow Nils' advice to get you started on what you're aiming for. I would agree that there is no way to trigger a script made in Google Ads using Apps Scripts, but you may use the respective tools to get or supply data from the same spreadsheet based on your use-case. If you do encounter an issue on your end with regard to Google Ads Scripts, please let us know so we're able to further investigate.

 

For any clarifications on Google Apps Scripts, you can reach out to their support team via this link as they would be better equipped and are the primary support to the said tool.

 

Best regards,

 

Google Logo Google Ads Scripts Team


ref:_00D1U1174p._5004Q2kCJXi:ref
Reply all
Reply to author
Forward
0 new messages