How to set up your Google Cloud Console for Search Ads 360 scriptsMeg Candler
At Brainlabs we have been publishing and sharing our scripts for a long time now. Normally these have been as simple as copy and pasting some code, inputting your own spreadsheet, or other IDs, playing with some settings, and hitting run. You’ll have noticed that when you do this, Google will normally ask you to go through a process to authorise the script to have certain permissions. It looks something like this:
This relatively simple method of authorising scripts to make given changes is made possible by Google providing “Services” to do most of the things that we have ever wanted to do in our blogposts.
Recently we have started writing some scripts to share that interact with Search Ads 360. A service isn’t available to do this, and as such there is a bit more work to do than normal before you’re able to click run and have it all work. Hopefully this document should serve as a fairly easy to follow step by step guide for how to do this.
So, without further ado, here is the “Brainlabs Guide to Google Cloud Console”. We use the Search Ads 360 API in this example, but the process is valid for other services also, be they advertising based such as Google Analytics, or otherwise, like using Google Maps data.
Go to the Google Cloud Console at https://console.cloud.google.com/. Navigate through any initial setup steps that it asks you to go through.
Click “Select a Project” at the top of the page and then “New Project”
Give the project a name corresponding to what the script does, and click create. This will take you to that project’s dashboard.
Click “Explore and enable APIs” and click “Enable APIs and services”. Next, search for “search ads 360 api” and click on it, and finally click “Enable”.
You should now see a page similar to this:
Click where it says “Credentials” on the left hand side column, and then click “Configure Consent Screen”. This should give you a page like this:
You only need to fill in the application name. Then click save.
Now click “Create Credentials” on the page that comes up, and pick “OAuth Client ID”. Choose “Other” as the application type, and click “Create”.
A popup detailing some things about your “Token” will appear. Feel free to ignore that, click okay, and navigate back home by clicking “Google Cloud Platform” at the top.
Make a note of the product number highlighted here:
You will then use this number to pair your project to this set of permissions that you have created. Say that you are in your script on a Google Sheet, this can be done by clicking “Resources” and then “Cloud Platform project… ” like here:
Finally, enter your project number from step 8 into this box:
Click “Set Project”, click “Confirm”, and now we’re done, and in a position to worry about the script itself.
Be aware that the Google account used to set up the project in the cloud console should be the same account used to create the script, else the script won’t be able to find the project.