HL Fully Integrate AI Pt 2: Automate All Email Conversations

Summary
Client
Assigned To
Eli Weldon
Status
When Time
Start & Finish Date
Needs Review
icon
Project Resources

Project Outline

icon
Project Planning Tasklist
Go through
For each Goal outlined turn it individual item in
icon
Problems & Goals

What are the problems we hope to solve with this project?

  • GPT cannot generate and send email responses, still done manually
  • GPT cannot send emal follow-ups

What are the Goals to create in order to solve the problems?

  • Integrate Gmail to allow email responses to be generated by GPT, stored in airtable, and sent back automatically

Goals & Deliverables

icon
Goal #1

Create functionality for new Incoming Email → GPT + Airtable Log

Goal Planning Tasklist

Outline Deliverables associated with Goal
Outline & complete any Tasklist - Research / Outline / Client Question
Create list of Tasks to achieve goal
Confirm Goal & Deliverables with client, get any questions answered
Turn goal deliverables into TasksTasks , add task details

Deliverables

  • When a new email is received from gmail it should call the endpoint. The endpoint should find the corresponding databse item which should have an airtable record id and conversatoin history stored in gpt format. Using the gpt formatted data it will generate a response to the email. It will then pull the airtable record id to determine if it can automatically respond to the user. IF yes then it will send the email, if no then it will store the email in the matching airtable record in the field Email Message.

Tasklist - Research / Outline / Client Question

Tasklist - Final

  • Find email in database
  • Using record id find client card in airtable
    • If record id doesn’t exist then search airtable for matching email and use that record id
    • if not then create record id, need to make sure you have a record id for the next steps,
  • Store incoming email in airtable interactions table using client record id
  • Get GPT Chat Prompt from client record and parse for client data variables and replace with client information (use airtable record format {Field Name})
  • Combine it with clients Conversation History to generate gpt response
  • check field Can GPT Respond if YES
    • calls endpoint to app to send email
    • sends gmail email
    • adds to interaction table
  • check field Can GPT Respond if NO
    • update airtable clients field Email Response
    • updates airtable clients field Last Message Received Date
icon
Goal #2

Send Email From Airtable

Goal Planning Tasklist

Outline Deliverables associated with Goal
Outline & complete any Tasklist - Research / Outline / Client Question
Create list of Tasks to achieve goal
Confirm Goal & Deliverables with client, get any questions answered
Turn goal deliverables into TasksTasks , add task details

Deliverables

  • In airtable a person can type a message on a clients card i the field Email Response and then click a button on the card Send Email and it will send the message to the email and store the conversation in t

Tasklist - Research / Outline / Client Question

Tasklist - Final

  • Create Email Respons field in airtable leads card
  • Create Send Email button in airtable leads card that
    • calls endpoint to app to send email
    • sends gmail email message
    • adds to interaction table
icon
Goal #3

No Response Follow-up + Initial Interaction send Email + GPT

Goal Planning Tasklist

Outline Deliverables associated with Goal
Outline & complete any Tasklist - Research / Outline / Client Question
Create list of Tasks to achieve goal
Confirm Goal & Deliverables with client, get any questions answered
Turn goal deliverables into TasksTasks , add task details

Deliverables

  • Need to be able to send automated follow-up email messages to clients who need to complete an action or respond but haven’t yet as well as send initial messages when a lead is added from a form submission or some other action to airtable.

Tasklist - Research / Outline / Client Question

Tasklist - Final

Functionality flow for automated follow-up:

  • Use view: Needs Follow-up
    • Filter by fields: Has Client Responded is 1 and next action done by is Automated GPT Follow-up Email
  • Create airtable automatoin that runs ever 15 minutes:
    • pulls records from View: Needs Follow-up
    • sends client records to api endpoint listed above

Functionality flow for initial send out:

  • Create airtable automation that runs on next task done by automated email or Automated GPT Follow-up Email
  • sends client record to api endpoint listed above

Then combined functionality flow:

  • Setup webhook to receieve client ecords
  • finds matching record id in app database
  • If next action done by is “Automated GPT Follow-up Email” then:
    • Pull next action prompt and parse for client data variables and replace with client information (use airtable record format {Field Name})
    • uses next action prompt and conversation history to generate GPT response
    • sends gmail email message
    • adds to interaction table
  • if next action done by Automated Email:
    • sends gmail email message
    • adds to interaction table