Quick Overview
This workflow responds to incoming WhatsApp messages, validates the sender in HighLevel, uses Google Gemini with Redis chat memory to collect shipment details, fetches multi-carrier rates from ShipEngine, applies a commission markup, logs the quote to Google Sheets, and sends the best options back via WhatsApp.
How it works
- Triggers when a new WhatsApp message is received.
- Looks up the sender’s phone number in HighLevel and stops outreach if the contact is marked Do Not Disturb.
- Uses a Google Gemini-powered agent with Redis chat memory to collect and confirm shipment details, creating the contact in HighLevel if needed or marking them DND if they opt out.
- If shipment data collection is complete, requests shipping rates from the ShipEngine Rates API for the configured carriers.
- Calculates a commission markup, filters for valid rates, and selects the cheapest and fastest options to format a quote message.
- Appends the quote text and metadata to a Google Sheets spreadsheet and sends the quote back to the customer via WhatsApp.
Setup
- Connect WhatsApp Business credentials for both the WhatsApp trigger and send actions, and set your Phone Number ID.
- Add HighLevel OAuth2 credentials and ensure contact lookup by phone works in your HighLevel account.
- Add a Google Gemini (PaLM) API credential and a Redis credential for conversation memory.
- Add ShipEngine credentials (API key via HTTP header auth) and replace the placeholder carrier IDs in the ShipEngine request body with your real carrier IDs.
- Connect a Google Sheets service account and update the spreadsheet/document and sheet selection used to store quotes.