Question

firebase query for google calendar?

  • 2 August 2023
  • 3 replies
  • 21 views

Hey guys, im new to zapier and im trying to create a web app similar to calendly, so i have a database collection called events and inside it are individual events whose ID is randomly generated, each event will have its own summary etc. how do i write a query to get the event from the events collection?


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +14

Hi @webheadx9 

Good question.

Please clarify which app you are trying to query.

It will be helpful for us to have more specific examples and include screenshots.

Hi @webheadx9 

Good question.

Please clarify which app you are trying to query.

It will be helpful for us to have more specific examples and include screenshots.

Hi, this is the query i have right now and it does work but the time doesnt seem to work. so from my app, people can pick the date and time using a normal date picker and then i use :

 const startDateTime = new Date(`${startdate}T${starttime}`).toISOString();

    const endDateTime = new Date(`${enddate}T${endtime}`).toISOString();”

but the when the event gets added to the calendar, the time is always off, it will be set to random times instead.

 

{
"select": {
"fields": [
{ "fieldPath": "summary" },
{ "fieldPath": "startDateTime" },
{ "fieldPath": "endDateTime" },
{ "fieldPath": "location" },
{ "fieldPath": "description" },
{ "fieldPath": "attendees" }
]
},
"from": [
{ "collectionId": "events" }
],
"orderBy": [
{ "field": { "fieldPath": "summary" }, "direction": "ASCENDING" }
]
}

 

Userlevel 7
Badge +14

@webheadx9 

GCal help articles: https://zapier.com/apps/google-calendar/help

Is the event created on the wrong date, specifically with the month and day switched?

Regardless of the settings in your Google Calendar, data sent through their API (as Zapier does) must be in MM/DD/YYYY format. So, if you try to send an event for April 7, 2021 as 07/04/2021, Google Calendar will interpret that as July 4, 2021. The dates need to be in MM/DD/YYYY format to ensure Google Calendar adds the event to the correct date(s). If your trigger is sending the data in DD/MM format, you can use a Formatter step to reformat the date.