Enabling app users to add Google Calendar events from your app

1X_951a825d9dfa360abaf8ff6f0fda7104784d2b22.png
With a few steps, you can create custom actions to add events to a Google Calendar:

Additional details are available here:

12 35 10.5K
35 REPLIES 35

may you do an sample app?

Can you edit the same event and update the google calendar. By update i mean it would delte the old event and create a new one

Hi Dan - if you’d like your app to manage events on a Google Calendar you manage, you can connect that calendar as a data source - that will be the best way to add/edit/update any events from your app. The action above is designed more for giving end app users easy ways to add content to their own individual calendars.

So the calendar is added as a static single event or it can be a subscription link where any calendar items are dynamic (can be modified by the app or deleted or new ones added)?

Google Calendars can be added as a data source connection, similar to a Google Sheet. Read/Write modifications can be made to events from the app or from the calendar - a few more details are available here https://help.appsheet.com/en/articles/962108-using-data-from-google-calendar

After adding and connecting to Google calendar as data source, the app will generate table with several field, and I found “Creator”.

I assume this is to fix who “create” the calendar event. So I added “useremail()” as initial value of this field. Then i create new event from Appsheet app.
Then open up Google calendar on browser. New event is added indeed, but the owner (creator?) of the app is still app make (creator) email address instead of specified email value within appsheet.

It looks like the Appsheet is not passing the email address value of “creator” field on the table to Google calendar api when new “event” is generated on Appsheet, although I m not perfectly sure.

@tsuji_koichi yes you are right. When you add Google Calendar as a data source, the “Editable?” field in the [Creator] column is disabled. So I don’t think you can change the Creator.

Thats strange.
On my app, creator field is editable.

I hope that’s the case! You shouldn’t be apply to assign calendar events to arbitrary people. That’d be a security nightmare.

That said, I wonder if it’d work if the app accessed the calendar as the app user rather than the app creator?

We added google calendar which is shared among the named users, those who are actually users of the Appsheet app. In that case, their is no concern over the seurity stuffs, I would say.

Even there is a gap, i.e. the appsheet app users and those who are able to the google calendar, for instance, the user who does not have access right to calendar but can access to the app, they create ver calendar event. Then the appsheet capture the email address of this users and add the event to G calendar. Google calendar shows the email address of the event creator. But this event creator unable to access to google calendar. (unless he or she gains the access to it.)

I dont see any security concerns on this scenario, as far as app creator acknoelwdge the appsheet app user can creat new event to google cal beforehands he/she share the app to the users.

Or if we put the email address of the user who does not have acccess to google calendar, it will automatically gave full access to google calendar? In that sense, yes, it may cause security issue.

I think this should 100% be the case for events created through AppSheet, or at least an option toggle. Just as it should read the email of the creator (assuming there is one) for anything added from a different source.

@Aleksi

When we add google calendar to app as data source, then Appsheet generate the table with column like this.

The defaul name of this table is called “Primary”

Apart from that, Appsheet is surely using Google Calendar API for this integration. Then I visited the documents - https://developers.google.com/calendar/v3/reference/events

I assumed “Creator” is a filed representing who generate/own the calendar event, but we have another key value of “Organizer” in API - key value to pass, but this “organizer” fileds is not populated in “Primary” table. I simply added “virtual column” withe field name of “organizer” and passed randam email value to it to create event, but it did not change result at all.
I m wondering whatif happen if Appsheet dev team add this “organizer” field as a part of “Primary” table and we pass email value we want? It possibly change the story, i.e .we are able to change the name (ID/Email) of event organizer from Appsheet?

