steampipe plugin install hubspot

Table: hubspot_blog_post - Query HubSpot Blog Posts using SQL

HubSpot's Blog Post feature is a part of its broader content management system, allowing users to create, manage, and analyze blog content. It offers a platform for publishing rich, SEO-optimized content to engage audiences and drive traffic. Blog Posts in HubSpot are an essential tool for inbound marketing strategies, offering features like scheduling, analytics, and integrated CTAs.

Table Usage Guide

The hubspot_blog_post table provides insights into the blog posts within HubSpot's content management system. As a content manager or marketing analyst, explore post-specific details through this table, including content, performance, and associated metadata. Utilize it to uncover information about posts, such as their SEO performance, engagement metrics, and the effectiveness of integrated CTAs.

Examples

Basic info

Explore the status and details of blog posts in your Hubspot account. This query can help you understand the distribution of your content, identify who's producing it, and when it's being published.

select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post;
select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post;

List all published blog posts

Explore all the blog posts that are currently live to understand the range of topics and authors contributing to your content. This can help in assessing the diversity of your content and identifying any gaps that need to be filled.

select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post
where
currently_published;
select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post
where
currently_published = 1;

List all archived blog posts

Discover the segments that contain all your archived blog posts. This aids in understanding the range and history of content that is no longer actively promoted but may still hold value.

select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post
where
archived;
select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post
where
archived = 1;

List blog posts created by a specific author

Explore which blog posts have been crafted by a specific author to gain insights into their productivity and content focus. This can be beneficial for content management and planning, allowing you to identify popular topics and authors.

select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post
where
author_name = 'John Doe';
select
id,
title,
slug,
campaign,
state,
archived,
author_name,
publish_date
from
hubspot_blog_post
where
author_name = 'John Doe';

Get blog posts created by a specific owner

Explore blog posts authored by a specific individual to understand their contribution and publishing pattern. This can be particularly useful in content management scenarios, where tracking the work of specific authors is crucial for editorial oversight and planning.

select
p.id,
p.title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post as p,
hubspot_owner as o
where
created_by_id :: int = user_id
and o.first_name = 'john';
select
p.id,
p.title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post as p,
hubspot_owner as o
where
cast(created_by_id as integer) = user_id
and o.first_name = 'john';

List blog posts in a specific category

Discover the segments that fall under a particular category within your blog posts. This can help you understand the distribution of your content and strategize your future posts accordingly.

select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
category_id = 123;
select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
category_id = 123;

Explore the blog posts that have a featured image to understand the impact of visual content on reader engagement. This can be useful in enhancing your content strategy by focusing on posts that are more likely to attract and retain readers.

select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
use_featured_image;
select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
use_featured_image = 1;

List blog posts published in a specific campaign

Discover the segments that include blog posts published under a specific campaign. This can be useful for marketers aiming to analyze the performance of individual campaigns and their related content.

select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
campaign = 'CAMPAIGN123';
select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
campaign = 'CAMPAIGN123';

Get blog posts that have public access rules enabled

Discover the segments that have public access rules enabled, allowing you to pinpoint blog posts that are accessible to the general public. This can be useful in assessing the visibility and reach of your content.

select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
public_access_rules_enabled;
select
id,
title,
slug,
campaign,
state,
author_name,
publish_date
from
hubspot_blog_post
where
public_access_rules_enabled = 1;

