I'm missing a piece between HubL and HubAPI.. :)

SOLVE
New Contributor

Can I use the HubAPI from HubL?
Basicly I want to do this;
1: retrieve data from contacts database (done)
2: use the data retrieved to create a blog-post (challenge Smiley Happy ).
So I need;

- to get file data when contacts have uploaded e.g. a logo.

- make this file publicly available (copy?)
- insert formatted data into a new blog post

The blog post will be created by selected data from a form.
The blog posts is created when a logged in user is requesting a protected page.
We run a loop, checking if data is updated/new, and create/update the blog post.
This is where it stops..
I guess I through HubL should run a GET or POST request via the API, but I cannot find how to....

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
HubSpot Moderator

Hi @MrLeif,

 

It's not possible to make any customized HTTP requests through HubL. There are functions you can run, which are documented here: https://designers.hubspot.com/en/docs/hubl/hubl-supported-functions. But you can't for example make a custom POST request through HubL.

 

I'm not sure I fully understand what you're doing here. The data you're retrieving from your contacts exist in contact properties? If that's the case, could you build out an app using the Webhooks API: https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview ? You could listen for changes on contact properties, and when those changes occur, you can send the contact data to a URL. And from there you could build out the rest of your functionality?

 

Leland Scanlan

HubSpot Developer Support
Reply
0 Upvotes
2 Replies 2
Highlighted
HubSpot Moderator

Hi @MrLeif,

 

It's not possible to make any customized HTTP requests through HubL. There are functions you can run, which are documented here: https://designers.hubspot.com/en/docs/hubl/hubl-supported-functions. But you can't for example make a custom POST request through HubL.

 

I'm not sure I fully understand what you're doing here. The data you're retrieving from your contacts exist in contact properties? If that's the case, could you build out an app using the Webhooks API: https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview ? You could listen for changes on contact properties, and when those changes occur, you can send the contact data to a URL. And from there you could build out the rest of your functionality?

 

Leland Scanlan

HubSpot Developer Support
Reply
0 Upvotes
New Contributor

Hi Leland.

Thanks for your reply. I will use it as a part of my final product.

And yes: the data is stored as contact properties, updated via a form.

 

Reply
0 Upvotes