cal/packages/app-store/zapier
Carina Wollendorfer 6483182ef6
add invite link to Zapier setup page (#2696)
* add invite link and toaster to zapier setup page

* create env variable for invite link and save in database

* fetch invite link form getStaticProps

* add getStaticPath method

* clean code

* Moves app setup and index page

* Moves Loader to ui

* Trying new way to handle dynamic app store pages

* Cleanup

* Update tailwind.config.js

* zapier invite link fixes

* Tests fixes

Co-authored-by: CarinaWolli <wollencarina@gmail.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: zomars <zomars@me.com>
2022-05-11 04:58:10 +00:00
..
api add invite link to Zapier setup page (#2696) 2022-05-11 04:58:10 +00:00
components add invite link to Zapier setup page (#2696) 2022-05-11 04:58:10 +00:00
pages/setup add invite link to Zapier setup page (#2696) 2022-05-11 04:58:10 +00:00
static Feat/zapier app (#2623) 2022-05-03 23:16:59 +00:00
_metadata.ts Feat/zapier app (#2623) 2022-05-03 23:16:59 +00:00
index.ts Feat/zapier app (#2623) 2022-05-03 23:16:59 +00:00
package.json Feat/zapier app (#2623) 2022-05-03 23:16:59 +00:00
README.md add invite link to Zapier setup page (#2696) 2022-05-11 04:58:10 +00:00
README.mdx add invite link to Zapier setup page (#2696) 2022-05-11 04:58:10 +00:00

Setting up Zapier Integration

If you run it on localhost, check out the additional information below.

  1. Create Zapier Account
  2. If not redirected to developer account, go to: Zapier Developer Account
  3. Click Start a Zapier Integration
  4. Create Integration
    • Name: Cal.com
    • Description: Cal.com is a scheduling infrastructure for absolutely everyone.
    • Intended Audience: Private
    • Role: choose whatever is appropriate
    • Category: Calendar

Authentication

  1. Go to Authentication, choose Api key and click save
  2. Click Add Fields
    • Key: apiKey
    • Check the box is this field required?
  3. Configure a Test
    • Test: GET <baseUrl>/api/integrations/zapier/listBookings
    • URL Params
      • apiKey: {{bundle.authData.apiKey}}
  4. Test your authentication —> First you have to install Zapier in the Cal.com App Store and generate an API key, use this API key to test your authentication (only zapier Api key works)

Triggers

Booking created, Booking rescheduled, Booking cancelled

Booking created

  1. Settings
    • Key: booking_created
    • Name: Booking created
    • Noun: Booking
    • Description: Triggers when a new booking is created
  2. API Configuration (apiKey is set automatically, leave it like it is):
    • Trigger Type: REST Hook
    • Subscribe: POST <baseUrl>/api/integrations/zapier/addSubscription
      • Request Body
        • subscriberUrl: {{bundle.targetUrl}}
        • triggerEvent: BOOKING_CREATED
    • Unsubscribe: DELETE <baseUrl>/api/integrations/zapier/deleteSubscription
      • URL Params (in addition to apiKey)
        • id: {{bundle.subscribeData.id}}
    • PerformList: GET <baseUrl>/api/integrations/zapier/listBookings
  3. Test your API request

Create the other two triggers (booking rescheduled, booking cancelled) exactly like this one, just use the appropriate naming (e.g. booking_rescheduled instead of booking_created)

The invite link can be found under under Manage → Sharing.

Localhost

Localhost urls can not be used as the base URL for api endpoints

Possible solution: using https://ngrok.com/

  1. Create Account
  2. Download gnork and start a tunnel to your running localhost
    • Use forwarding url as your baseUrl for the URL endpoints