Add a timestamp to a Google Spreadsheet

Updated 1 week ago by Fran

If you want to store in Google Spreadsheet, when a visitor started a conversation with your bot, here is how to do it.

Bear in mind that the time stamp, will based on the users browser time zone.

  1. Add the code snippet in the Welcome Message as in the picture:

Hello there! 
{html}<script>
const timeStamp = new Date();
Landbot.exec("landbot-custom-data", {"timestamp":timeStamp})
</script>{/html}
  1. In the Google Spreadsheet integration add the landbot variable @timestamp (as in the picture below) to the row in your Google Spreadsheet integration block.
  1. Once an input is done it will be displayed as follows in google spreadsheets:


How did we do?