DEV Community

Devang M P
Devang M P

Posted on

3 1 2 2 2

Natural Language Contact Ops with Nylas x Gemini

Recently, I asked Google Assistant to add a new contact for me, but it refused, likely because this feature isn't implemented yet. This got me thinking about how I could implement it myself, so I brainstormed and came up with a small system, which I'll share below.

Image description

Nylas offers an amazing set of APIs for working with Contacts, Email, and Calendar. However, in this post, I'll focus solely on how to work with Contacts. Here's how it's done.

  • Enable Nylas Hosted Authentication

Image description

Nylas hosted authentication is the quickest and easiest way to set up user authentication for your app. With hosted authentication, you redirect users to a Nylas login page and Nylas handles the rest, including detecting third party providers including SSO identity providers, and managing token exchanges. Visit Hosted Auth

  • Setup the Nylas configurations and GCP OAuth configurations in project.

Image description

  • Now that we have all the configurations in place, it's time to design the prompt and APIs. I've crafted a simple system prompt to achieve the expected JSON response.

Image description

  • Contact Service

Image description

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs