Recommended api usage for this use case


#1

I want to do the following:

A user creates a db record on my app(external app, not hubpot app).
I want to trigger an email from Hubspot to the use by finding them in contacts via their email address.
I want to keep adding variations of the above for various records that are created and have all emails sent be recorded in the history of that contact.

Here is how I think I would use Hubspot for that:

  1. Set up workflows in hubpot for each email type i want to send.
  2. Create and event via timeline api - this would trigger the corresponding workflow.

It seems I should be able to do this via api key yet the timeline api docs say oauth token is required to create an event.

Is my usage of workflows and events the correct way to accomplish my goal and can I do this with the api key(the timeline api overview suggests this is possible: https://developers.hubspot.com/docs/methods/timeline/timeline-overview).


#2

@benjohnstonsf That sounds like a good plan to me. The Timeline API is a newer API and we are starting to transition away from Hapikeys as they are less secure then OAuth, You will have to set up a developer portal and create an app to use to create an OAuth access token to use that API.

https://app.hubspot.com/signup/developers/