Solar Lead Reactivation Automation
Monitors a Google Sheet for leads marked Ready for Reactivation and sends personalized SMS via Twilio with AI sentiment tracking.
What it does
You get timely SMS reminders sent to leads marked ready for reactivation in your Google Sheet, ensuring no opportunity slips through. The system tracks their responses with AI sentiment analysis, updates your sheet automatically, and alerts you via Telegram when high-value replies arrive.
Step by step
- Set up a Google Apps Script trigger to watch for changes in the specific column indicating 'ready for reactivation'.
- Configure Twilio API credentials and construct the HTTP POST request payload with the recipient's phone number and message body.
- Define the JSON schema for OpenAI's response to ensure consistent parsing of sentiment scores and reply text.
- Write the logic to update specific cells in Google Sheets with new status values and current timestamps.
Where the LLM does the work
- Generate personalized SMS templates that vary by lead source or previous interaction history to avoid spam filters.
- Craft system prompts for OpenAI that accurately distinguish between genuine interest, rejection, and invalid numbers.
- Determine the threshold logic for Telegram alerts based on nuanced sentiment scores rather than simple binary flags.
Watch out for
Twilio will reject messages if phone numbers lack proper E.164 formatting so validate all numbers before sending.
Google Sheets API quotas can be exceeded by rapid updates so batch writes or add small delays between operations.
OpenAI may misinterpret short replies like 'ok' as positive sentiment so include explicit negative examples in the prompt.
Telegram bot tokens must remain secret and never hardcoded in the script so use environment variables for storage.
Tools that fit
The agent brief
Everything your agent needs, including the gotchas. Copy it and go.
You are helping me build the following AI agent workflow. ## Goal Solar Lead Reactivation Automation: Monitors a Google Sheet for leads marked Ready for Reactivation and sends personalized SMS via Twilio with AI sentiment tracking. ## Specification - What it does: You get timely SMS reminders sent to leads marked ready for reactivation in your Google Sheet, ensuring no opportunity slips through. The system tracks their responses with AI sentiment analysis, updates your sheet automatically, and alerts you via Telegram when high-value replies arrive. - Trigger: Triggered by an event (Manual · on new lead status change) - Autonomy: Fully hands-off - Expected setup effort: about an afternoon - Tools/services involved: - Google Sheets: Lead storage and status tracking - Twilio: Sending SMS messages - OpenAI: Sentiment detection of replies - Telegram: Alerts for hot leads ## Known pitfalls, handle each one explicitly in your implementation 1. Twilio will reject messages if phone numbers lack proper E.164 formatting so validate all numbers before sending. 2. Google Sheets API quotas can be exceeded by rapid updates so batch writes or add small delays between operations. 3. OpenAI may misinterpret short replies like 'ok' as positive sentiment so include explicit negative examples in the prompt. 4. Telegram bot tokens must remain secret and never hardcoded in the script so use environment variables for storage. ## Reference implementation https://n8n.io/workflows/6213 (workflow template) Fetch and inspect this before building. If it matches my stack, adapt it; if not, rebuild the pattern with my tools. ## Process requirements 1. Before building: ask me which of the listed tools I actually use and what my platform is (n8n / Make / code / other). Do not assume. 2. Adapt the pattern to my answers; do not force the reference stack. 3. Address every pitfall above; tell me how you handled each. 4. Provide a test plan I can run before letting this touch real data. 5. Ask before any step that sends messages, modifies data, or spends money. Source: https://usecasesforagents.com/use-case/solar-lead-reactivation-automation/ via usecasesforagents.com
Frequently asked questions
Can I use a different Spreadsheet than Google Sheets?
Yes. Google Sheets is only the example spreadsheet in this recipe. The same flow works with Airtable, Baserow and Excel. Swap the spreadsheet connection and keep the rest of the setup as written.
Want this running in your business?
This is what I do. I design and build AI agents like this one, and keep them running. If you want it set up for your team instead of doing it yourself, get in touch.
Who it's for
Built for sales teams who want the prep work done before they pick up the phone.