Adding event to Google Calendar from another form

Hi everyone!

I have added my Google Calendar as a data source, i´ve also created a UX form to add events to the Google Calendar.

I have another table called Events, with a form that has the same fields as the one for the GCalendar, plus some other fields such as image, phone, and some others which enrich the event. This table is displayed in the app with a card view (Events_card view).

So what I´m trying to do is either:

  1. Use an action to “add a new row to another table (GCalendar) using values from this row(Events_table)” when a new event is added, which seems the most straightforward, but it didnt quite work.
    I tried this and the action is performed correctly, an event is added to “Events_table”, but no data is added nor event created to GCalendar_table.

2.My other option would be to insert more columns to the GCalendar_table and use this data as an alternative to the “Events_card view”, but it seems not to be editable. Only VC columns are allowed, this way I cannot add data to enrich the event for my card_view.

Any ideas out there would be greatly appreciated!

Please provide screenshots of the Action definitions that you tried, including all expressions.

RE #2: you are correct, you cannot add real columns to a GCal source.

Thanks @Marc_Dillon,

Sure, here’s the screenshot for the action.
Most of the values are easy to copy since they are Text, or Address and therés not much formatting to do.

The one Im believing might be causing the problem is the Start Date/Time and End Date/time.
Im not sure which is the format Google needs to recognize those values.

I tried to:

  • Ensure your start/end dates/times value is in this format like this example: 20190127T224000Z/20190320T221500Z
    just as @Peter suggested in this post: Enabling app users to add Google Calendar events from your app but this didnt work.
    This is the formula used:
    concatenate(TEXT(YEAR([start date])&&MONTH([start date])&&DAY([start date])),“T”,
    TEXT(TIME([Time end]),“HHMMSS”),“Z”)

  • Also tried using concatenate([start date]," ",[start time]) in a Date/Time column but that didnt work either.
    I seem to get the same format that the events from the GCal table, but for some reason these are not created in that table.

BTW, Im not using DateTime type columns for Start/End Date/Times because in AppSheet there’s no dropdown generated to select dates and time, like with Date type columns or Time type columns and users have to type the date and time, which I believe can bring to mistakes.
Although Im getting the same format result with the CONCATENATE() formula shown above, so it should work.

I just double-checked the app where I’ve done this in the past, and I just directly copied a DateTime type column into each of Start and End.

I’d suggest temporarily changing your expression for both Start and End to NOW(), just to see if that gets the action to work and confirm what the issue is.

2 Likes

Thanks @Marc_Dillon , I did as you mentioned and it did create the event.
I looked in the data base for the format and then recreated it
going back to this formula:

concatenate([start date]," ",[start time]) in a Date/Time column

and now its working.

Im not sure why it wasn´t before. there might have been a typo…

2 Likes

Hi Guys!

Thank you for this post, I did exactly the same as Nicolas. I used the google calendar source and used it as a form to add cleaning tasks to my cleaning business, but after a couple of weeks our company realized we needed more info so we changed to another table and followed your details to have just the basics ( TITLE, START, END, DESCRIPTION) added to google calendar.

The issue is we cant seem to find out how to have the data automatically go into the google cal table. we keep having to manually press a button in another UX view to push the data to the google table.

Is there a way to have it so once we finish our Tasks form and send it will automatically update our tasks table and the google cal table?

Setup a “data: add new rows” Action, to run as the Form Saved event for the Form that you are saving.

1 Like

Hi Marc
thanks a lot for the quick reply, also I have done exactly what was previously written above and everything works perfectly but the only issue is that the data doesn’t go to “Business cal” (google) without me having to go into another UX view “tasks” deck view and manually press the action button to see it in google cal.

I’m sure it’s super simple but at the moment I haven’t been able to understand why it’s not automatically adding the data to Google.

again I appreciate the help

Did you do this part?

3 Likes

Perfect Marc!

Thank you! everything works

1 Like