Fetch data from your Google Ads account into KNIME using the Google Ads Connector and Google Ads Query nodes. Then, the workflow will pull this data into Google Sheets for further analysis.
You can download and run the workflow in your local KNIME Analytics Platform. However, you need the latest version to do so.
It is also possible to deploy and schedule the workflow to run once a week in KNIME Business Hub using the Secret Store feature and the Secrets Retriever node instead of the Google Authenticator.
Before you run the workflow, you need to authenticate actively. Using Google APIs with OAuth 2.0 "on your behalf" allows third-party applications to access and interact securely with your Google services, such as Google Sheets and Google Ads, enhancing functionality and user experience while maintaining security and control over your data.
Additionally, you will need:
Google Ads Developer Token
Manager Customer Account ID
Account ID
Please refer to the description of the Google Ads Connector to get more information about how to obtain these items.
Workflow Step-by-Step
Create Variables
In the top branch, we create variables to pass to the downstream nodes, such as the current date, the last week's date, and the year-week column. You can adjust the dates to query data for the previous 30 days or even build a data application to input your data interactively.
Authenticate and Connect
Using the Google Authenticator for interactive authentication, provide the custom scopes listed in the node comments. Then, connect to Google Sheets and the Google Ads Account by providing the specified items.
Query Google Ads Data
Use the Google Ads Query node with the flow variable to set the start and end date of the Search Terms report. After execution, append a new column called Year Week with the flow variable generated in point 1.
Write to Google Sheets
Use the Google Sheets Writer node to create a new Google Spreadsheet named "Historical Data" and write your data in the "Search terms" sheet. Note that you will create a new Spreadsheet each time you execute the node.