DEV Community

Discussion on: 🔥 Chatfuel Image Gallery from Google Sheets with Google Apps Script

Collapse
 
rob_stuart_za profile image
Rob Stuart

Hi. Great post. I am really new to GAS and JSON in Chatfuel. I have the GAS in the google sheet linked to Chatfuel. I am not sure what is needed in Chatfuel to make it work. Does the code in the Google sheet automatically create the Gallery? I'm trying to use JSON and GAS to send and receive data between Google sheet and Chatfuel.

Collapse
 
nqcm profile image
TheNiqabiCoderMum

Hi Rob,
I am glad you liked the post. Yes the code in sheets script editor automatically creates the gallery. On the Chatfuel end you just need to use the JSOn block with the url of your web app.

Collapse
 
rob_stuart_za profile image
Rob Stuart

Wow thank you for the reply. So many of these boards you never hear from the authors. Keep it up. :) So something really weird. I followed the process above and then eventually replaced the code with your final code above. When testing the JSON link in Chatfuel I still get the "Hello World!" from the first section of building the code? No matter how many times I published or saved made no change.

I created a new sheet and pasted the final code first. Now it works. :) Thank for for the help.

Are there any other resources (yours or others) that I could use to link Google to Chatfuel?

So I started over this time copying the final code first publishing and linking the new URL to the JSON. This time when running a test JSON instead of the "Hello World!" I got the following:

Thread Thread
 
rob_stuart_za profile image
Rob Stuart

Okay this reply may help others where the Gallery is not displaying.

After inserting the final code in the GAS, the code must be published.... and here's the trick.... when publishing the GAS be sure to select "Project version" and select "NEW". This will publish the latest code in the script. If you don't do this the latest code is not published. Hope this helps all those where the gallery is not displayed. :)

Thread Thread
 
nqcm profile image
TheNiqabiCoderMum

100% correct! this is exactly what I wanted to suggest to your last comment.

Thread Thread
 
rob_stuart_za profile image
Rob Stuart

Is there anyway I can point the gallery to a block instead of a web URL? I'm trying to keep the user in the bot instead of pointing them away out of the bot?

Thread Thread
 
nqcm profile image
TheNiqabiCoderMum

If you go through the Chatfuel docs you will find the other options there, including redirecting to a block.