4bars / curly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overview

This is the "Quickstart Integration" example Monday app.
It can be used as a board recipe, which transforms data from one text column to another


This app demonstrates how to use:

  • integration recipe
  • custom action
  • call authentication with JWT
  • API
  • remote options for custom fields


You can find more info in our QuickStart guide here
Screenshot

Install

  1. Make sure you have Node (v10+) and npm installed

  2. Use the correct node version:

$ nvm use

3. Run node modules install:
$ npm install

Configure Monday App

Create new app and integration feature

  1. Open monday.com, login to your account and go to a "Developers" section.
  2. Create new "Integration Example App"
  3. Open "Features" section and create new "Integration" feature

Create new recipe and trigger

  1. Open "Recipes" tab
  2. Click "Add new recipe"
  3. Click "Choose trigger" and choose "When a column changes" trigger
  4. Type "When {text column, columnId} changes" in "Sentence" field
  5. Configure trigger input fields:
    boardId - Context
    columnId - Recipe Sentence (Text Column)
    Screenshot

Create new custom action

  1. Click "Choose action"
  2. Click "Create new action"
  3. Name your action "Transform text"
  4. Type in "Run URL" field: https://{NGROK_URL}/transformation/transform
    ** we will update {NGROK_URL} placeholder later, when we will bring up our local server
  5. Add the following input fields that our action will need in order to run:
    Board - boardId
    Item - itemId
    Column - sourceColumnId
    Column - targetColumnId
    Screenshot
  6. Click "Create action"

Configure action in the recipe

  1. Choose your custom action in the recipe
  2. Type “transform to {another column, targetColumnId}” in "Sentence" field
  3. Configure action input fields
    boardId - Trigger Output (boardId)
    itemId - Trigger Output (itemId)
    sourceColumnId - Trigger Output (columnId)
    targetColumnId - Recipe Sentence (Text column type)
    Screenshot 4.Click "Create Recipe" button

Run the project

  1. Add your MONDAY_SIGNING_SECRET and API_TOKEN to .env file
    ** To get your MONDAY_SIGNING_SECRET go to monday.com, open Developers section, open your app and find the Signing Secret in "Basic Information" section
    Screenshot
    ** To get your API_TOKEN go to monday.com, open Developers section and open "My tokens" tab
  2. Run the server with ngrok tunnel with the command:
$ npm start

3. Open http://localhost:4040/status to get your ngrok public url


4. Open custom action "Transform text" that we created before and update {NGROK_URL} part in "Run URL" field with the ngrok public url, that we just got
** Note that on every restart of the server, your ngrok url will change, so you need to change "Run URL" field in the action. If you want to actively change server-side code and restart the server, you can run npm run server and npm run expose in 2 different terminal windows

Add your recipe to the board

  1. Go to any board at monday.com (it should have at least 2 text columns) and add your new integration recipe to it
  2. Configure source and target columns in your recipe
  3. Update the value in the source column and in a few moments the target one will be update with the transformed text
  4. Enjoy your recipe!

About


Languages

Language:JavaScript 98.7%Language:Shell 1.3%