Capture Order Date and Time on GSheet
# support
h
How would I go about having the assistant log the time a order was placed on a google sheet? Presently it provides incorrect days and times.
v
To help troubleshoot, could you let me know how your assistant is currently capturing and sending the order date and time to Google Sheets (e.g., is it using a specific variable, function, or integration step)? Source: - [Google Sheets Integration Documentation](https://docs.vapi.ai/tools/google-sheets)
c
Hi Hj95PYyyu, To get started with integrating your Vapi assistant with Google Sheets, follow these steps: 1. **Connect Google Sheets Account**: - Navigate to the Vapi Dashboard > Providers Keys > Tools Provider > Google Sheets - Click 'Connect' and authorize Vapi to access your Google Sheets 2. **Create and Configure the Sheets Tool**: - In the Dashboard, go to the Tools page and click 'Create Tool' - Select 'Google Sheets Add Row Tool' - Provide the necessary configuration: - `spreadsheetId`: Copy it from your sheet's URL - `range`: Specify as "Sheet1" or "Sheet1!A:Z" 3. **Add Tool to Assistant**: - Navigate to Dashboard > Assistants page - Select your assistant and go to the Tools tab - Choose the Google Sheets tool and publish changes For detailed setup, refer to the [Google Sheets Integration Guide](https://docs.vapi.ai/tools/google-sheets). Feel free to ask if you need more help with the configuration.
h
hi yes im connected. how do i record date and time of request in the row?
c
Please insert this code snippet anywhere into your assistant prompt to provide correct date and times. Modify the timezone as needed:
Copy code
The current date and time is {{"now" | date: "%A, %B %d, %Y, %I:%M %p", "America/Los_Angeles"}}

Do not use startTime and endTimes that are older than {{ "now" | date: "%s" | times: 1000 | tz: "America/Los_Angeles" }}
More information on this can be found on the documentation:
You can remove the last line of the code snippet if you want to actually use dates that are older than today's date. The main point is that the assistant needs to know the current date and time context otherwise it will default to when the model was trained on.