CMS Development

dcarter1
Mitglied

Can you use Hobspot CMS headlessly?

hey,

 

I want to use Hubspot as a headless CMS (with Gatsby.js or Next. js and a react front end) at the professional level subscription. Looking at the docs, this looks possible as the data is all exposed via an API, even though it perhaps hasn't really been designed for this. I just want to offer it as a quote option in an estimate I am doing, but wanted to check if there are any gotchas or considerations I might be missing. 

cheers

david

12 Antworten
aaylsworth
Teilnehmer/-in

Can you use Hobspot CMS headlessly?

A bit late to the party but, for anyone else looking for an answer on this, we recently used sveltekit as the frontend with hubspot forms as the "headless CMS" and also used some of the other CRM and CMS APIs eventually.

This was a really interesting project, once we figured out how to actually navigate the API docs for each situation (no small feat in itself), as we could start small with forms API and then branch out to other APIs as the client's business expanded.

Here's a short writeup we published about it for reference: Hubspot Forms with Cloudflare 

The article links to a repo which shows the implementation (simplified to not show our client's specific setup but still useful to get started)

Our big gotcha was the difficulty of working with the API docs. Seemed a bit unintuitive sometimes. But still worth it, given the business problem it solved.

Ntbrown
Mitwirkender/Mitwirkende

Can you use Hobspot CMS headlessly?

@dcarter1 Actually... In addition. I'll just go ahead and say no it's not possible because it'd a royal pain in the *** with no benefit as a service - ignoring the previous long winded explanation. 

 

Here's the real problem even if you're fine with all the above and a client is for whatever reason:

 

For an SSG to work.... effectively.... You need to have it continously spit stuff back out. HubSpot doesn't expose enough events that are useful for this.

 

Yes, they have te page events / blog apis etc. That's great for sourcing and hooking all this up in theory. But, they're not exposed in easy to use workflows or anything actually useful that would let you -> have users do free form editing -> SSG / JAMStack gets signaled -> new stuff gets spit out / build -> cool JAMStack app works great. Or, at least they're not to my knowledge... If they are well that's news to me and I have a lot of new stuff to build 🙂

 

So, goodluck making that work without re-inventing the wheel for something of no real benefit.

dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Can you use Hobspot CMS headlessly?

@Ntbrown 

"previous long winded explanation"

🙃

Don't stop being long winded.  I enjoy the reads

 

 

Ntbrown
Mitwirkender/Mitwirkende

Can you use Hobspot CMS headlessly?

@dennisedson Wait until people learn you can do basic regex ops with google fu. Almost like the internet is a compendium of knowledge or something.

 

Also, on that note when was the last itme hubspot's RE2 regex library from googel was updated.... It lists that it abides by it, but half the available syntactic options fail and yes - I mean the supported ones by RE2.

 

Granted I was doing an automated run of regex ops with unicode scripts so you may just have some blocklist that are historic. The unicode standard lists some as recommended / obsolete for library implementations but RE2 does include these so I doubt that's the source.

Regardless, should be clarified.

Ntbrown
Mitwirkender/Mitwirkende

Can you use Hobspot CMS headlessly?

dcarter1
Mitglied

Can you use Hobspot CMS headlessly?

Thanks. I looked at those already, thanks to the power of Google - the link that is relevant to my question (the second one) talks about Hubspot Blog.  That sounded like a subset of Hubspot CMS rather than the whole thing to me, but I can't find any references to the name Hubspot Blog I assumed it was a reference to the CMS Blog API which sits inside Hubspot CMS

Also, it doesn't really tell me much about if it has been attempted much or if its still up to date, after talking to hubpost themselves they said I should ask the community. I would be more interested to know issues or limitations there might be or how much of an untrodden path I would be taking, but given the replies and the fact I could find so little how to's on Google, it sounds like a not very well worn one and I'd need to reflect this in costings. Also, it possibly indicates it is not a particularly good idea (as the sales staff suggested, the CMS is more for marketing people than anything - whatever that means). 

Of course as you suggest, I could also write a plugin myself.

0 Upvotes
Ntbrown
Mitwirkender/Mitwirkende

Can you use Hobspot CMS headlessly?


@dcarter1 wrote:

That sounded like a subset of Hubspot CMS rather than the whole thing to me, but I can't find any references to the name Hubspot Blog I assumed it was a reference to the CMS Blog API which sits inside Hubspot CMS


Well yes.... and no.... The blog is cetainly a subset of the CMS. A CMS is just a management system and I'd certainly hope people could manage their blogs. Yes, there's an API which is precisely why there are plugins possible 🙂

 

Whenever people pipe these things through a JAMStack app / SSG they are typically doing so in a headless setting where content edtiors just come in and write things and have nothing else to worry about. A dev does the rest. So, it's a separation of concerns (which never really works imo, but anyways....) that people have back-filled into real / heavier CMS' like HubSpot, WordPress, etc since they expose an API (data stream) from which this sourcing can be performed.

 

Whether it's real REST APIs, GraphQL, or higher level meshes.

 


@dcarter1 wrote:

I could find so little how to's on Google, it sounds like a not very well worn one and I'd need to reflect this in costings. Also, it possibly indicates it is not a particularly good idea (as the sales staff suggested, the CMS is more for marketing people than anything - whatever that means). 


Right... but there aren't really "how tos" for this type of stuff. It's just a plugin. If you're a developer doing this... you don't need a how to you already have the dev chops to do so. And if you don't.... Don't try it not worth it.

 

Same process whether you are sourcing from contentful, strapi, or any other headless CMS.... or a real CMS with a data stream exposed. It's a generic process that is unchanging. Your only difference is maybe a different plugin piping things for the source and changing how the GraphQL /  querying of data within these posts is structured for them to be spitout via in a  SSG / JAMStack app. You just need to know if an API exists or not and if someone has already done the hard work for you (a plugin). If not comfortable with this.... then yes you may be giving yourself more overhead than you'd like.

 


@dcarter1 wrote:

now much of an untrodden path


Not an untrodden path... It's just that nobody uses HubSpot, because per this comment:

 


@dcarter1 wrote:

more for marketing people than anything - whatever that means


It's meant to be friendly for people to edit with user-friendly text-editors - marketers - who don't do anything technical.... So the most technical thing you get in HubSpot are workflow "automations" and half-baked themes / websites made by similar people. Very rarely, unless you're building an integraiton or custom app, do you do any semblance of real development in HubSpot.

 

So, in that sense maybe it's "untrodden", but not impossible.  You'd effectively being offering a service that says:

 

"Hey pay $$$$ a month for fancy editing priveleges you could just use a better headless CMS for, then pay me to build loads of extra tech on top of that, then maintenance fees and complications, hoting / extra dev to setup a JSx to display it via JAMStack for better metrics presumng I have the development chops to make that happen".

 

Not a great sale. A better sale would be "I can make a JSx app inside HubSpot"

0 Upvotes
dcarter1
Mitglied

Can you use Hobspot CMS headlessly?

Also, would the CMS be able to create custom page templates or even content modules that I could then expose to a plugin I made, rather than just pre defined blog posts et al? 

0 Upvotes
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Can you use Hobspot CMS headlessly?

Always thought you were a good googler @Ntbrown 😜
dennisedson
HubSpot-Produktteam
HubSpot-Produktteam

Can you use Hobspot CMS headlessly?

Hey @dcarter1 you should be able to do this 😀

Just be aware the CMS was not purpose built to specifically work in a headless fashion. We do however have a lot of APIs that can make it so someone determined to use it that way, could. 

There is this guy, @kierana, who is a great resource for things like this.  Maybe he has some opinions to offer 🤔

speedplane
Teilnehmer/-in

Can you use Hobspot CMS headlessly?

Hi Folks,

 

New to this thread. I've gone through all of Ntbrown's good commentary, but the question still remains open: is it possible to use Hubspot as a headless CMS?

 

From the discussion, the answer still seems to be "maybe". I don't think it's too hard to use it as a headless CMS, below are my general thoughts on how it can be done.

 

  • To be used as headless CMS, we simply need to be able to pull the content pages via API.
  • The Landing Pages API has an endpoint to retrieve a landing page content: https://developers.hubspot.com/docs/api/cms/pages
  • There is a field in there called "layoutSections", which apparently has the content of the page.
  • All we need to do is turn the layoutSections into HTML, and we'll have our landing page.
  • Challenge: Where is layoutSections documented? There does not seem to be any in the usual places.

 

This is just one possible way of making using Hubspot as a headless CMS, if there are others, I'm happy to hear about them.

0 Upvotes
SJaeger
Mitwirkender/Mitwirkende | Platinum Partner
Mitwirkender/Mitwirkende | Platinum Partner

Can you use Hobspot CMS headlessly?

hey speedplane,

 

layoutsections is not documented currently. But it seems to be very simple if you check the standard html output. there is a attribute called "cell". currently i made a proof of concept for a client. But the proof stoped because i cannot adept the smart-content rules

Nothing is impossible
0 Upvotes