<p>I would say you would need to create a custom plugin and use <a href="http://developers.hubspot.com/docs/methods/workflows/webhook_information" rel="nofollow">Hubspot webhooks</a>.</p>

<p>Within this plugin you would have a controller method that, when you visit the action url, will take a response and convert it to an entry.</p>

<p>So for example if your plugin was called <code>hubspotentries</code>, you could have a controller <code>HubspotEntries_WebhookController.php</code></p>

<p>Then inside that:</p>

<pre><code>&lt;?php
namespace Craft;

class HubspotEntries_WebhookController extends BaseController {

 protected $allowAnonymous = true;


 public function actionSync()
 {

   // If the webhook POSTS to the action url, get the php input and decode it
   $webhook = json_decode(file_get_contents('php://input'), true);

   //....Go through webhook and save entries etc.

 }
}
</code></pre>

<p>Your action url would be something like <code>http://domain.com/actions/hubspotEntries/webhook/sync</code></p>

<p>You can then give this url to Hubspot and set up it so when an event occurs, they will POST or GET to this url and you'll be able to create the entries. I did something similar to this before (not hubspot but another service) and it works like a charm.</p>

<p><strong>Useful Craft Documentation links</strong>  </p>

<p><a href="http://buildwithcraft.com/docs/plugins/introduction" rel="nofollow">Plugin development introduction</a><br>
<a href="http://buildwithcraft.com/docs/plugins/controllers" rel="nofollow">Controllers in plugins</a></p>

<p><strong>Hubspot Help</strong>   </p>

<p><a href="http://help.hubspot.com/articles/KCS_Article/Workflows/How-do-I-use-webhooks-with-HubSpot-Workflows" rel="nofollow">How do I use webhooks with HubSpot Workflows</a></p>

<p>Hope that helps you get started!</p>

CC BY-SA 3.0
2015-08-19T18:40:33.717Z
Wow, thank you very much! You have been an awesome help here. Really appreciate it!
Matteo
CC BY-SA 3.0
2015-08-20T12:05:05.597Z
Not a problem :)
Alec Ritson
CC BY-SA 3.0
2015-08-18T08:58:38.990Z
2015-08-18T17:32:12.230Z
2015-08-18T17:32:12.230Z
Alec Ritson
<p>For a big client we are required to set up their blog on their Hubspot account. However we are developing everything else in Craft.</p>

<p>What is the easiest way to make the connection so the client can use Hubspot to post blog entries into our Craft site?</p>

<templating><entries><relations>
How to integrate with Hubspot
# How to integrate with Hubspot

(Asked by: username_0 on 2015-08-14)

For a big client we are required to set up their blog on their Hubspot account. However we are developing everything else in Craft.

What is the easiest way to make the connection so the client can use Hubspot to post blog entries into our Craft site?

**Tags:** templating, entries, relations

---

## 1 answers

### Answer by username_1 on 2015-08-18. Score: 5 | Accepted answer

I would say you would need to create a custom plugin and use Hubspot webhooks.
Within this plugin you would have a controller method that, when you visit the action url, will take a response and convert it to an entry.
So for example if your plugin was called hubspotentries, you could have a controller HubspotEntries_WebhookController.php
Then inside that:

Your action url would be something like http://domain.com/actions/hubspotEntries/webhook/sync
You can then give this url to Hubspot and set up it so when an event occurs, they will POST or GET to this url and you'll be able to create the entries. I did something similar to this before (not hubspot but another service) and it works like a charm.
Useful Craft Documentation links 
Plugin development introduction
Controllers in plugins
Hubspot Help 
How do I use webhooks with HubSpot Workflows
Hope that helps you get started!

> **Comments:**
> **username_0**: Wow, thank you very much! You have been an awesome help here. Really appreciate it!  
> **username_1**: Not a problem :)  

---

