Skip to content

Latest commit

 

History

History
82 lines (54 loc) · 4.39 KB

Setup-Interview-Workflow-Locally.md

File metadata and controls

82 lines (54 loc) · 4.39 KB

How to Setup Interview Workflow Locally

Interview scheduling functionality uses a third-party service https://www.nylas.com/. To be able to test interview scheduling locally you would have to create a Nylas account and properly config it.

1. Create a Nylas Account

Go to https://www.nylas.com/ and register a free account.

2. Create a new Nylas app

  1. Login to the Nylas Dashboard https://dashboard.nylas.com.

  2. On the left sidebar choose All ApplicationsCreate New App.

  3. Fill App Name and select Web for On which platform are you developing first?. Click Create Application

  4. After this your new app would be created.

  5. Now, choose your application in the left sidebar All Applications{Your App Name}. And then click App Setting in the left side bar.

  6. Find on the page Client ID and Client Secret. Add them to the .env file inside taas-apis folder:

    # .env
    
    NYLAS_CLIENT_ID={Client ID}
    NYLAS_CLIENT_SECRET={Client Secret}

3. Config Webhooks URL

  1. Make http://localhost:3000 available for everyone using public domain. For example using https://ngrok.com/:

    ngrok http 3000
    
    # output
    Forwarding                    https://XXXX-XXX-XXX-XXX-XXX.ngrok.io -> http://localhost:3000
  2. Add this public webhook base URL to the .env file inside taas-apis folder:

    # .env
    
    NYLAS_SCHEDULER_WEBHOOK_BASE_URL=https://XXXX-XXX-XXX-XXX-XXX.ngrok.io/api/v5
  3. Run TaaS API locally as per the main local setup guide.

    • If it was already run, then restart it to pick up NYLAS_SCHEDULER_WEBHOOK_BASE_URL env variable.
    • Make sure, that TaaS API is run on port 3000.
  4. Login to the Nylas Dashboard https://dashboard.nylas.com again and choose your application in the left sidebar All Applications{Your App Name}.

  5. Now choose Webhooks in the left sidebar. And then click Create Webhook button.

  6. Fill Callback URL as https://XXXX-XXX-XXX-XXX-XXX.ngrok.io/api/v5/taas-teams/nylas-webhooks (use domain name generated by ngrok) and select event.created, event.updated and event.deleted triggers. You may also just set Select All checkbox to select all triggers.

  7. Now click Create Webhook button.

    • ⚠️ During webhook creating it would check if Webhook URL works good. If you get error during creating webhook make sure that TaaS API is running and is accessible by the public URL. Open URL https://XXXX-XXX-XXX-XXX-XXX.ngrok.io/api/v5/taas-teams/nylas-webhooks?challenge=test with ?challenge=test - it should return test in response.

4. [Optional] Config Calendar Providers

You don't have to make this step if you don't want to test connect Google or Microsoft calendars functionality.

4.1. Config Nylas Auth Callback

To be able to connect any calendar first we have to set the callback url.

  1. Login to the Nylas Dashboard https://dashboard.nylas.com again and choose your application in the left sidebar All Applications{Your App Name}.
  2. Choose Authentication tab on this page.
  3. Fill Add your callback with http://localhost:3000/api/v5/taas-teams/user-meeting-settings/callback (don't need public domain here, localhost is fine). And click Add Callback blue link to add this callback URL.
    • Make sure that now this callback URL is now shown under the empty input field.

4.2. Config Google Auth

To be able to connect Google calendars we have to create a Google Application and provide its credentials here.

Follow this guide https://developer.nylas.com/docs/the-basics/provider-guides/google/create-google-app/#create-a-google-app on how to create a Google Application and config it inside Nylas.

During this guide you would have a choice:

  • Choose Hosted Authentication.
  • Choose External Application.

4.2. Config Microsoft Auth

To be able to connect Microsoft (Exchange) calendars we have to create an Azure (Microsoft) Application and provide its credentials here.

Follow this guide https://developer.nylas.com/docs/the-basics/provider-guides/microsoft/create-azure-app/#new-app-registration on how to create a Google Application and config it inside Nylas.

During this guide you would have to provide permissions. To do so you would have to update your Manifest JSON: find section requiredResourceAccess and add objects from this guide if these objects are not yet there.