{
“kind”: “calendar#event”,
“etag”: etag,
“id”: string,
“status”: string,
“htmlLink”: string,
“created”: datetime,
“updated”: datetime,
“summary”: string,
“description”: string,
“location”: string,
“colorId”: string,
> “creator”: {
> “id”: string,
> “email”: string,
> “displayName”: string,
> “self”: boolean
> },
> “organizer”: {
> “id”: string,
> “email”: string,
> “displayName”: string,
> “self”: boolean
> },
“start”: {
“date”: date,
“dateTime”: datetime,
“timeZone”: string
},
“end”: {
“date”: date,
“dateTime”: datetime,
“timeZone”: string
},
“endTimeUnspecified”: boolean,
“recurrence”: [
string
],
“recurringEventId”: string,
“originalStartTime”: {
“date”: date,
“dateTime”: datetime,
“timeZone”: string
},
“transparency”: string,
“visibility”: string,
“iCalUID”: string,
“sequence”: integer,
“attendees”: [
{
“id”: string,
“email”: string,
“displayName”: string,
“organizer”: boolean,
“self”: boolean,
“resource”: boolean,
“optional”: boolean,
“responseStatus”: string,
“comment”: string,
“additionalGuests”: integer
}
],
“attendeesOmitted”: boolean,
“extendedProperties”: {
“private”: {
(key): string
},
“shared”: {
(key): string
}
},
“hangoutLink”: string,
“conferenceData”: {
“createRequest”: {
“requestId”: string,
“conferenceSolutionKey”: {
“type”: string
},
“status”: {
“statusCode”: string
}
},
“entryPoints”: [
{
“entryPointType”: string,
“uri”: string,
“label”: string,
“pin”: string,
“accessCode”: string,
“meetingCode”: string,
“passcode”: string,
“password”: string
}
],
“conferenceSolution”: {
“key”: {
“type”: string
},
“name”: string,
“iconUri”: string
},
“conferenceId”: string,
“signature”: string,
“notes”: string,
“gadget”: {
“type”: string,
“title”: string,
“link”: string,
“iconLink”: string,
“width”: integer,
“height”: integer,
“display”: string,
“preferences”: {
(key): string
}
},
“anyoneCanAddSelf”: boolean,
“guestsCanInviteOthers”: boolean,
“guestsCanModify”: boolean,
“guestsCanSeeOtherGuests”: boolean,
“privateCopy”: boolean,
“locked”: boolean,
“reminders”: {
“useDefault”: boolean,
“overrides”: [
{
“method”: string,
“minutes”: integer
}
]
},
“source”: {
“url”: string,
“title”: string
},
“attachments”: [
{
“fileUrl”: string,
“title”: string,
“mimeType”: string,
“iconLink”: string,
“fileId”: string
}
]
}

@tsuji_koichi were you able to find any solution for the same?? I need to display the user Google Cal for my application which allows my users to schedule the call based on their availability. So they want to see their own can in the application.

But if your data is not in the google calendar. Meaning your data is separate, it cannot continiously sync to the google calendar, it can just transfer the information into the google calendar DATA one time?

Can you elaborate on your situation a little more? I’m entirely unclear on what you’re trying to do.

Sure. I will do my best. I have a table called Jobs. It is essentially and form where you input name, addresses, phone number, email, job notes, job date, lead or booked job. I have a google calendar in appsheet called Appsheet Test Calendar. If I enter the information in table Jobs… i need that information to flow to the Appsheet Test Calendar. This works. The issue is what happens when a client switches their move date OR updates job notes. I would make those changes in the table Jobs. How does that information update in the Appsheet Test Calendar automatically

I would think you’d need to use actions to accomplish this.

How do you accomplish this?

*a from

Yes you can enable it but I think it’s not possible to change the Creator.

I actually have sent query to support@appsheet.com and waiting for response.

Will share here what I will find.

Hello there, will it be possible to add more columns to the default columns which already created when adding google calendar as a data source. Thank you

Hi @Pathmanesan_Pirakash actually you can only add virtual columns.

Can anyone confirm whether this still works?

I get the following error;

Expression ‘https://www.google.com/calendar/render?action=TEMPLATE&text=[Event Name]&dates=[Dates/Times]&details=[Details]&location=[Address]&sf=true&output=xml’ could not be parsed due to exception: Unrecognized token: text.

I don’t know if the URL you’re trying to use is any good, but to construct it within AppSheet with an expression, try this:

CONCATENATE(
  "https://www.google.com/calendar/render?action=TEMPLATE&text=",
  ENCODEURL([Event Name]),
  "&dates=",
  ENCODEURL([Dates/Times]),
  "&details=",
  ENCODEURL([Details]),
  "&location=",
  ENCODEURL([Address]),
  "&sf=true&output=xml"
)

See also:


Hello Steve, first thank you for the help provided.

I have used this expression and it works correctly, but I have a question since when importing the data to the calendar in the “details” field the text is entered in a single string, is there any way to organize the text as shown below continuation

Thank you very much for your help.

You will need to insert in HTML new line tags - <br>.

For example this URL &details code:

3X_4_1_411763d5e27f2f0ddecb31096795f049bc1d0f28.png

looks like this in the Details pane of a Google calendar event form:

3X_a_e_ae4ff9be50043fc5315b64fc4f85ed3956a97a07.png

Thank you very much WillowMobileSystems thought that this was not supported by Appsheet but it is incredible to know that you can put HTML tags

Now it works correctly

Thank you very much

Thank you so much @WillowMobileSystems for the HTML tip.
I learned that this is possible also when you create new calendar entries via LINKTOFORM().

Hello Fabián, first thank you very much for your comment, could you please give more details about how you have connected the google calendar through LINKTOFORM?

Hi @d_alvarez sorry for my late response. This is very simple. You can use LINKTOFORM() for your google Calendar source just like for every other table.
Have a look on this example:
https://www.appsheet.com/samples/This-app-shows-how-to-link-to-a-form-and-fill-in-default-values?app...

Great tip! Thanks, @WillowMobileSystems.

I’m finally putting some work into my own calendar app and have started using it instead of the GCal website. This will come in handy.

Steve, thanks for the tips. I was able to implement this in my app today.

Can someone give us an exemple app please.
thanks

Hi, no responses on this for a while but maybe some will see this. The scenario I’m trying to accomplish is basically add my appsheet calendar view to google calendar. Like if appsheet calendar had a url, I could easily add it in google calendar. Basically same way the Vrbo allows me to export to google calendar and this keeps them in sync. My data source for my app is a google spreadsheet. Ya, I have it synced up with google calendar but it’s not very good way to do it in my opinion. I basically have appsheet pulling data from the spreadsheet and I have spreadsheet pushing and pulling data to google calendar with app scripts. Any ideas?

@peterdykstra is there a way to include a google meet link using this approach?

Top Labels in this Space