Update Google Sheet with Data when a pulse is made

Hi, Chris.

I tried your code.gs(from github) to my google spreadsheet.
However, this will not work, and the following warning statements will be displayed:

makeAPICall : Exception: Attribute with invalid value (Header:null) provided (‘code’ file, line 23)
getboards : TypeError: Cannot read property ‘getRange’ of null (‘code’ file, line 41)
getitems : TypeError: Cannot read property ‘getRange’ of null(‘code’ file, line 61)

I’m not a professional developer. Can you help me?

We’re still analyzing the possibility of supporting this in the future. In addition to the suggestions above, check this post out: Building a Google Sheets Integration

It does not solve the ideal two way sync functionality but it may help sync info inputted in Google Sheets on to monday.com.

Hi Enrique,

Not sure if you managed to pull the column values and separate them in columns but I did play with it for something I am working on today.

This is the code I used:
boards.forEach(function(elem){
var items = elem[‘items’];
for(i=0;i<items.length;i++){
sh.getRange(i+3, 1).setValue(items[i][“id”]);
sh.getRange(i+3, 2).setValue(items[i][“name”]);
for (j=0;j<11;j++){
sh.getRange(i+3, j+15).setValue(items[i][“column_values”][j][“value”]);
}
}
})
Note the i+3 refers to me starting in row 3, and j+15 has the column values starting in Column O (15). I then built nested replace formulas directly on the sheet to extract the details from each column value I wanted since it doesn’t go into the cell nice.

For example:
Status column value looked like this: {“index”:0,“post_id”:null,“changed_at”:“2020-04-20T19:24:01.777Z”}
It was in cell Q3. I put this formula in E3 to pull out the index alone:
=iferror(replace(replace(R3,1,find(":",R3)+1,""),find(",",replace(R3,1,find(":",R3)+1,""))-1,len(replace(R3,1,find(":",R3)+1,""))-find(",",replace(R3,1,find(":",R3)+1,""))+2,""))

Feel free to let me know if you need help or if you know of a better way to do this!

2 Likes

Has anyone had any luck here - all I need to do is export all of the fields in Monday.com to certain colums in Google sheets so that then we can import the information into deals in hubspot automatically

@Sam1 do you want this daily or based on a trigger?

The challenge is that not ALL column types are able to be read via the API in Monday. So depending on how you have your information in Monday set up what you are aiming for may not be possible automatically.

You can always export into excel then import that excel file into a Google sheet.

Except the export function always crashes!
Thanks for you help Chris, trying to get your script running now, I get this error:
Exception: Attribute provided with invalid value: Header:null

Hi @SHardham,

I’d love to help further. Feel free to send me the script you have in a message and I can see if I can see where the error may be. It’s hard to tell based on that message alone. Chances are it is something in the way you are sending the API call.

Hi @MelissaFox & @Julia-monday.com !

I’ve created a little app that does exactly this, it links a Monday Board with a Google Sheet, so you won’t have to keep updating both ends.

Just sing up here using your Monday account, and follow the instructions, if everything goes right, you’ll get a little link you need to copy and paste in your Google Sheet and that’s it, they’re now linked.

The app is free to use and you can create as many links as you want.

Here’s an example of a link I created with the app:

2 Likes

@Yoggie, I was having the same issue. Your solution is super-easy to use and a great tool! Thank you! Please don’t take it offline; I’m depending on it now. :slight_smile:

1 Like

Guess I’m somewhat late to the party, but hello and thank you @Yoggie, amazing that you came up with this!
However, it works for the more simple boards that we have, but for the largest and most complex boards I keep getting an error saying it can’t retrieve the URL. I’ve already tried adding more columns to the Google Sheet, but that doesn’t help. Any idea what could be causing this and/or how to solve the issue?

Hey Folks, I hope you are doing well. I was going through this thread and saw your comments and replies. I am building a tool to allow users to get data from Monday to Google Sheets automatically. The tool is called - nowstackit.com

We are still in beta and would love to get initial feedback on the product.

1 Like