To setup your Hubspot app in Cobalt for OAuth, you will need the following credentials from your Hubspot developer account:

  • Client Id
  • Client Secret
  • Scopes

Required Settings

  • Mandatory Scopes
  1. oauth
  2. crm.objects.owners.read
If you do not already have a developer account, you would need to create one here.

Acquiring Hubspot client credentials

  1. Login to your Hubspot (developer account dashboard)[https://developers.hubspot.com/].
  2. Select Manage Apps, and choose from the applications that you’d like your end customers to install.
  3. Go to Basic info > Auth > Auth settings > App Credentials and acquire the Client Id and Client Secret.

Adding Redirect URL in the Hubspot developer app

While creating an installable app on a platform, the platform asks the developer to provide a redirect URL which it would be calling to send across the authorization code once a user installs the application.

Select Hubspot from Apps and copy the Callback URL provided in the app settings page. Under Auth > Auth Settings > Redirect URLs, paste the copied URL.

Setting up hubspot developer app

Configuring credentials in Cobalt

App settings page lets you configure the authentication settings for an OAuth2 based application. For your customers to provide you authorization to access their data, they would first need to install your application. This page lets you set up your application credentials.

Setting up application client credentials

Cobalt lets you use pre-configured applications to play around. You can do so by selecting Use our credentials. However, if you wish to use your own application, select Use your own credentials. Provide the aquired Client Id and Client secret and save it.

Configuring Scopes

Cobalt lets you configure what permissions to ask from your users while they install your application. The scopes can be added or removed from the App settings page, under Permissions & Scopes section.

For some applications Cobalt sets mandatory scopes which cannot be removed. Additional scopes can be selected from the drop down. Cobalt also has the provision to add any custom scopes supported by the respective platform.

OAuth Scopes

Once the scopes has been added to the application in Cobalt, go to your Hubspot (developer account dashboard)[https://developers.hubspot.com/] and update the scopes as added on Cobalt.

Go to Manage Apps > Basic info > Auth > Auth settings > Scopes, and add the scopes as added in Cobalt.

If you are facing scopes missing or invalid scope error. Make sure you are not passing any custom scope not supported by the platform. And, the scopes selected here are identical to the ones selected in the platform.

Hubspot single webhook URL

If you wish to create an orchestration where a workflow is being triggered when some operation occurs in Hubspot, you’d need to subscribe to Hubspot’s Webhook. Cobalt provides a single webhook URL to manage such event triggers for all your customers.

To setup Hubspot webhook subscription:

  1. Select Hubspot from the application list in Cobalt, and select Settings.
  2. Copy the Single Webhook Url
  3. Go to Manage Apps > Features > Webhooks in your Hubspot Developer Account dashboard
  4. Paste the Single Webhook Url inside the “Target URL” section

Existing Target URL cannot be updated when any of the subscriptions are active. Make sure to disable all subscriptions prior to updating the URL.

  1. Click on Create Subscription and add revelant events when you’d want to be notified.
Setting up hubspot target URL
  1. Click on the newly created subscription and Activate it to take effect.

Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using hubspot actions and triggers. Following are the set of Hubspot actions and triggers supported by Cobalt.

  • Actions

  • Triggers

  1. HTTP Request - Make HTTP API calls to any Hubspost documented REST APIs.
  2. Create Contact - Creates a contact in Hubspot
  3. Update Contact - Updates a contact in Hubspot
  4. Delete Contact - Deletes a contact in Hubspot
  5. Create Company - Creates a company in Hubspot
  6. Update Company - Updates a company in Hubspot
  7. Delete Company - Deletes a company in Hubspot
  8. Create Deal - Creates a deal in Hubspot
  9. Update Deal - Updates a deal in Hubspot
  10. Delete Deal - Deletes a deal in Hubspot
  11. Create Task - Creates a task in Hubspot
  12. Create Note - Creates a note in Hubspot
  13. Log Email - Creates a log email activity in Hubspot
  14. List Contacts - Lists all contacts in Hubspot CRM
  15. Get Contact By Id - Gets a contact by Hubspot contact id
  16. List Deals - List all deals in Hubspot CRM
  17. Get Deal By Id - Gets a deal by Hubspot deal id
  18. List Companies - Lists all companies in Hubspot CRM
  19. Get Company By Id - Gets a company by id
  20. List Tasks - Lists all tasks
  21. Get Task By Id - Gets a task by task id
  22. List Notes - Lists all notes
  23. List Emails - Lists all email activities
  24. Search Contact - Searches a hubspot contact object by query
  25. Search Company - Searches a hubspot company object by query
  26. Search Deal - Searches a hubspot deal object by query
  27. List Audit Logs - Lists all audit logs
  28. List Teams - Lists all teams
  29. Get Daily Usage - Gets user’s daily usage
  30. List Owners - Lists all owners of the Hubspot account
  31. Get User By Id - Gets a user by id
  32. Create Custom Contact Property - Creates a custom property in hubspot