I'm missing a piece between HubL and HubAPI.. :)SOLVE
Nov 6, 2019 10:17 AM - edited Nov 6, 2019 10:24 AM
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 🙂 ).
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....
Solved! Go to Solution.
Nov 12, 2019 12:27 PM
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 ScanlanHubSpot Developer Support