How to Automate Your Email with Zapier + ChatGPT

What is Unstructured Data?
Unstructured data refers to information that does not follow a predefined data model or organized format, making it more difficult to process using traditional data analysis methods. Unlike structured data, which is neatly arranged in rows and columns within databases, unstructured data lacks this formal organization.
Examples of unstructured data include:
- Emails: Emails often contain a combination of text, metadata, and attachments, which do not follow a strict structure.
- Social Media Posts: Platforms like Twitter, Facebook, and Instagram generate vast amounts of unstructured text, images, and videos, which are difficult to categorize systematically.
- Videos and Audio Files: Media files such as YouTube videos or podcast recordings are rich in content but lack standardized data fields.
- Web Pages: Web pages may contain mixed content, including text, images, and code, which is often unstructured and varies greatly from one site to another.
- Notes and Transcripts: Meeting notes, chat logs, and transcripts from interviews or speeches are often free-form and vary significantly in their organization and content.
- Images and Photographs: Photos stored in image formats (like JPEG, PNG) contain visual information that isn't structured in a traditional database format.
- PDFs and Scanned Documents: Documents in PDF format or scanned paper documents are unstructured because they can contain free-flowing text, images, and graphics, all of which don't adhere to structured formats.
- Chat Messages: Instant messaging platforms (e.g., Slack, WhatsApp, Microsoft Teams) generate vast amounts of unstructured conversational data, often containing a mix of text, emojis, and links.
- Blogs and Articles: Text-based content from blogs, news articles, and opinion pieces lack predefined structure, making it difficult to extract key insights systematically.
- Forum Discussions: Online community discussions or question-and-answer sites (like Reddit or Quora) generate unstructured text data where responses vary in format and length.
- Presentations (e.g., PowerPoint): Presentations with free-form text, images, graphs, and multimedia elements often mix content types, making them unstructured.
- Customer Feedback and Surveys: Open-ended responses in customer surveys, user reviews, or product feedback sections are highly unstructured, varying in length and format.
- Log Files: System logs or server logs used for diagnostics often contain a combination of text, timestamps, and error codes, which are not uniformly structured.
Step 01:- ChatGPT Prompt Template for Structuring Unstructured Email Content
Review the raw content here:
----
Subject: {{249105134__raw__Subject}}. # From Zapier Email Trigger Step
Body plain: {{249105134__body_plain}}. # From Zapier Email Trigger Step
----
Extract and structure the data based on the following schema:
---
- 'businessName': Extracted from the business name.
- 'businessStreet': Extracted from business address.
- 'businessCity': Extracted from business address.
- 'businessState': Extracted from business address (state or province).
- 'businessCountry': Extracted from business address.
- 'businessPostalCode': Extracted from business address.
- 'businessPhone': Extracted from the business phone number.
- 'businessEmail': Extracted from the business email address.
- 'websiteUrl': Extracted from the URL in the prospects email.
- 'businessDescription': A detailed and specific description of the business and what they do. Three sentences or less.
- 'businessIndustryName': Infer the business industry using NAICS standards.
- 'contactFirstName': Extracted from the contact's name.
- 'contactLastName': Extracted from the contact's name.
- 'contactCellPhone': Extracted from the contact's cell phone number.
- 'contactEmail': Extracted from the contact's email address.
- 'contactTitle': Extracted from the contact's title or position.
- 'budget': Extracted budget information related to the business or project.
- 'prospectInterest': Extracted interest level or area of interest of the prospect.
- 'leadDescription': A brief description of the lead, summarizing the potential opportunity or interest.
- 'whenToContact': Extracted preferred time or date to contact the lead.
---
- Once the data is gathered, check your response for accuracy against the provided instructions.
- Unless otherwise told in the schema, all fields are string fields.
- This data will be used to go into a CRM via automation. The data needs to needs to be accurate, clean, and contextual.
++++
Output response in JSON code format with no leading characters. Your reply will be used as a JSON payload. Don't include (```json```).
++++
ChatGPT Settings:
- Model =
gpt-4
- Memory Key = blank
- Image = blank
- User Name =
Company Admin
- Assistant Name =
Company Admin Assistant and Email Parser
- Assistant Instructions =
You are a helpful Company assistant that specializes in parsing unstructured content into a structured format.
- Max Tokens =
1024
- Temperature =
0.5
- Top P =
1
Step 2:- Parse JSON Payload Code Step
Input Data - payLoad = ChatGPT Response
var obj = JSON.parse(inputData.payLoad);
return obj;
Step 3 :- Setup Action steps as needed from there.
By Aaron LeBlanc, Founder & CEO, Hypelocal
➡️ https://zapier.com/experts/hypelocal