Best answer

Reschedule appointment in Acuity

  • 13 October 2020
  • 2 replies
  • 202 views

Userlevel 1

Hi,

I am using zapier to integrate with monday. When an appointment is reschedule via acuity i want that the new date and the time to be updated in monday.

With the reschedule possibility in zapier now is the update one specific appointment. How can i do an integration that is automatically looks which item it should update?

In zapier when i use the reschedule option in zapier , only the specific item /id in that workflow is being updated. No new one will be updated.

Marwin

icon

Best answer by BowTieBots 13 October 2020, 18:43

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 4
Badge +4

Hi @Marwin Martina,

What you want to do is possible but it requires some advanced Zapier setup. 

To change a specific value in Monday.com you need to know the “board_id”, “item_id”, and “column_id” which can only be found using a Zapier code step.

 

The basics are:

  1. Trigger off of Acuity Reschedule
  2. Use a code step to search for the item_id and column_id
    1. You will need a term you can use for the search that is unique.  Something like email works well
  3. “Update Item Date Column Value” which takes the item_id and column_id form step 2 to insert the new date and time

Here is the basic code.  You will need to put in your own API_Key and boardId values and make sure you use an “email” column to store the persons email.

 

const API_KEY = "xxxxxxxx",
boardId = 0000000;

const sendRequest = async (payload) => {
const response = await fetch("https://api.monday.com/v2/", {
method: "POST",
body: JSON.stringify(payload),
headers: {
"content-type": "application/json",
authorization: API_KEY,
},
});

const results = await response.json();

return results;
};

const getItem = async () => {
const query = `
query {
items_by_column_values (board_id: ${boardId}, column_id: "email", column_value: "${inputData.email}") {
id
name
}
}`;

const response = await sendRequest({
query,
});

const results = response.data['items_by_column_values'][0].id;

return results;
};


const response = await getItem();


output = {
id: response
};

 

Userlevel 1

Thank you