Here is what our friend Gemini suggests for the Header HTML and I mostly agree 😀
Make sure you replace the values for the table ID and check if "exact" is the right filter for the hubdb_table_rows.
{% set hubdb_table_id = "your_table_id_or_name" %}
{% set column_to_match = "article_slug" %}
{% set column_with_meta_desc = "meta_description" %}
{# Fetch the specific row from the HubDB table where the slug matches the current article's slug #}
{% set hubdb_row = hubdb_table_rows(hubdb_table_id, "exact", column_to_match, content.slug) %}
{# Check if a matching row was found in the HubDB table #}
{% if hubdb_row %}
{# A row was found, so we use the meta description from that row #}
<meta name="description" content="{{ hubdb_row[0][column_with_meta_desc]|escape_html }}">
{% else %}
{# FALLBACK: If no row is found, use the default meta description from the article's settings, or a truncated summary #}
{% if content.meta_description %}
<meta name="description" content="{{ content.meta_description|escape_html }}">
{% elif content.post_summary %}
<meta name="description" content="{{ content.post_summary|striptags|truncate(160)|escape_html }}">
{% endif %}
{% endif %}
Your HubDB table would have 2 columns (Article Slug and Meta Description).
So if your article is www.website.com/knowledgebase/article-1 and your HubDB table has a row where the first column "Article Slug" is "article-1" it should pull the second column "Meta Description".
I am not sure again it will all work and if the "fallback" will work with pulling from the content.post_summary.
Goran Ilievski Senior Development and CRM Lead @ Synx
Not sure if possible but the only possibility I can think of is HubDB + Hubl/JS in the header.
Import your meta descriptions in a HubDB table then pull them into the template Header HTML. If you do succeed then probably best to keep managing net new via HubDB, which would not be the worst outcome.
Hope that helps.
Goran Ilievski Senior Development and CRM Lead @ Synx
Here is what our friend Gemini suggests for the Header HTML and I mostly agree 😀
Make sure you replace the values for the table ID and check if "exact" is the right filter for the hubdb_table_rows.
{% set hubdb_table_id = "your_table_id_or_name" %}
{% set column_to_match = "article_slug" %}
{% set column_with_meta_desc = "meta_description" %}
{# Fetch the specific row from the HubDB table where the slug matches the current article's slug #}
{% set hubdb_row = hubdb_table_rows(hubdb_table_id, "exact", column_to_match, content.slug) %}
{# Check if a matching row was found in the HubDB table #}
{% if hubdb_row %}
{# A row was found, so we use the meta description from that row #}
<meta name="description" content="{{ hubdb_row[0][column_with_meta_desc]|escape_html }}">
{% else %}
{# FALLBACK: If no row is found, use the default meta description from the article's settings, or a truncated summary #}
{% if content.meta_description %}
<meta name="description" content="{{ content.meta_description|escape_html }}">
{% elif content.post_summary %}
<meta name="description" content="{{ content.post_summary|striptags|truncate(160)|escape_html }}">
{% endif %}
{% endif %}
Your HubDB table would have 2 columns (Article Slug and Meta Description).
So if your article is www.website.com/knowledgebase/article-1 and your HubDB table has a row where the first column "Article Slug" is "article-1" it should pull the second column "Meta Description".
I am not sure again it will all work and if the "fallback" will work with pulling from the content.post_summary.
Goran Ilievski Senior Development and CRM Lead @ Synx
Mass-updating knowledge base article meta descriptions
SOLVE
Hey @ThomasSchädlich could you provide a link to the api you're looking at? To my knowledge there is no Knowledgebase api, but hopefully this has been updated!
If there is no api however it would also explain why make don't have an integration, because there's no way to do this.
We went through the same issue with a customer last year and unfortunately the only solution was to manually update every KB article, we couldn't set any meta info from the import, including language variants. So it was just a case of getting very organised and having a few of us sprint at it over the course of a day or so.
Tom Mahon Technical Consultant | Solutions Engineer | Community Champion Baskey Digitial