Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Brandwatch connector

calloni
9 - Comet

Hello everyone

 

Does anyone have experience creating a connector using the Brandwatch API?

 

I would love to hear about that.

 

Thanks in advance

Rodrigo

13 REPLIES 13
dYoast
11 - Bolide

This article series may help.  See here

calloni
9 - Comet

Thanks, that's very helpful.

 

I hope someday Alteryx can provide some sort of training on building those tools... I am one that learns more by seeing others doing and replicating. Starting from scratch is a hassle.

 

Rodrigo

BrandonB
Alteryx
Alteryx

@calloni I drafted up an APIs for Beginners article that I'm hoping to have reviewed and published soon for the Alteryx Community that covers all different kinds of configurations and approaches. 

 

For Brandwatch, the first step is finding their API documentation which is located here: https://developers.brandwatch.com/docs/getting-started 

 

Within the documentation, you will see that it has an Authentication endpoint which you will want to use a download tool to do a POST request to the endpoint to return back a token: https://developers.brandwatch.com/docs/authenticate 

 

This token will then be used in the headers of a download tool for a subsequent call to the next API endpoint of your choosing. Hopefully that gets you started!

dYoast
11 - Bolide

@calloni , there is a recording of a training session called Intro to REST APIs

See here for the recording.

There is a sample workflow and pdf on that page.

 

FWIW, I used the recording sample and my specific API documentation to build a connection.

After finding the other item I posted, I was able to successfully make a connection and get data from the site.

I did learn that my data had multiple pages, so I had to create an iterative macro to get all the data.  That information is in the series.

 

One item to note is that after getting the authorization key, I had to concat the text "bearer" to the key so it would be in the format required for the API.

I think yours will be the same.

I did see that your API key is good for 1 year, so you could do 2 workflows - 1 for the key and the other for the data you want.

 

Below is a screenshot.  Maybe it will help.  I am getting a 401 Unathorized error at the moment, so I can't give more details.

 

dYoast_0-1630069470957.png

 

calloni
9 - Comet

Hi Brandon

 

Thanks for the reply. I saw the documentation and the video but I am finding a hard time to reproduce this curl command in downloads tool:

 

curl -X POST --data-urlencode 'password=[yourpassword]' \
'https://api.brandwatch.com/oauth/token?username=[your@username.com]&grant_type=api-password&client_i...'

 

I wanted to have a text input tool where I would put these varialbes:

 

- yourpassword

- your@username.com

- api-password

- brandwatch-api-client

 

But I don't even know where to put these:

 

--data-urlencode

'https://api.brandwatch.com/oauth/token?username=

 

Would it be possible to mock these up in a workflow and share it with me?

 

Thanks

Rodrigo

BrandonB
Alteryx
Alteryx

Can you give this a try? Put your email username in the text input where I have the dummy value and update the password in the Payload tab. If it is successful you should see a token return in the DownloadData column. I'm getting an auth error because I don't have Brandwatch credentials of my own. Workflow attached

 

brandwatch.png

dYoast
11 - Bolide

I am definitely NOT an expert.

 

@BrandonB , I think you have too much in the URL field.  The items after the question mark should be other fields.

@calloni , I tried to mock up some examples.  The query is for Total Mentions from the developers page.  None of these will successfully run until more information is provided to the fields.

 

Workflow:

dYoast_0-1630079376573.png

 

Text input with all fields for Authorization

dYoast_1-1630079435394.png

 

Manually entered fields for Authorization Payload

dYoast_2-1630079490773.png

 

Text input fields for Total Mentions query

dYoast_3-1630079549239.png

 

Payload for Total Mentions query

dYoast_4-1630079871377.png

 

calloni
9 - Comet

Ohhhh so I pick that URL and build it before sending to download tool.

 

I will work on this as soon as I get my credentials in Brandwatch

 

Thanks a bunch
Rodrigo

BrandonB
Alteryx
Alteryx

Let us know how it works! @dYoast, the parameters are actually added onto the URL so there is a good chance that both approaches work. Essentially when a URL is created the payload parameters get added onto the end. In any case, @calloni should give both a shot and see what works best

Labels