Board events through API

Hello,
we use Monday and Clockify and I am trying to automate the following processes (always from monday to Clockify) :

  • When a board is created -> create a client
  • When a group is created within a board -> create a project linked to client
  • When an item is created inside a group -> create a task in appropriate project

I tried with the following :

  • Zapier : but it has problems discriminating between board and sub-items creation (?)
  • Webhooks : has no way to handle board creation events
  • Integromat : works on a recurrence basis not on a per event basis, lacks some access to board properties and Clockify clients’ and projects’ properties

So i am considering making this through PHP and the API but i need to handle board creation event’s in order to avoid to parse all our boards structure every minute…
Any insight about where to start from ?

Hi @Contreforme, Sam

Welcome to the community. Interesting scenario’s you are requesting :slight_smile:

First of all: remember that the monday API key is a personal key. That means that if boards are created and the owner of the API key does not have access to the newly created board you will never be able to see that board through the API.

For board creation I would suggest an Integromat scenario that on regular intervals list all boards (that is: all boards visible to the owner of the API key) and put the boardids in an Integromat database. In the next run check if boards are already in the database and if not you have your trigger to continue (and add it to the database).

For group creation: you can do the same thing with the database (so store boardids and Group names in the same database

For the item creation: you can use a webhook into another Integromat scenario

Depending on your use case: wouldn’t it be possible to create a webhook on item creation only. So create your client and project late (when the first task is created inside a board)? To make sure your newly created board triggers the webhook you should be able to use my “board creation” solution from above and use the Integromat HTTP module to put the webhook in the board. This would require:

  • a Integromat scenario on regular intervals and a database, which creates your client, updates the database and update the board with by inserting a webhook (next Integromat)
  • second Integromat which listens to a webhook (create item) and then create the project (will fail if project already exist?) and create the task

Have fun :slight_smile:

Hi and thanks a lot for your insights !

You confirm what i was fearing, i didn’t wanted to rely on a cron like solution as it has two major drawback : first, it is most of the time a waste of ressources – we create rarely new boards but more often items or sub-items – and second, we need something reactive – if i create new board/client i want my team to be able to start working on it the next minute.

As Zapier has access to a “board created” event : where do they get it from ? Shall/can i develop my own integration plugin to have access to more events ?

Hi Sam,

I am not 100% sure but it looks like Zapier can watch for board creation as they are still using V1 API. Integromat can also do more with V1 than V2 and that is because V2 is not at the same level yet.

Personally I would not worry to poll every 15 minutes to see if there is are boards in the account that weren’t there 15 minutes ago. These kind op HTTP request are light by nature and it will not have a measurable effect on your performance experience. I do understand that it looks like waste but hey… ever analyzed what data is sent over to show a simpel “Hello World” webpage :slight_smile:.

Hi Basdebruin,

i know how it goes around the web indeed …But i am not this kind of coder anyway :stuck_out_tongue_winking_eye:

I have asked for a developer account explaining the problem : maybe i can develop a proper clockify integration plugin/app/whatever and meanwhile i will follow your advice and make a cron batch.

Thanks again for your Help !

So here’s what i did :

i have setup a webhook that calls a custom PHP page on item creation and walk its way up to create projects and clients if necessary. That was the cleanest way to go about it. I then store data in a MySQL table to avoid useless calls to the API.

I have come now to a secondary problem : When I parse boards through the API it returns sub-items as boards. Is there a way to filter sub-items ?

Here’s my query :

query {
    boards (board_kind:share) {
        id,
        name
    }
}