Schema for hubspot_blog_post

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
ab_statustextThe AB status.
ab_test_idtextThe ID of the A/B test this Blog Post is associated with.
archivedboolean=Indicates whether the blog post is archived or not.
archived_in_dashboardbooleanIf true, the post will not show up in your dashboard, although the post could still be live.
attached_stylesheetsjsonbList of stylesheets to attach to this blog post. These stylesheets are attached to just this page.
author_nametextThe name of the user that updated this Blog Post.
blog_author_idtextThe ID of the Blog Author associated with this Blog Post.
campaigntextThe GUID of the marketing campaign this Blog Post is a part of.
category_idbigintID of the category.
content_group_idtextThe ID of the parent Blog this Blog Post is associated with.
content_type_categorybigintAn ENUM describing the type of this object. Should always be BLOG_POST.
createdtimestamp with time zoneThe timestamp when this Blog Post was created.
created_by_idtextThe ID of the user that created this Blog Post.
current_statetextA generated ENUM describing the current state of this Blog Post. Should always match the 'state' field.
currently_publishedbooleanIndicates whether the blog post is currently published or not.
deleted_attimestamp with time zoneThe timestamp when this Blog Post was deleted.
domaintextThe domain this Blog Post will resolve to. If null, the Blog Post will default to the domain of the ParentBlog.
dynamic_page_data_source_idtextThe ID of the dynamic data source for the page.
dynamic_page_data_source_typebigintThe type of dynamic data source for the page.
enable_domain_stylesheetsbooleanBoolean to determine whether or not to apply the styles from the template.
enable_google_amp_output_overridebooleanBoolean to allow overriding the AMP settings for the blog.
enable_layout_stylesheetsbooleanBoolean to determine whether or not to apply the styles from the template.
featured_imagetextThe featured image of this Blog Post.
featured_image_alt_texttextThe alt text of the featured image.
folder_idtextThe folder ID.
footer_htmltextCustom HTML for embed codes, javascript that should be placed before the </body> tag of the page.
head_htmltextCustom HTML for embed codes, javascript, etc. that goes in the <head> tag of the page.
html_titletextThe HTML title of this Blog Post.
idtext=The unique ID of the Blog Post.
include_default_custom_cssbooleanBoolean to determine whether or not to apply the Primary CSS Files.
languagetextThe explicitly defined ISO 639 language code of the Blog Post. If null, the Blog Post will default to the language of the ParentBlog.
layout_sectionsjsonbMap of layout sections for this Blog Post.
link_rel_canonical_urltextOptional override to set the URL to be used in the rel=canonical link tag on the page.
mab_experiment_idtextThe ID of the MAB (Multi-Armed Bandit) experiment this Blog Post is associated with.
meta_descriptiontextA description that goes in the <meta> tag on the page.
nametextThe internal name of the Blog Post.
page_expiry_datebigintThe expiry date of the page.
page_expiry_enabledbooleanIndicates whether the page expiry is enabled or not.
page_expiry_redirect_idbigintThe ID of the page to redirect to upon expiry.
page_expiry_redirect_urltextThe URL to redirect to upon expiry.
passwordtextSet this to create a password-protected page. Entering the password will be required to view the page.
post_bodytextThe HTML of the main post body.
post_summarytextThe summary of the blog post that will appear on the main listing page.
public_access_rulesjsonbRules for requiring member registration to access private content.
public_access_rules_enabledbooleanBoolean to determine whether or not to respect public access rules.
publish_datetimestamp with time zoneThe date and time the blog post is scheduled to be published.
publish_immediatelybooleanSet this to true if you want to be published immediately when the schedule publish endpoint is called, and to ignore the publish_date setting.
rss_bodytextThe contents of the RSS body for this Blog Post.
rss_summarytextThe contents of the RSS summary for this Blog Post.
slugtextThe path of the this blog post. This field is appended to the domain to construct the url of this post.
statetextAn ENUM describing the current state of this Blog Post.
tag_idsjsonbList of IDs for the tags associated with this Blog Post.
theme_settings_valuesjsonbMap of theme settings values for this Blog Post.
titletextTitle of the resource.
translated_from_idtextID of the primary blog post this object was translated from.
translationsjsonbMap of translations for this Blog Post.
updatedtimestamp with time zoneThe timestamp when this Blog Post was last updated.
updated_by_idtextThe ID of the user that updated this Blog Post.
urltextThe generated URL of this blog post.
use_featured_imagebooleanBoolean to determine if this post should use a featured image.
widget_containersjsonbA data structure containing the data for all the modules inside the containers for this post. This will only be populated if the page has widget containers.
widgetsjsonbA data structure containing the data for all the modules for this page.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- hubspot

You can pass the configuration to the command with the --config argument:

steampipe_export_hubspot --config '<your_config>' hubspot_blog_post