Tutorial: How to connect to the API via Zapier

In the following video, we will showcase how to connect DealMaker's API via Zapier.

Zapier is a third-party service that allows you to connect different services with a no-code or low-code approach.

After connecting the API to Zapier, you can integrate the data with other service providers like uploading the list of investors to a spreadsheet or pushing new investors or investor updates to Hubspot or other CRM services.

 

We are including the video's transcript for better understanding.

 

Transcript

0:00 In this demo I'm going to teach you how to set up a zap using Zapier that takes DealMaker webhooks as a trigger to make a call to DealMaker's API to retrieve information about a deal or investors that you have.

0:15 In Zapier, I've set up a test zap called Webhooks > API demo 

0:20 As a trigger I'm going to use webhooks by Zapier.

0:25 For a trigger event, I want to catch a hook.

0:31 Zapier is going to give me a webhook URL

0:34 This is the URL that I have to configure DealMaker to send webhooks to.

0:42 On DealMaker, I can see that I'm an admin or facilitator of a demo deal

0:48 To configure my webhook settings, I'm going to go to integrations and then navigate over to my webhook settings.

0:55 Here we can configure the destination for my webhooks.

0:59 I want this to match what Zapier has given me.

1:05 now that I've saved changes the webhooks for my demo deal are going to go to the destination set by Zapier

1:15 Now that my webhooks are going to the zap, I want to set up a new action to generate an access token.

1:23 To do this, I want to use webhooks by Zapier as the action once more, but this time I'm going to use a POST request because I'm generating an access token using my Dealmaker API application credentials as input.

1:44 Let's consult the dealmaker documentation to see how we can do this.

1:51 Under the authentication section, I see that I have to create a DealMaker API application first.

1:57 Let's head over to DealMaker to do that.

2:03 In DealMaker I can head over to my integrations again, but this time go to my API settings

2:08 Here I can create a new application, I can name the application and set its permissions.

2:15 In this case I'll give it read and write permissions.

2:22 When I set my permissions and click continue I'm going to be given a public key and a secret key.

2:28 The public key will remain there and I can access it whenever I want but the secret key is going to disappear as soon as I click out of this so I'm going to copy it to my clipboard for the next step.

2:45 Let's head back over to the documentation to see our next steps.

2:49 We're going to be making a call to the token endpoint to generate our access token.

2:53 To do this we have to pass a few parameters.

2:57 Let's head back over to Zapier to set up our next step.

3:02 We've got a POST request that we want to make to the DealMaker token endpoint.

3:06 But first let's fill out the body which is called data in Zapier.

3:17 Let's see what we need.

3:19 We want to set the grant_type to be equal to client_credentials.

3:30 Next we want to set our client_id and client_secret.

3:37 I've got the client_secret on my clipboard so I'm going to enter that first and then come back for the client_id.

3:55 Now let's get my client_id from the DealMaker API application.

4:13 The last step we have to enter our scope.

4:17 Because my application has the deals.read and deals.write scope, I'm going to enter that in the body of my API call.

4:38 The last thing we need to do is enter the token endpoint URL.

4:46 Now that we're good to go, let's see if we can generate an access token.

4:54 As you can see we've got an access token that we generated using the API application credentials. This is going to expire in an hour.

5:02 Every access token you generate last an hour.

5:05 In this case, I set the webhook as a trigger to reset the access token.

5:11 Every time I get a webhook I'm going to get a new access token with it.

5:18 Now we want to set up a step to get investor information.

5:26 We're going to use a custom request again, at this time we're going to use the GET method because we want to retrieve information

5:35 To get investor information I want to use the list deals investor endpoint.

5:44 This is going to list all the investors on my demo deal.

5:48 I'm going to use the code snippet to copy the endpoint URL.

5:55 The ID of the deal is a variable so I'm going to get the deal ID from DealMaker which you can see in the URL of your deal and I'm going to pass that to the zap to make sure that we're getting investors from the appropriate deal.

6:17 All we need in the header is our Authorization.

6:22 We have to use our access token as the Bearer, so I'm going to reference back to the step in the zap where we got the access token.

6:38 Let's see if we can get our deal investors.

6:44 Using this request we've listed out the investors from our demo deal.

6:49 By default, this endpoint is going to give us 25 investors per page.

6:53 You can customize this to be more or less investors and you can also customize the page count.

7:09 Finally, we can add another step to take this information and send it to a destination of our choice.

7:16 We can send this to Google Sheets or HubSpot or Salesforce or any other destination that Zapier is configured to work with.

7:30 I hope you found this demo helpful.