visit
(Disclosure: The author is building Reshuffle)
Plus, by using the Monday interface that they’re already used to, marketers won’t have to deal with yet one more tool.Let’s say Marketing wants to continually add more customer case stories to the Customer Story web page. It’s a repeatable process and one that always contains the same content components (title, copy, image). You can give Marketing the autonomy they need to update this page themselves while staying within the parameters you set for the site.By creating a web page spreadsheet template in Monday.com that defines the components for the page, you can use Reshuffle’s connectors to integrate the spreadsheet to the website, and enable marketers to make updates in the spreadsheet that will automatically publish on the site. Marketers just need to fill in the component fields in the Monday spreadsheet and Reshuffle will publish it to the website!Reshuffle’s open source integration framework makes it easy. In this article, learn how to build a spreadsheet-powered website using Monday that lets people make changes to the website without the web team having to worry.const { Reshuffle } = require('reshuffle')
const { MondayConnector } = require('reshuffle-monday-connector')
const app = new Reshuffle()
const monday = new MondayConnector(app, {
Token: process.env.MONDAY_API_TOKEN
})
You can also specify your `baseURL` and your `webhooks` address in the connector - but the first will be understood from the API key (unless you have multiple sites), and the second defaults to `/webooks/monday`, which shouldn't conflict with any other addresses you're likely to have.
Next, we need to define the board and events we want to watch using the `on()` method, and our logic for what happens when we make a change. To find your boardId, go to your Monday board in your browser and copy it from the URL:
All of the Monday connector events Reshuffle supports can be found . In this example, we'll watch for a `CreateItem` event, and then log the response:
monday.on({ boardId: 895666799, type: 'CreateItem' }, (event, app) => {
console.log('Monday response:', event)
})
app.start();
To run this code locally in a development environment, we put the above code (only six lines!) in an `index.js` file, and, after using npm to install the necessary packages, run it using `node index.js`. Then, we set up a Monday webhooks URL. To do this, go to the Monday settings (by clicking on your avatar in the bottom left, again), and clicking on "Integrations". Search for Webhooks. You'll want to set up a new webhook using your development URL. For this test, we used , by installing it and then running `ngrok http 8000` in another terminal window, which is the same port as our Node instance above.
Monday response: {
userId: '17514907',
originalTriggerUuid: null,
boardId: '895666799',
groupId: 'topics',
itemId: '902429084',
pulseId: '902429084',
itemName: 'Toucan',
pulseName: 'Toucan',
columnId: undefined,
columnType: undefined,
columnTitle: undefined,
value: undefined,
previousValue: undefined,
changedAt: undefined,
isTopGroup: true,
type: 'CreateItem',
triggerTime: '2020-12-08T22:46:54.192Z',
subscriptionId: '29497386',
triggerUuid: 'a906a3fcd532060bcab0846b9e11e327'
}
monday.on({ boardId: 895666799, type: 'CreateItem' }, (event, app) => {
const { body } = await got.post('//yourcms.org/newBoardItem', {
json: event,
responseType: 'json'
})
console.log(body.data)
})
(Disclosure: The author is building Reshuffle)