Instantly Sync Google Sheets Changes to Your Botpr...
# 📖tutorials
f
[YouTube Video](

https://youtu.be/92RxMwY_8Og

) In this video, we dive into the process of setting up a watch for changes in Google Sheets and instantly updating those changes in your Botpress bot. We start with a simple Google Sheet, explore the use of the "Watch Changes" module, and guide you through the process of creating a webhook to sync changes. Key highlights of this tutorial include: -Setting up the "Watch Changes" module in Google Sheets. -Installing and configuring the necessary extensions for seamless integration. -Creating and configuring a webhook in Botpress for real-time updates. -Practical demonstration of updating data in Google Sheets and seeing the instant reflection in the Botpress bot. 🔗 Relevant Links: [Botpress Official Website](https://try.botpress.com/2n4syzzz1yyf) [Google Sheets docs](https://www.make.com/en/help/app/google-sheets#connectinginstant-triggers--perform-a-function-watch-changes-using-the-make-google-sheets-add-on) [All Make.com Tutorials](https://try.botpress.com/maketutorials)
q
I always make sure to brew some really good coffee before starting to watch your video tutorials. Can't settle for just any gas station coffee when learning from these gems 💎 I clicked the like button in advance 👍
c
Let's goooooo @fresh-fireman-491 !🔥
f
Always so nice!
w
This was great tutorial. How would one change the code to check and update all the rows and not just Answer?
f
You are not the first to ask me that 🙂 Was planning on testing that tonight and then coming out with a tutorial tonight or tomorrow
w
Looking forward to it. Thx!
f
I haven't found a good way of doing this to be honest. I am not sure how we can dynamically get a set amount of changes in the row value. It won't include changes made to more than 1 row right now. I got an idea, which would be to get the whole table once a change is made, and then delete everything in our Botpress table, and make new records with all of the new changes. Devmik got some tutorials on how to do this, so it won't be that hard. I just think that there must be another way of doing it, so we don't have to delete the whole table, which could include other stuff.
I will sleep on this, and come back tomorrow
Update: I just simply didn't turn "Map" on 🙂 Took a few hours, of trying every single module in Make, going through every tutorial done by made by @quick-musician-29561 about this topic, and then it hit me, I didn't have Map enabled. I learned a lot about other modules here in Make, so I would say that it was worth it. Just figuring the last part out, on how to update the specfic parts of the table now, but then it should be ready
I take it back 🙂 I am getting this { RowValues: [ { range: [Object], rowValues: [Object] } ] }
q
I can explore that as well soon when I update all my old Make.com tutorials to use your new methods and integration.
I've also spent countless hours debugging Make.com, for example with @best-army-74344 @cold-jewelry-54343
They might have solution to this, and also @flat-dawn-22973 @modern-honey-58818
Somehow with those guys, we have managed to fix all the issues. But new issues always seem to happen with Make.com after it works for a few weeks, even though we don't change anything. Like just now, I noticed Ramon's comments on an older Make.com tutorial. And as you said @fresh-fireman-491 "I learned a lot about other modules"—work like that is never wasted time.
f
That sounds fantastic!
If anyone wants to try, I can add them to the org
q
I was summoning all Make.com Superheroes 🦸🏽‍♂️ 🦾 🦸🏻‍♂️ 🐐 to these new Make.com tutorials, because in my opinion, topics related to automation are going to be some of the most valuable posts here.
Also, because I immediately noticed that we've seen the same error in our previous Make.com projects. When it comes to coding, my mind is like a steel trap; I never forget the insults console.error throws at me.
q
"to get the whole table once a change is made, and then delete everything in our Botpress table, and make new records with all of the new changes" I agree, that was the old way. And with your new tutorials (related YouTube video is really good! ⚡ ) using 'Watch Changes', there should be a better way.
f
I thought of doing it with deleting the whole table, but I would instead like to update just the changed parts. I just have to figure out some basic math now
I got great news 🙂 It works!
I am going over to my grandparents house to have dinner with them tonight, but I can probably do a walkthrough video when I get back.
That is the working code
Still a bit annoyed that we had to use in it the query string instead of body, but it works
It dynamically updates your table, with just what you added.
This code is not optimal for creating 2 changes at 2 different locations at the same time. Like making a change to just A2 and A8 at the same time. That is the next thing we should figure out
q
Yes, I was thinking the same. It should work with one change, or even if someone replaces the entire sheet with new values. I'm also testing these with your new ideas and scenarios.
In those old versions, Google Sheets module 'Get Range Values' did the trick for me; then ALL changes were instantly in the Botpress KB table also, no matter how many changes. So, adding that module after the first 'Watch Changes' module (if that is possible in this scenario as well).
f
hey guys! Thank you for your extremely valuable insight!! @fresh-fireman-491 , your video is so good
So in the end is there a way of updating multiple column values with make?
I'm kinda new to coding, so it would be incredibly helpful if you could help me in applying your code to my bot
f
Hey there, It should already sync all changes made in your Google sheet to your table, also changes done to multiple columns.
f
thank you so much! and which variables should I change from the code you sent? cause I guess they'll have a different name on my bot? As I said coding is not my greatest strength, sorry if the question seems dumb
f
I think you only need to change company and model, but I can check later today
f
thank you!
f
10 Views