Skip to main content

How to connect openai to zapier to twilio so that you can interface with GPT3 via SMS

 I created an SMS interface to openAI's gpt3 API so that I can send an SMS prompt to openai and get an SMS response. Result looks like this:


There may be better/easier ways of doing this, but this is how I figured it out. I'm assuming some degree of familiarity w/ Zapier here:

1. Buy a phone number in Twilio to use for this. This only costs $1/mo

2. In Zapier, create a new zap where the trigger is "Webhooks by Zapier" (Premium option). Choose your event as "Catch Hook". This will generate a webhook URL that is custom for this workflow. We are doing this because when you send the SMS to the Twilio phone number, you want it to **instantly** trigger the zapier workflow and not wait the 5-15 min it takes for Twilio to trigger on its own, so for that you need the webhook:


3. Copy the webhook URL from zapier and paste it into Twilio in the "A Messages Comes In" webhook section for that phone number

4. You will then need to send a test message so that Zapier can learn what information will come from the webhook from Twilio. 
5. Afterwords, I process the phone number of the sender and add it to a google sheet I use to keep track of which of my friends and family are using my tool. I'll skip the details on these, as these are pretty basic in Zapier. Here's a high level view of the overall workflow:

6. Next I send the OpenAI prompt by extracting the prompt from the webhook and using the OpenAI zapier integration (you will need access to the OpenAI API, which is easy to set up). 
7. One thing I decided to do is to measure the OpenAI response length. If the length is very long (> 1600 characters I believe), the message will not send through Twilio. So, if the message is too long (I use the Zapier Paths function to diverge the algorithm), I send the openAI response to my dropbox account where I take the text and convert it into a text file in Dropbox. Creating that sort of file in dropbox automatically creates a share link where anybody can access the file without login. I take that share link and send the link via Twilio, instead of the overly-long text. 



7. Then I log everything in Google sheet








Comments

Popular posts from this blog

IEEPA Tariff Refund Checklist (2026): How U.S. Importers Can Recover Duties Without Missing Deadlines

 If your company paid IEEPA-related import duties in 2025–2026, the biggest risk right now is not “whether refunds exist.” The biggest risk is operational: teams miss filing windows, submit incomplete data, or assume refunds are automatic. They’re not. Recent legal and agency developments created meaningful refund opportunities for many importers. But recovery still depends on entry-level details, liquidation posture, and execution quality. This guide gives you a practical, deadline-first checklist to maximize recoverable dollars while minimizing avoidable errors. Important: This article is informational and not legal advice. Why this matters now Three facts can all be true at once: The Supreme Court changed the legal landscape for IEEPA tariffs. CBP is operationalizing refunds through staged systems and rules. Importers can still lose rights if they wait too long or file the wrong pathway. In plain English: the legal headline helped, but workflow discipline still de...

Dr. Alex Mohseni invited to speak at Brault’s Healthcare Leadership Forum about the future of Emergency Medicine services and how ED groups can adapt using telemedicine.

  Dr. Mohseni presented on the topic of how Emergency Medicine groups could expand their scope of practice to the virtual space to and how to do so in a financially viable way.

DisabilityProAI: Faster, Defensible Medical Record Summaries for Disability Cases

 If you’ve ever tried to prep a Social Security Disability (SSD/SSI) or long-term disability case with tens of thousands of pages of medical records, you know the grind: clunky PDFs, handwriting, labs and imaging in odd formats, and a mountain of data that must be accurate, complete, and cited to the page. That’s why we built DisabilityProAI . Below is a plain-English overview you can share with your team or clients: what it is, who it’s for, and how it solves the most painful parts of disability case prep—at scale. What is DisabilityProAI? DisabilityProAI is an AI-powered platform purpose-built for disability attorneys, hearing representatives, paralegals, and case managers . It ingests massive medical record sets (well over 500 MB) , performs high-quality OCR that preserves tables, forms, and handwriting structure , and produces accurate, page-specific, citation-rich summaries you can trust. It also lets you chat with the documents —ask follow-up questions, trace where f...