Software AG webMethods.io Custom connector to Monday.com using Connector Builder App
Tags: integration, monday, connector, tutorial
Published: 2021-09-30 13:40:58

---
title: Software AG webMethods.io Custom connector to Monday.com using Connector Builder App
published: true
date: 2021-02-10 05:48:16 UTC
tags: #integration, #monday, #connector, #tutorial
canonical_url: https://tech.forums.softwareag.com/t/webmethods-io-custom-connector-to-monday-com-using-connector-builder-app/238771/1
---

## Introduction

**[webMethods.io](http://webMethods.io) Custom connector to [Monday.com](http://Monday.com) using Connector Builder App**

[webMethods.io](http://webMethods.io) Integration is an integration platform as a service (iPaaS) that lets you connect web apps, on-premises systems, and devices to create integrations and automate tasks.  
The Connector Builder app is a custom Node.js application that you build using a web application’s APIs. So, for example, if you have a private API or an API that is not in [webMethods.io](http://webMethods.io) Integration yet, you can create custom [webMethods.io](http://webMethods.io) Integration actions and triggers for those APIs. Once you have created these custom actions and triggers, you can use them like any other action on the [webMethods.io](http://webMethods.io) integration platform. Once you deploy the app on [webMethods.io](http://webMethods.io) Integration, it is validated by the [webMethods.io](http://webMethods.io) integration platform.  
You can then share this app with specific users or publish it to [webMethods.io](http://webMethods.io) Integration to make it available to all the users of [webMethods.io](http://webMethods.io) integration.

Please visit the below link to get more detailed information on [webMethods.io](http://webMethods.io)  
[Welcome - webMethods.io Integration](https://docs.webmethods.io/integration/starthere/home/)

### What is Monday.com?
Monday.com is a project management tool that enables organizations to manage tasks, projects, and teamwork. As of 2020, the company serves 100,000 organizations, including many non-technical organizations. In July 2019, the company raised $150 million, based on $1.9 billion valuation. Please visit https://monday.com/ for more information.
## Why integration with Monday.com?

- Enable webMethods as an Integration platform on [Monday.com](http://Monday.com) marketplace
- Reduced Opportunity Cost
- Partner with [Monday.com](http://Monday.com) to leverage mutual growth
- Integration to all systems which cannot be integrated with [Monday.com](http://Monday.com) directly including legacy applications, on-prem apps etc.

## How to Integrate with Monday.com?

Integration with [Monday.com](http://Monday.com) is enabled with the help of API’s provided by [Monday.com](http://Monday.com). [Monday.com](http://Monday.com) API is built on GraphQL and will give you a ton of flexibility for accessing and changing information in your [monday.com](http://monday.com/) account.

**What is GraphQL?**

GraphQL is an open-source data query language for APIs and a runtime for fulfilling queries with existing data. It provides an approach to developing web APIs and has been compared and contrasted with REST and other web service architectures. It allows clients to define the structure of the data required, and the same structure of the data is returned from the server, therefore preventing excessively large amounts of data from being returned. More information - [GraphQL - Wikipedia](https://en.wikipedia.org/wiki/GraphQL)

## Custom Connector Development

### Steps:

1. The app can be developed using any Node version between 8.14.2 and 10.14.2.  
If you have installed any other Node version, for example, v8.9.4 on your system, you can choose from one of the following options:  
Switch to one of the Node versions between 4.x.x and 8.14.x using tools such as node-windows, nvm, n, and run the app locally.  
For Windows, use:  
 nvm-windows  
 nodist
2. Install the connector builder package on your local machine. Refer to below link for instructions on how to build the custom connector - [Connector Builder - Node.js CLI - webMethods.io Integration](https://docs.webmethods.io/integration/developer_guide/connector_builder/)
3. **API Token from [Monday.com](http://Monday.com) for authentication**  
Any API request to [Monday.com](http://Monday.com) must be accompanied by an API token. Below steps guide to generate the  
API token from [Monday.com](http://Monday.com) account.
**API token for admins users**
To generate your API token: 
  1. Log into your [monday.com](http://monday.com) account.
  2. Click on your avatar in the bottom left corner.
  3. Select Admin.
  4. Select “API” on the left side of the admin page.
  5. Scroll down to the “API V2 Token” section and click “Generate”.
  6. Copy this token. This is what you should be looking at:
![image](https://aws1.discourse-cdn.com/techcommunity/original/2X/8/828fc33bbc9c5319cf882b0ef6c7161a983dae57.png)
**API token for non-admins users**
If you are not an admin of your [monday.com](http://monday.com) account, you can get your API tokens via the developer’s section, following these steps:
• Go to your avatar menu  
• Select “developers”  
• Click “My Tokens” in the top
You can use this API token to authenticate all your requests to our API, as well as in our testing environment. If you need to, you can regenerate the token at any time (causing the old one to expire).
4. **Accessing GraphQL API at [Monday.com](http://Monday.com)**
Users like to test things out before implementing them, so a query editor directly available in [Monday.com](http://Monday.com) platform! You can use this to try queries and mutations before implementing them in your application.  
Once you’ve opened the explorer page, enter your API token in this field:
![image](https://aws1.discourse-cdn.com/techcommunity/original/2X/e/e5f2c7aebb52bd8aaa29b1871c3ab33b65dbb106.png)
After supplying your token, you will enter our testing environment. The left pane of the explorer is where you enter your query or mutation, and when you press “Play” at the top left, the right pane will contain your results.
![image](https://aws1.discourse-cdn.com/techcommunity/original/2X/4/4ddb38c981cafe731a2b86df6553aed5160473f2.png)
You can also click the “Docs” button in the top right to access our documentation directly from the explorer.
5.**Sending Requests from [wM.IO](http://wM.IO) to [Monday.com](http://Monday.com)**
All requests to [Monday.com](http://Monday.com) server should be POST requests sent to **[api.monday.com/v2](http://api.monday.com/v2).** Be sure to use the **application/json** as content type, and pass your **API key** as an “Authorization” parameter in the headers:
```
 {"Content-Type" : "application/json","Authorization" : "xxxxx….xxxxxxx"}
```
The request body is where your query and variables are passed. It should look like this:
```
 {"query" : "...", "variables" : {"myVariable" : "foo", "yourVariable" : "bar"}}  

```
### Sample code for reading the board details from Monday.com
```
 const request = require('request');
 module.exports = {
 name: "fetchboard",
 title: "Fetch Board",
 description: "",
 version: "v1",
 input:{
 title: "Fetchboard",
 type: "object",
 properties: {
  "boardID":{
    "title": "Board ID",
    "type":"string",
    "lookup":{
      "id": "fetchboards"
    }
  }
  
}
},

output: {
title: "output",
type: "object",
properties: {
   }
},

mock_input:{
"api_key":"my api key"
},

execute: function(input, output){
// to access auth info use input.auth , eg: input.auth.username
// and to return output use output callback like this output(null, { 'notice' : 'successful'})
// your code here
request({
  "url":'https://api.monday.com/v2',
  "method": 'POST',
  "headers": {
      "Content-type": "application/json",
      "Authorization": input.auth.api_key
         },
  "body": JSON.stringify({"query": "{boards (ids: "+input.boardID+") {id name description state board_kind owner{id} groups{id title} items{id name updates{text_body}} }}"})
  
   
}, function (error,response, body) {

if (error) {
return output(error)

}
if (response.statusCode >= 200 && response.statusCode < 400) {
  output(null,{responseBody:JSON.parse(body)})}
  else {
    return output(body)
  };
}
)
} 
}

```
Multiple actions can be created for the [Monday.com](http://Monday.com) connector depending on the requirement. Below are the sample actions created as a part of POC.

| **Action** | **Description** |
| --- | --- |
| Fetch Board | Read the details of the board |
| Create Board | Create new board at [Monday.com](http://Monday.com) |
| Fetch Item/Items | Fetch individual item details as well as list of items under the board |
| Create Item | Create new item in the board |
| Delete Item | Delete the item in the board |
| Create Update on Item | Create an update on the item |
| Fetch Board Views | Read all the views configured for the board |
| Fetch Activities on Board | Read any new activities performed on the board |
| Fetch Group details | Read all the groups configured for the board. Also items available under each group. |
| **And much more can be implemented** |

## Sample Use Case:

### Automated backup of the Monday.com board and store the backup files in Google Drive

Backup of the board data from [Monday.com](http://Monday.com) will be taken at scheduled intervals. The data will be converted to CSV files and then store those backup files in Google drive. Below shows the recipe snapshot for the same.

![image](https://aws1.discourse-cdn.com/techcommunity/original/2X/5/5865e54dfc0c1df6ce6d07b01f9035900b2514f2.png)

Once data from [Monday.com](http://Monday.com) is stored in google drive, it can be further utilized for backup, analytics and much more.

[Read full topic](https://tech.forums.softwareag.com/t/webmethods-io-custom-connector-to-monday-com-using-connector-builder-app/238771/1)