{"id":18654316,"url":"https://github.com/ricsti/google-ads-scripts-search-query-deduplicator","last_synced_at":"2025-11-05T16:30:36.924Z","repository":{"id":189583114,"uuid":"517246750","full_name":"RicSti/google-ads-scripts-search-query-deduplicator","owner":"RicSti","description":"🇩🇪 Identifiziere mit diesem Google Ads Script alle Suchbegriffe, die nicht in der angedachten Anzeigengruppe matchen und schließe diese automatisch aus. 🇬🇧  Use this Google Ads Script to identify all search terms that do not match in the intended ad group and automatically exclude them.","archived":false,"fork":false,"pushed_at":"2022-07-25T08:11:02.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T14:12:45.838Z","etag":null,"topics":["google-ads","google-ads-scripts","keywords","negatives","search-queries","search-terms"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RicSti.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-07-24T06:37:12.000Z","updated_at":"2023-08-20T21:46:18.000Z","dependencies_parsed_at":"2023-08-20T21:26:18.583Z","dependency_job_id":null,"html_url":"https://github.com/RicSti/google-ads-scripts-search-query-deduplicator","commit_stats":null,"previous_names":["ricsti/google-ads-scripts-search-query-deduplicator"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicSti%2Fgoogle-ads-scripts-search-query-deduplicator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicSti%2Fgoogle-ads-scripts-search-query-deduplicator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicSti%2Fgoogle-ads-scripts-search-query-deduplicator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RicSti%2Fgoogle-ads-scripts-search-query-deduplicator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RicSti","download_url":"https://codeload.github.com/RicSti/google-ads-scripts-search-query-deduplicator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239467422,"owners_count":19643604,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["google-ads","google-ads-scripts","keywords","negatives","search-queries","search-terms"],"created_at":"2024-11-07T07:14:37.599Z","updated_at":"2025-11-05T16:30:36.871Z","avatar_url":"https://github.com/RicSti.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href id=\"top\"\u003e\u003c/a\u003e\n# Google Ads Script Search Query Deduplicator 22.1 - ENGLISH\nDeutsche Version: \u003ca href=\"https://github.com/RicSti/google-ads-scripts-search-query-deduplicator/blob/main/LIESMICH.md\"\u003eLIESMICH.md\u003c/a\u003e\n\n## Description\nUse this Google Ads Script to identify all search terms that do not match in the intended ad group and automatically exclude them.\n\n## Overview\n* \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e\n* \u003ca href=\"#execution\"\u003eFirst execution \u0026 overview of the columns in the sheet\u003c/a\u003e\n* \u003ca href=\"#planning\"\u003ePlanning / regular execution\u003c/a\u003e\n* \u003ca href=\"#functions\"\u003eFunction descriptions\u003c/a\u003e\n* \u003ca href=\"#parameters\"\u003eFunction parameters\u003c/a\u003e\n\n---\n\u003ca id=\"installation\"\u003e\u003c/a\u003e\n\n## Installation\n\n### I. Set up Google Ads scripts\n\nOpen your Google Ads account or MCC and navigate to \"Tools and Settings \u003e Bulk Actions \u003e Scripts\".\n\nThe Search Query Duplicator is divided into two scripts.\n\n#### \u003cstrong\u003eScript 1 - \"SQ Deduplicator 22.1 Prepare Data\"\u003c/strong\u003e\nThe first script prepares the data for further processing and writes it to a Google Sheet.\n\n\u003cu\u003e\u003ci\u003eSetup:\u003c/i\u003e\u003c/u\u003e\n\nCreate a new Google Ads script \u003ci\u003e(suggested name: \"SQ Deduplicator 22.1 Prepare Data\")\u003c/i\u003e and overwrite the content with the appropriate code template:\n\n* Single account: single_account_prepare_data.js\n* MCC version: mcc_version_prepare_data.js\n\n#### \u003cstrong\u003eScript 2 - \"SQ Deduplicator 22.1 Process Data\"\u003c/strong\u003e\nThe second script processes the unprocessed rows from the Google Sheet and writes the processing status back to the respective data row.\n\n\u003cu\u003e\u003ci\u003eSetup:\u003c/i\u003e\u003c/u\u003e\n\nCreate a new Google Ads script \u003ci\u003e(suggested name: \"SQ Deduplicator 22.1 Process Data\")\u003c/i\u003e and overwrite the content with the appropriate code template:\n\n* Single account: single_account_process_data.js\n* MCC version: mcc_version_process_data.js\n\n### II. Create Google Sheet from template\n\nA Google Sheet is used for the temporary storage and further processing of the search terms. You can copy the template with the following Google Drive link: \u003ca href=\"https://docs.google.com/spreadsheets/d/1OARjoIsFVciGIxbvuwmjV6Wdflg1kDangp8s_R3LV10/copy\" target=\"_blank\"\u003eadtraffic Search Query Deduplicator Google Sheet Template\u003c/a\u003e\n\nPaste the ID of your newly created Google Sheet into both scripts at the position of \"{{Search Query Deduplicator Google Sheet ID}}\".\n\n\u003ca id=\"installIII\"\u003e\u003c/a\u003e\n\n### III Provide BatchService Response (MCC) resp. \"ocid\"-Parameter (Single Account) _[optional]_\n\nIn order to generate direct links to the Google Ads ad groups, the \"ocid\" parameter for the respective Google Ads account is required.\n\n#### \u003cu\u003eIII.a Google Ads \"BatchService Response\" (for MCC Version)\u003c/u\u003e\n\nThe \"ocid\" parameter can be read from the response of the BatchService at MCC level for all child accounts. To make the response available as an object in the script, proceed as follows:\n\n1. Open the relevant MCC and navigate to \"Accounts \u003e Performance\"\n2. Open the browser's developer tools and select the \"Network\" tab\n3. Reload the page and filter the entries with \"batch account\"\n4. Click on the entry that starts with \"Batch?authuser=\" and select \"Response\" on the right\n5. Copy the entire content of the response and paste it in \u003cu\u003eScript 1 - \"SQ Deduplicator 22.1 Prepare Data\"\u003c/u\u003e at the porsition of \"{{BatchService Response}}\".\n\n\u003cstrong\u003eAlternatively:\u003c/strong\u003e\n\u003cp\u003eRemove the placeholder \"{{BatchService Response}}\", leaving the following content in the line:\u003c/p\u003e\n\u003ccode\u003elet batchAccountSnippet = new Object();\u003c/code\u003e\n---\n\n#### \u003cu\u003eIII.b Provide Google Ads \"ocid\" parameter (for single accounts)\u003c/u\u003e\n\nFor single accounts, the \"ocid\" parameter can be read from the address bar.\n\n1. Log in to the relevant Google Ads account and copy the digits after \"ocid=\" from your browser's address bar\n2. Paste the copied digits into \u003cu\u003eScript 1 - \"SQ Deduplicator 22.1 Prepare Data\"\u003c/u\u003e at the postion of \"{{ocid}}\".\n\n\u003cstrong\u003eAlternatively:\u003c/strong\u003e\n\u003cp\u003eRemove the placeholder \"{{ocid}}\", leaving the following content in the line:\u003c/p\u003e\n\u003ccode\u003econst ocid = '';\u003c/code\u003e\n---\n\n### _[optional]_ IV. Define Account IDs (for MCC version)\n\nAdd the Account IDs of the accounts to be processed as comma-separated strings in both scripts at the postion of \"{{Account IDs Array}}\".\n\n\u003cu\u003e\u003ci\u003eExample syntax:\u003c/i\u003e\u003c/u\u003e\n\u003ccode\u003e'123-456-7890','456-123-7890','654-321-7890','321-654-7890'\u003c/code\u003e\n\n\u003cstrong\u003eAlternatively:\u003c/strong\u003e\n\u003cp\u003eRemove the placeholder \"Account IDs Array\", leaving the following content in the line:\u003c/p\u003e\n\u003ccode\u003elet accountIds = [];\u003c/code\u003e\n\n---\n\n\u003ca id=\"execution\"\u003e\u003c/a\u003e\n\n## First execution \u0026 overview of the columns in the sheet\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\nWhen the \u003cu\u003eScript 1 - \"SQ Deduplicator 22.1 Prepare Data\"\u003c/u\u003e is executed for the first time, a new worksheet with the respective account ID as the worksheet name with eleven columns is created in the Google Sheet for each processed account:\n\n* searchTerm\n* matchType\n* campaignId \n* adgroupId \n* campaignName\n* adGroupName\n* deepLink\n* impressions\n* clicks\n* conversions\n* processed\n\nThe first six columns are self-explanatory.\n\nThe \"deepLink\" column contains a direct link to the ad group of the respective search term (if the \"ocid\" parameter is available - see \u003ca href=\"#installIII\"\u003eInstall Step III\u003c/a\u003e). The \"impressions\", \"clicks\" and \"conversions\" columns contain the respective values ​​for the queried period (by default the last 30 days).\n\nThe last column \"processed\" can contain six different return values ​​after executing the \u003cu\u003eScript 2 - \"SQ Deduplicator 22.1 Process Data\"\u003c/u\u003e:\n\n\u003ca id=\"returnvalues\"\u003e\u003c/a\u003e\n\n### Return values ​​from Script 2\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\n| Value | Meaning |\n| --- | --- |\n| Term\u0026nbsp;skipped | The search term does not match an actively booked keyword in the account. No negative keyword was created.\n| Campaign\u0026nbsp;Negative\u0026nbsp;added | The search term corresponds to an actively booked keyword in another campaign. A negative keyword was created in the campaign of the found search term. (*)\n| Campaign\u0026nbsp;Negative\u0026nbsp;skipped | The search term corresponds to an actively booked keyword in another campaign. However, no negative keyword was created in the campaign of the found search term because a corresponding negative keyword was already booked there.\n| AdGroup\u0026nbsp;Negative\u0026nbsp;added | The search term matches an actively booked keyword in another ad group in the same campaign. A negative keyword was created in the ad group of the found search term. (*)\n| AdGroup\u0026nbsp;Negative\u0026nbsp;skipped | The search term matches an actively booked keyword in another ad group in the same campaign. However, no negative keyword was created in the ad group of the found search term because a corresponding negative keyword was already booked there.\n| Comparison\u0026nbsp;failed | At least one duplicate was found when processing the data from the sheet, but an error occurred when matching the campaignId.\n\n(*) Running the script in preview mode will \u003cstrong\u003e\u003cu\u003enot\u003c/u\u003e\u003c/strong\u003e create negative keywords. In the script editor under \"Changes\" you can see in which campaigns or ad groups negative keywords \u003cstrong\u003e\u003cu\u003ewould\u003c/u\u003e\u003c/strong\u003e be booked.\n\n---\n\n\u003ca id=\"planning\"\u003e\u003c/a\u003e\n\n## Planning / regular execution\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\nBy executing the \u003cu\u003eScript 1 - \"SQ Deduplicator 22.1 Prepare Data\"\u003c/u\u003e all data in the Google Sheet will be overwritten. Running the script weekly should be sufficient for most accounts. For large accounts with several hundred newly identified search queries every day, daily execution makes perfect sense.\n\nThe \u003cu\u003eScript 2 - \"SQ Deduplicator 22.1 Process Data\"\u003c/u\u003e only processes rows without a value in the \"processed\" column. A limit for the maximum number of lines to be processed can be defined (default: 1,000 lines) so that the script does not run into a timeout when processing a very large number of search terms. Script 2 should be planned to run enough times to process all of the identified search terms.\n\n---\n\n\u003ca id=\"functions\"\u003e\u003c/a\u003e\n\n## Function descriptions\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\n### Script 1 - \"SQ Deduplicator 22.1 Prepare Data\"\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#main1\"\u003emain()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eMCC version: Loads the accounts to be processed and starts the parallel execution of the script.\u003c/p\u003e\n\u003cp\u003eSingle account version: Basically the same as the MCC function \u003ca href=\"#processAccount1\"\u003eprocessAccount()\u003c/a\u003e\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#processAccount1\"\u003eprocessAccount()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eRuns the Google Sheet preparation, then loads the active search terms and initiates the export of the aggregated search terms to the Google Sheet.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#prepareSheet\"\u003eprepareSheet()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eCreates a new sheet for the account to be processed in the Google Sheet or deletes the data it contains if a sheet already exists for the respective account.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#getActiveSearchTerms\"\u003egetActiveSearchTerms()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eRetrieves all search terms that did \u003cu\u003e\u003cstrong\u003enot\u003c/strong\u003e\u003c/u\u003e match with EXACT or NEAR EXACT match type and generated a minimum number of impressions (30 by default) in the given time period (30 days by default).\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#writeData\"\u003ewriteData()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eWrites the prepared data to the Google Sheet.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n---\n\n### Script 2 - \"SQ Deduplicator 22.1 Process Data\"\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#main2\"\u003emain()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eMCC version: Loads the accounts to be processed and starts the parallel execution of the script.\u003c/p\u003e\n\u003cp\u003eSingle account version: Basically the same as the MCC function \u003ca href=\"#processAccount2\"\u003eprocessAccount()\u003c/a\u003e\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#processAccount2\"\u003eprocessAccount()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eRuns the Google Sheet preparation, then loads the active search terms and starts writing the aggregated search terms to the Google Sheet.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#checkForDuplicates\"\u003echeckForDuplicates()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eBased on the processed search term in all other ad groups, it searches for active keywords that exactly match the respective search term, initiates the creation of a keyword to be excluded if it is found and has the result of the processing written back to the Google Sheet.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#createCampaignNegative\"\u003ecreateCampaignNegative()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eCreates an exact match negative keyword at the campaign level, using the processed search term as the keyword text.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#createAdGroupNegative\"\u003ecreateAdGroupNegative()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eCreates an exact match negative keyword at the ad group level, using the processed search term as the keyword text.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#readSheet\"\u003ereadSheet()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eReads the data (without header) from the Google Sheet into an array.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#updateData\"\u003eupdateData()\u003c/a\u003e ⇒\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eWrites the result for each search term to the Google Sheet in the \"processed\" column of the respective row.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n---\n\n\u003ca id=\"parameters\"\u003e\u003c/a\u003e\n\n## Function parameters\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\n### Script 1 - \"SQ Deduplicator 22.1 Prepare Data\"\n\n### global ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| sheetFileId | String | The ID of the Google Sheet to use. |\n| batchAccountSnippet\u003cbr\u003e(MCC\u0026nbsp;Version\u0026nbsp;only) | Object | The content of the \"Batch Service Response\". (Required for automatic determination of the ocid parameter.) |\n\n\u003ca id=\"main1\"\u003e\u003c/a\u003e\n### main() ⇒\nMCC version below.\u003cbr\u003e\nSingle account version see \u003ca href=\"#processAccount1\"\u003eprocessAccount()\u003c/a\u003e\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| accountIds | Array | Contains the account IDs of the Google Ads accounts to be processed. |\n\n\u003ca id=\"processAccount1\"\u003e\u003c/a\u003e\n### processAccount() ⇒\nMCC version below.\u003cbr\u003e\nRuns as main() in single account version\u003c/a\u003e\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| accountId | String | The account ID of the processed account. |\n| ocid | String | The ocid parameter matching the processed account. (Required for creating Google Ads deep links.) |\n| sheetStatus | Integer | 2 = new spreadsheet was created.\u003cbr\u003e1 = content was removed from existing spreadsheet. |\n| activeSearchTerms | Array | Return values ​​from \u003ca href=\"#getActiveSearchTerms\"\u003egetActiveSearchTerms()\u003c/a\u003e |\n\n\u003ca id=\"prepareSheet\"\u003e\u003c/a\u003e\n### prepareSheet() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| sheetFileId | String | The ID of the Google Sheet to use. |\n| accountId | String | The account ID of the processed account. |\n| ss | Spreadsheet\u0026nbsp;Object | The Google Sheet to use |\n| templateSheet | Sheet\u0026nbsp;Object | The empty sheet template within the Google Sheets used. (Used for creating new sheets for processed accounts.) |\n\n\u003ca id=\"getActiveSearchTerms\"\u003e\u003c/a\u003e\n### getActiveSearchTerms() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| ocid | String | The ocid parameter matching the processed account. (Required for creating Google Ads deep links.) |\n| activeSearchTerms | Array | Return values for \u003ca href=\"#processAccount1\"\u003eprocessAccount()\u003c/a\u003e |\n| query | String | GAQL query to perform search for active search terms using AdsApp.search()|\n| search | AdsApp.SearchRowIterator | see \u003ca href=\"https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_searchrowiterator\" target=\"_blank\"\u003eAdsApp.SearchRowIterator\u003c/a\u003e |\n| googleAdsDeeplink | String | The Google Ads deep link to the ad group of the respective search term |\n\n\u003ca id=\"writeData\"\u003e\u003c/a\u003e\n### writeData() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| data | Array | Return values from \u003ca href=\"#getActiveSearchTerms\"\u003egetActiveSearchTerms()\u003c/a\u003e. |\n| sheetFileId | String | The ID of the Google Sheet to use. |\n| sheetName | String | The account ID of the processed account. |\n| sheet | Spreadsheet\u0026nbsp;Object | The Google Sheet used. |\n\n---\n\n### Script 2 - \"SQ Deduplicator 22.1 Process Data\"\n\u003ca href=\"#top\"\u003e\u003cbutton style=\"float:right;margin-top:-2.2em;\"\u003eback to top\u003c/button\u003e\u003c/a\u003e\n\n### global ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| sheetFileId | String | The ID of the Google Sheet to use. |\n\n\u003ca id=\"main2\"\u003e\u003c/a\u003e\n### main() ⇒\nMCC version below.\u003cbr\u003e\nSingle account version see \u003ca href=\"#processAccount2\"\u003eprocessAccount()\u003c/a\u003e\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| accountIds | Array | Contains the account IDs of the Google Ads accounts to be processed. |\n\n\u003ca id=\"processAccount2\"\u003e\u003c/a\u003e\n### processAccount() ⇒\nMCC version below.\u003cbr\u003e\nRuns as main() in single account version\u003c/a\u003e\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| accountId | String | The account ID of the processed account. |\n| sheet | Spreadsheet\u0026nbsp;Object | The Google Sheet used. |\n| existingValues | Array | All data rows (without header) of the processed account spreadsheet. |\n| filteredValues | Array | Filtered rows from existingValues ​​with no values ​​in column \"processed\". |\n| count | Integer | Auxiliary variable for counting the rows already processed |\n| status | String | Return value from \u003ca href=\"#checkForDuplicates\"\u003echeckForDuplicates()\u003c/a\u003e. (See \u003ca href=\"#returnvalues\"\u003eReturn values ​​from Script 2\u003c/a\u003e) |\n\n\n\u003ca id=\"checkForDuplicates\"\u003e\u003c/a\u003e\n### checkForDuplicates() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| rowData | Array | Input values ​​from \u003ca href=\"#processAccount2\"\u003eprocessAccount()\u003c/a\u003e. (The row to process from filteredValues.) |\n| accountId | String | The account ID of the processed account. |\n| query | String | GAQL query to search for already booked keywords in other ad groups using AdsApp.search() |\n| search | AdsApp.SearchRowIterator | See \u003ca href=\"https://developers.google.com/google-ads/scripts/docs/reference/adsapp/adsapp_searchrowiterator\" target=\"_blank\"\u003eAdsApp.SearchRowIterator\u003c/a\u003e |\n\n\n\u003ca id=\"createCampaignNegative\"\u003e\u003c/a\u003e\n### createCampaignNegative() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| term | String | Keyword text to create the negative keyword. |\n| campaign | Integer | ID of the campaign in which to create the negative keyword. |\n\n\u003ca id=\"createAdGroupNegative\"\u003e\u003c/a\u003e\n### createAdGroupNegative() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| term | String | Keyword text to create the negative keyword. |\n| adgroup | Integer | ID of the ad group in which to create the negative keyword. |\n\n\u003ca id=\"readSheet\"\u003e\u003c/a\u003e\n### readSheet() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| sheet | Spreadsheet\u0026nbsp;Object | The Google Sheet used. |\n\n\u003ca id=\"updateData\"\u003e\u003c/a\u003e\n### updateData() ⇒\n\n| Parameter | Type | Description |\n| --- | --- | --- |\n| sheet | Spreadsheet\u0026nbsp;Object | The Google Sheet used. |\n| index | Integer | Relative row number of the processed search term in the spreadsheet |\n| status | String | Return value from \u003ca href=\"#checkForDuplicates\"\u003echeckForDuplicates()\u003c/a\u003e. (See \u003ca href=\"#returnvalues\"\u003eReturn values ​​from Script 2\u003c/a\u003e) |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricsti%2Fgoogle-ads-scripts-search-query-deduplicator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricsti%2Fgoogle-ads-scripts-search-query-deduplicator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricsti%2Fgoogle-ads-scripts-search-query-deduplicator/lists"}