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_datefrom hubspot_blog_post;
select id, title, slug, campaign, state, archived, author_name, publish_datefrom 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_datefrom hubspot_blog_postwhere currently_published;
select id, title, slug, campaign, state, archived, author_name, publish_datefrom hubspot_blog_postwhere 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_datefrom hubspot_blog_postwhere archived;
select id, title, slug, campaign, state, archived, author_name, publish_datefrom hubspot_blog_postwhere 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_datefrom hubspot_blog_postwhere author_name = 'John Doe';
select id, title, slug, campaign, state, archived, author_name, publish_datefrom hubspot_blog_postwhere 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_datefrom hubspot_blog_post as p, hubspot_owner as owhere created_by_id :: int = user_id and o.first_name = 'john';
select p.id, p.title, slug, campaign, state, author_name, publish_datefrom hubspot_blog_post as p, hubspot_owner as owhere 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_datefrom hubspot_blog_postwhere category_id = 123;
select id, title, slug, campaign, state, author_name, publish_datefrom hubspot_blog_postwhere category_id = 123;
List blog posts that have a featured image
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_datefrom hubspot_blog_postwhere use_featured_image;
select id, title, slug, campaign, state, author_name, publish_datefrom hubspot_blog_postwhere 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_datefrom hubspot_blog_postwhere campaign = 'CAMPAIGN123';
select id, title, slug, campaign, state, author_name, publish_datefrom hubspot_blog_postwhere 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_datefrom hubspot_blog_postwhere public_access_rules_enabled;
select id, title, slug, campaign, state, author_name, publish_datefrom hubspot_blog_postwhere public_access_rules_enabled = 1;
Schema for hubspot_blog_post
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form, e.g. connection_name. | |
ab_status | text | The AB status. | |
ab_test_id | text | The ID of the A/B test this Blog Post is associated with. | |
archived | boolean | = | Indicates whether the blog post is archived or not. |
archived_in_dashboard | boolean | If true, the post will not show up in your dashboard, although the post could still be live. | |
attached_stylesheets | jsonb | List of stylesheets to attach to this blog post. These stylesheets are attached to just this page. | |
author_name | text | The name of the user that updated this Blog Post. | |
blog_author_id | text | The ID of the Blog Author associated with this Blog Post. | |
campaign | text | The GUID of the marketing campaign this Blog Post is a part of. | |
category_id | bigint | ID of the category. | |
content_group_id | text | The ID of the parent Blog this Blog Post is associated with. | |
content_type_category | bigint | An ENUM describing the type of this object. Should always be BLOG_POST. | |
created | timestamp with time zone | The timestamp when this Blog Post was created. | |
created_by_id | text | The ID of the user that created this Blog Post. | |
current_state | text | A generated ENUM describing the current state of this Blog Post. Should always match the 'state' field. | |
currently_published | boolean | Indicates whether the blog post is currently published or not. | |
deleted_at | timestamp with time zone | The timestamp when this Blog Post was deleted. | |
domain | text | The domain this Blog Post will resolve to. If null, the Blog Post will default to the domain of the ParentBlog. | |
dynamic_page_data_source_id | text | The ID of the dynamic data source for the page. | |
dynamic_page_data_source_type | bigint | The type of dynamic data source for the page. | |
enable_domain_stylesheets | boolean | Boolean to determine whether or not to apply the styles from the template. | |
enable_google_amp_output_override | boolean | Boolean to allow overriding the AMP settings for the blog. | |
enable_layout_stylesheets | boolean | Boolean to determine whether or not to apply the styles from the template. | |
featured_image | text | The featured image of this Blog Post. | |
featured_image_alt_text | text | The alt text of the featured image. | |
folder_id | text | The folder ID. | |
footer_html | text | Custom HTML for embed codes, javascript that should be placed before the </body> tag of the page. | |
head_html | text | Custom HTML for embed codes, javascript, etc. that goes in the <head> tag of the page. | |
html_title | text | The HTML title of this Blog Post. | |
id | text | = | The unique ID of the Blog Post. |
include_default_custom_css | boolean | Boolean to determine whether or not to apply the Primary CSS Files. | |
language | text | The explicitly defined ISO 639 language code of the Blog Post. If null, the Blog Post will default to the language of the ParentBlog. | |
layout_sections | jsonb | Map of layout sections for this Blog Post. | |
link_rel_canonical_url | text | Optional override to set the URL to be used in the rel=canonical link tag on the page. | |
mab_experiment_id | text | The ID of the MAB (Multi-Armed Bandit) experiment this Blog Post is associated with. | |
meta_description | text | A description that goes in the <meta> tag on the page. | |
name | text | The internal name of the Blog Post. | |
page_expiry_date | bigint | The expiry date of the page. | |
page_expiry_enabled | boolean | Indicates whether the page expiry is enabled or not. | |
page_expiry_redirect_id | bigint | The ID of the page to redirect to upon expiry. | |
page_expiry_redirect_url | text | The URL to redirect to upon expiry. | |
password | text | Set this to create a password-protected page. Entering the password will be required to view the page. | |
post_body | text | The HTML of the main post body. | |
post_summary | text | The summary of the blog post that will appear on the main listing page. | |
public_access_rules | jsonb | Rules for requiring member registration to access private content. | |
public_access_rules_enabled | boolean | Boolean to determine whether or not to respect public access rules. | |
publish_date | timestamp with time zone | The date and time the blog post is scheduled to be published. | |
publish_immediately | boolean | Set 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_body | text | The contents of the RSS body for this Blog Post. | |
rss_summary | text | The contents of the RSS summary for this Blog Post. | |
slug | text | The path of the this blog post. This field is appended to the domain to construct the url of this post. | |
state | text | An ENUM describing the current state of this Blog Post. | |
tag_ids | jsonb | List of IDs for the tags associated with this Blog Post. | |
theme_settings_values | jsonb | Map of theme settings values for this Blog Post. | |
title | text | Title of the resource. | |
translated_from_id | text | ID of the primary blog post this object was translated from. | |
translations | jsonb | Map of translations for this Blog Post. | |
updated | timestamp with time zone | The timestamp when this Blog Post was last updated. | |
updated_by_id | text | The ID of the user that updated this Blog Post. | |
url | text | The generated URL of this blog post. | |
use_featured_image | boolean | Boolean to determine if this post should use a featured image. | |
widget_containers | jsonb | A 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. | |
widgets | jsonb | A 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