Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Zoho Calendar #8144

Closed
wants to merge 27 commits into from
Closed

Conversation

murtajaziad
Copy link
Contributor

What does this PR do?

An app to integrate Zoho Calendar and Cal.com using the official Zoho Calendar API.

Fixes #5451

Environment: Staging(main branch)

Type of change

  • New feature (non-breaking change which adds functionality)

How should this be tested?

No automated tests are set up for this.
You can manually test the integration by following these steps:

  1. Link your Zoho account with your Cal.com account.
  2. Set your default calendar for creating the events to your Zoho Calendar.
  3. Book an event to try the integration.

Checklist

  • I haven't checked if my changes generate no new warnings
  • I haven't added tests that prove my fix is effective or that my feature works
  • I haven't checked if new and existing unit tests pass locally with my changes

/claim #5451

@murtajaziad murtajaziad requested a review from a team April 8, 2023 01:06
@vercel
Copy link

vercel bot commented Apr 8, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api 🔄 Building (Inspect) Jul 18, 2023 6:34pm
cal 🔄 Building (Inspect) Jul 18, 2023 6:34pm
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 18, 2023 6:34pm
web-staging 🔄 Building (Inspect) Jul 18, 2023 6:34pm

@vercel
Copy link

vercel bot commented Apr 8, 2023

@murtajaziad is attempting to deploy a commit to the cal-staging Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@hariombalhara
Copy link
Member

@murtajaziad Thanks for the PR !! I am wondering if #7182 added similar functionality already or not. Also, if it didn't would it make sense to add the functionality into that existing app.

@murtajaziad
Copy link
Contributor Author

@murtajaziad Thanks for the PR !! I am wondering if #7182 added similar functionality already or not. Also, if it didn't would it make sense to add the functionality into that existing app.

HI @hariombalhara, I have just checked #7182 and it doesn't include any Zoho Calendar functionality, it uses the events/meetings module that's provided by the CRM API. Also, Zoho Calendar and Zoho CRM are two different products that apparently don't overlap.

@hariombalhara
Copy link
Member

@PeerRich can you confirm if we want to do it in a separate app?

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Four Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/auth/setup 80.65 KB 313.77 KB 89.65% (🟡 +0.19%)
/event-types/[type] 382.03 KB 615.16 KB 175.76% (🟡 +0.18%)
/settings/admin/apps 164.21 KB 397.33 KB 113.52% (🟡 +0.14%)
/settings/admin/apps/[category] 164.2 KB 397.32 KB 113.52% (🟡 +0.14%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Four Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/auth/setup 80.65 KB 313.77 KB 89.65% (🟡 +0.19%)
/event-types/[type] 382.03 KB 615.16 KB 175.76% (🟡 +0.17%)
/settings/admin/apps 164.21 KB 397.34 KB 113.52% (🟡 +0.15%)
/settings/admin/apps/[category] 164.2 KB 397.32 KB 113.52% (🟡 +0.14%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2023

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

Four Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load % of Budget (350 KB)
/auth/setup 80.65 KB 313.77 KB 89.65% (🟡 +0.19%)
/event-types/[type] 382.03 KB 615.16 KB 175.76% (🟡 +0.17%)
/settings/admin/apps 164.21 KB 397.33 KB 113.52% (🟡 +0.14%)
/settings/admin/apps/[category] 164.2 KB 397.32 KB 113.52% (🟡 +0.14%)
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

The "Budget %" column shows what percentage of your performance budget the First Load total takes up. For example, if your budget was 100kb, and a given page's first load size was 10kb, it would be 10% of your budget. You can also see how much this has increased or decreased compared to the base branch of your PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. If you see "+/- <0.01%" it means that there was a change in bundle size, but it is a trivial enough amount that it can be ignored.

- /api/app-store/zohocalendar/ZCal1.jpg
---

Zoho Calendar is an online business calendar that makes scheduling easy for you. You can use it to stay on top of your schedule and also share calendars with your team to keep everyone on the same page.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sydwardrae @Jaibles Please review App description

@PeerRich PeerRich added the ✨ feature New feature or request label May 30, 2023
@PeerRich PeerRich added app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar Low priority Created by Linear-GitHub Sync labels Jun 6, 2023
@keithwillcode keithwillcode requested a review from a team June 8, 2023 14:35
@github-actions
Copy link
Contributor

github-actions bot commented Jun 22, 2023

Thank you for following the naming conventions! 🙏

@github-actions github-actions bot added the ❗️ .env changes contains changes to env variables label Jun 28, 2023
Copy link
Contributor

@alannnc alannnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some fixes.
Code looks good, we just missing if createEvent/updateEvent fails throw error so handleNewBooking stops.

Copy link
Contributor

@alannnc alannnc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some changes and I think it should be good to go now.
Leaving last approve to @hariombalhara

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-generated files shouldn't be committed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-generated files shouldn't be committed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-generated files shouldn't be committed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-generated files shouldn't be committed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this approach of adding instructions in the app package.

try {
const query = stringify({ eventdata: JSON.stringify(this.translateEvent(event)) });

const eventResponse = await this.fetcher(`/calendars/${calendarId}/events/${eventId}?${query}`, {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This endpoint requires an etag that we can get by first retrieving the event on the calendar. This is to ensure that the calendar event wasn't updated while this request is being made.

* @param event
* @returns
*/
async deleteEvent(uid: string, event: CalendarEvent, externalCalendarId?: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also getting a missing etag error for this method.

@keithwillcode
Copy link
Contributor

This PR is being closed due to inactivity. Please reopen if work is intended to be continued.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app-store area: app store, apps, calendar integrations, google calendar, outlook, lark, apple calendar ❗️ .env changes contains changes to env variables ✨ feature New feature or request Low priority Created by Linear-GitHub Sync
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[CAL-345] Integration with Zoho calendar
6 participants