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

Connecting to a board from Monday.com

chelseariver90
8 - Asteroid

Hi guys,

 

I've been looking around the internet but cant find the answer. Is there a way to use an input to get a table from a monday.com board? Something similar to the sharepoint connectors?

 

Thanks

 

13 REPLIES 13
BrandonB
Alteryx
Alteryx

Yep you absolutely can! While there isn't a connector for it, you can do it with the download tool by making an API call. I know this sounds a bit daunting at first, but once you get the hang of it, you will find that it is pretty easy. 

 

The first step is finding the API documentation for Monday.com which you can find here: https://monday.com/developers/v2 

 

Then you will notice that there is an authentication section. In order to make API calls to Monday you will need an API key. You can find instructions on how to get your API key here: https://monday.com/developers/v2#authentication-section 

 

Then, you will need a text input tool with the value https://api.monday.com/v2 in it. This is the endpoint that you will be using.

 

After that, you will want to connect a Download tool after the Text Input. Then you need to follow the examples here to determine what JSON you need to pass in the payload tab of the Download tool: https://monday.com/developers/v2#using-grpahql-section 

 

Monday.com also has a developer playground that might be helpful in determining what calls you need to make: https://monday.com/developers/v2/try-it-yourself 

 

 

 

Hopefully this is a helpful start. You can find more reading on API calls in Alteryx here: https://community.alteryx.com/t5/Engine-Works/REST-API-In-5-Minutes-No-Coding/ba-p/8137 

hakimrazali
5 - Atom

hello, I'm new to Alteryx. May I know how can we get/read the board's title from monday.com ?

BrandonB
Alteryx
Alteryx

Hi @hakimrazali 

 

It looks like they updated their API docs page to this: https://developer.monday.com/api-reference/docs 

 

If you are interested in board title information you would want to navigate to the information regarding the boards endpoint: https://developer.monday.com/api-reference/docs/boards 

 

This is an example cURL request to pull from boards:

 

curl --location --request POST 'https://api.monday.com/v2' \ --header 'Authorization: YourSuperSecretApiKey' \ --header 'Content-Type: application/json' \ --data-raw '{"query": "query { boards (ids: 12345678) { name state board_folder_id owner { id }}}"}'

 

This means that you would use a text input tool with a field called URL that has https://api.monday.com/v2 in it. You would follow this with a Download tool that is configured with Authorization and Content-Type in the headers tab with the values that you see above, your secret key and application/json for the content type. In the payload tab you would want to make sure that it is configured as a POST request. Then you will create the actual query to paste in the text box at the bottom of the payload tab, swapping out your board ID of course:

 

query { boards (ids: 12345678) { name state board_folder_id owner { id }}}

muhammadimranhakimi
6 - Meteoroid

Thanks for the discussion!

Jimrich88
6 - Meteoroid

Hi Brandon,

 

Do you have slightly more detailed instructions for configuring the Download tool?
I have a token from Monday.com but a little confused about the curl request string as well as the configuration of the Download tool. 

 

curl --location --request POST 'https://api.monday.com/v2' \ --header 'Authorization: YourSuperSecretApiKey' \ --header 'Content-Type: application/json' \ --data-raw '{"query": "query { boards (ids: 12345678) { name state board_folder_id owner { id }}}"}'

 

So the Token would replace YourSuperSecretApiKey ?

 

query { boards (ids: 12345678) { name state board_folder_id owner { id }}}

 

So the board id is fine, the second part - does this need editing? What's required for the  'name state board_folder_id owner' ? Or is this just generic?

 

Authorization and Content-Type - is this effectively Name and Value in the Headers tab?

 

Create the actual query to paste in the text box at the bottom of the payload tab, swapping out your board ID of course - is this pasted into the 'Use Following for Query String/Body' section of the Payload tab?

 

Thank you!!

BrandonB
Alteryx
Alteryx

So the Token would replace YourSuperSecretApiKey ? - Yes, this is correct. In the headers tab you can make Name Authorization and Value your key. 

 

You will also want a headers Name/Value paid that Name is Content-Type and Value is application/json.

 

query { boards (ids: 12345678) { name state board_folder_id owner { id }}}

So the board id is fine, the second part - does this need editing? What's required for the  'name state board_folder_id owner' ? Or is this just generic? - The boards ID corresponds with your actual board id. The other pieces are fields that the API will return data about the specified board. You can find more information about the fields that can be returned here: https://developer.monday.com/api-reference/docs/boards The Arguments (top section in that webpage) are more like filters to further cut down on the results returned in the query. 

 

Create the actual query to paste in the text box at the bottom of the payload tab, swapping out your board ID of course - is this pasted into the 'Use Following for Query String/Body' section of the Payload tab? - If you are just looking to hard code a query you can paste it in the "Use following for query string/body", but if you are looking to introduce values dynamically I would build the query in the formula tool which can pull values and then pass them into the download tool where you would use the "Take query string/body from field".  Also I don't believe you need the word "query" so try just using { boards (ids: 12345678) { name state board_folder_id owner { id }}}

 

I would recommend trying to hard code the query first to get it functional and then make it dynamic afterwards if you wish. 

Jimrich88
6 - Meteoroid

Awesome thanks very much Brandon. 

I did get it to work - I had to simplify the query...wondering if I was trying to query on too many of the board fields and values

BrandonB
Alteryx
Alteryx

That could be the case as some API endpoints either limit the maximum number of things that can be queried or sometimes there are combinations of different fields that aren't allowed.  It could also depend on the values you are passing as string vs number and what is surrounded by quotes. Some APIs are very picky about that. Glad you got it working!

Jimrich88
6 - Meteoroid

Hi Brandon, so I spoke too soon with this - the message I received after running suggested it was successful but no data was outputted.
I have since spent time trying it other ways for example I tried it in the command prompt and it initially didn't work until I changed the syntax to the following:

curl.exe -X POST -H "Content-Type:application/json" -H "Authorization: TOKEN" -d "{\"query\":\"query{boards(ids: XXXX){name}}\"}" "Monday API Link"

 

Just wondering now how to replicate this in Alteryx with the Download tool and/or the CMD Tool?

 

 

Labels