Skip to content

nicholasbair/contactifier

Repository files navigation

Contactifier

Nylas API v2 vs v3

The main branch of the repo now leverages Nylas API v3 (currently in beta). The v2 branch of this repo will track Nylas API v2, though dev work on this app will largely focus on Nylas API v3.

Note

As of API v3, Nylas parsed contacts are generated by the provider (Google/Microsoft). At present, webhooks are not supported for these types of contacts in API v3, thus the app now uses messages to create parsed contacts within the app.

Use case

Demonstrate the usage of Nylas parsed contacts in a CRM/CSP-like platform.

What is it really?

Imagine you are a user of a CRM/CSP tool. When you have email interactions with customers, maybe your contact copies someone new on the email. Ideally, your CRM/CSP will capture that new person's email address so you can store it in your system for use later. This is where parsed contacts come in--if your email account is connected, Nylas will create contacts that exist only on Nylas based on your email interactions. Contactifier uses these contacts to power a "workflow" wherein the user of the CRM/CSP tool can choose to convert a parsed contact into a legit contact in the CRM/CSP.

Features

  • Email & contact integration powered by Nylas
  • A user can have many integrations (e.g. multiple accounts connected via Nylas)
  • Webhooks for new messages, which are converted into "parsed contacts"
  • Webhooks for Nylas grant status
  • Scheduled job to delete stale integrations (Nylas grants that have been invalid for x days)

What's missing?

  • Tests
  • A concept of organzations, where multiple users can access a shared group of customers, contacts, etc.
  • Email notifications for integration re-auth, signup welcome emails, password reset emails, etc.
  • The bulk of stuff you would expect in a CRM/CSP: emailing, customer metrics, etc.

Running locally

  • Clone the repo
  • CD into the directory
  • Make sure you have Postgres running
  • Make sure you have RabbitMQ installed and running (set connection details via environment variables referenced in runtime.exs)
  • Set environment variables for Nylas API access: NYLAS_API_KEY_V3, NYLAS_CLIENT_ID_V3, NYLAS_WEBHOOK_SECRET
  • Update the values for nylas_redirect_uri, nylas_api_server in dev.exs and prod.exs
  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server
  • Now you can visit localhost:4000 from your browser.
  • Setup your auth callback URL in the Nylas dashboard with the following format #{your_base_url}/integrations/callback.
  • With the server running, setup your webhook URL in the Nylas dashboard with the triggers: grant.expired, and message.created and the URL #{your_base_url}/api/webhooks.

About

Parsing contacts from email interactions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published