Goal: Consume external API (Printavo) and convert order details to board view in monday
Progress: I can retrieve our order information from Printavo using Node with below
import dotenv from "dotenv";
dotenv.config();
import express from "express";
import fetch from "node-fetch";
const app = express();
const port = 3000;
const secret = process.env.USE_SECRET;
const email = process.env.USE_EMAIL;
app.get("/orders", async (req, res) => {
console.log(`/orders endpoint called ${secret}`);
const url = `https://www.printavo.com/api/v1/orders?email=${email}token=${secret}`;
const options = {
method: "GET",
};
const response = await fetch(url, options)
.then((res) => res.json())
.catch((e) => {
console.error({
message: "oh noes",
error: e,
});
});
console.log("Response: ", response);
res.json(response);
});
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`);
});
My plan was to convert that response (orders) to an array of objects and create a new item in a board view. My question is - would it be possible to update an order status in Monday to send that data back to Printavo without something like Zapier?