Some time ago, Channable added a feature based on user feedback that allows ads generated with the Google Ads Text Generators to be labeled with Google Ads labels.
This gives online marketers the ability to assign values such as the ad template used, test variant, or other values to ads generated from Channable, making it easier to analyze the different ad variants.
But the feature doesn’t work optimally
At first glance, this is a great addition. Until you read the fine print and discover that you can only apply Ads labels that already exist in your Google Ads account. Of course, you can manually create the labels in advance and then use those names, but what if you want to use a dynamic value such as brand, promotion, or category?
As stated in the Channable Helpcenter article, you will encounter a “Label does not exist” error if you try to use a label that hasn’t been added to Google Ads yet:

You could do a one-time bulk upload of all those values, but as soon as a new brand, promotion, or category is introduced, you’d need to manually add the corresponding label in Google Ads each time to ensure it gets linked to the right ads from Channable.
Since you'd prefer to set this up once and forget about it, we’ve developed a dynamic solution that keeps your dynamic Ads labels up-to-date.
Follow these five steps:
- Create a dynamic CSV URL by generating a Custom CSV feed in Channable.
- Add the same rules you use in the Text Generators for populating the Ads labels.
- Deduplicate these values with a deduplicate rule, so the result is a CSV feed with only one column, containing unique values for the Ads labels.
- Copy the Ads script below into the relevant Google Ads account and paste the URL of your newly activated CSV feed.
- Activeer het Ads script Activate the Ads script and set the frequency to match your Channable refresh rate (ideally, right after your Channable environment is refreshed, or select every hour).
Once Channable refreshes the feed, new Ads label values are added to the CSV feed. The Ads script then retrieves these values an hour later and creates the new Ads labels in your Google Ads account. The next time Channable refreshes, the Ads labels are linked to the ads, allowing you to perform your desired analyses.
Dynamic Channable Ads
Label Creator Script
(Click on the copy icon in the top right corner to copy the Ads Script in its entirety).
/**
* Script Name: Dynamic Channable Ads Label Creator
* Description: This script downloads a CSV file containing label names from a given URL,
* checks if those labels exist in the Google Ads account, and creates any missing labels.
*
* Author: Paul de Graaf
* Company: AdArchitects
* License: This script is provided under a sharing/alteration-allowed license.
* You are free to share and modify this script as long as the original author (Paul de Graaf)
* and company (AdArchitects) are credited.
*
* Instructions:
* 1. Replace the `csvUrl` variable with the URL of your CSV file that contains one column with unique label names.
* This can be either a Channable CSV URL (like: 'https://files.channable.com/{feed-id}.csv', or Google Sheets Published CSV URL (like: 'https://docs.google.com/spreadsheets/d/e/{spreadsheet-id}/pub?gid=0&single=true&output=csv').
* 2. The CSV should contain a header row, with the label names in the first (and only) column (e.g., "labelName").
* 3. The script will download and parse the CSV, check for existing labels in the account, and create any missing ones.
* 4. Ensure the Google Ads account you're using has the appropriate permissions to create labels.
*
* Disclaimer: The author and company are not responsible for any misuse or unintended behavior of the script.
*/
function main() {
var csvUrl = 'https://files.channable.com/{feed-id}.csv'; // Replace with your CSV URL
Logger.log('Starting script...');
Logger.log('Downloading CSV from URL: ' + csvUrl);
try {
var csvData = downloadAndParseCsv(csvUrl);
if (csvData && csvData.length > 0) {
Logger.log('CSV downloaded and parsed successfully.');
Logger.log('Creating ad labels from CSV data...');
createAdLabelsFromCsvData(csvData);
Logger.log('Ad labels creation process completed.');
} else {
Logger.log('No valid data found in the CSV file.');
}
} catch (error) {
Logger.log('Error during script execution: ' + error.message);
}
Logger.log('Script completed.');
}
function downloadAndParseCsv(csvUrl) {
var options = {
method: 'GET',
muteHttpExceptions: true
};
try {
var response = UrlFetchApp.fetch(csvUrl, options);
if (response.getResponseCode() !== 200) {
Logger.log('Error fetching the CSV file: ' + response.getResponseCode());
return null;
}
Logger.log('CSV file fetched successfully.');
var csvContent = response.getContentText();
var csvData = Utilities.parseCsv(csvContent);
if (csvData.length <= 1) {
Logger.log('CSV file is empty or contains only headers.');
return null;
}
// Return only label names assuming there's a single column
var labelNames = csvData.slice(1).map(function(row) {
return row[0];
});
return labelNames;
} catch (error) {
Logger.log('Error fetching or parsing CSV: ' + error.message);
return null;
}
}
function createAdLabelsFromCsvData(csvData) {
Logger.log('Fetching existing labels...');
var existingLabels = fetchExistingLabels();
for (var i = 0; i < csvData.length; i++) {
var labelName = csvData[i];
if (!existingLabels[labelName]) {
createLabel(labelName);
} else {
Logger.log('Label "' + labelName + '" already exists.');
}
}
}
function fetchExistingLabels() {
var labels = {};
var labelIterator = AdsApp.labels().get();
while (labelIterator.hasNext()) {
var label = labelIterator.next();
labels[label.getName()] = true;
}
return labels;
}
function createLabel(labelName) {
try {
Logger.log('Creating label: ' + labelName);
AdsApp.createLabel(labelName, 'Created by Dynamic Channable Label script'); // Use 'AdsApp.createLabel(labelName);' if you dont need the description.
Logger.log('Label "' + labelName + '" created successfully.');
} catch (error) {
Logger.log('Error creating label "' + labelName + '": ' + error.message);
}
}Final thoughts
Unfortunately, there is no simple way (yet) to make this Ads script proactive because Channable refreshes feeds and text generators simultaneously. As a result, new labels are added to the CSV feed during the first Channable run, but the Text Ads Generators can only link them to the ads after the Ads script has run, which happens during the next run.
You can speed this up by manually refreshing the Channable imports and CSV feed, and then running the Ads script before the entire project with all text generators is refreshed, but this still involves quite a bit of manual work.
Hopefully, Channable will soon release an update for this feature, where they create the labels during the same run in which they are linked to the Ads, making this script unnecessary.
Until then, this Dynamic Channable Ads Label Creator Script offers a solution.

