Researched and Illustrated Email Newsletter – OpenAI + Exa

Prebuilt Sequences | Researched and Illustrated Email Newsletter – OpenAI + Exa
Researched and Illustrated Email Newsletter – OpenAI + Exa

This sequence is designed to generate an AI-powered email newsletter by combining user input, research, and AI-driven content generation. The workflow integrates tools like Exa for research and OpenAI for generating text and images. Here’s a step-by-step breakdown of how the sequence operates:


1. Defining the Newsletter Topic and Audience

The sequence starts by asking the user two key questions:

  • What is the topic?
    This defines the subject of the newsletter.
  • Who is the audience?
    This tailors the tone and content to a specific readership.

These inputs ensure that the newsletter content aligns with user goals and is engaging for the intended audience.


2. Decision Point: Include an Illustration

The system prompts the user with:

  • Would you like to include an illustration?

If the user selects “Yes,” the workflow includes a step to generate a custom image. If “No,” it skips the illustration step and proceeds with the text-based content creation.


3. Research Using Exa

  • The workflow uses Exa Search to gather relevant research papers or articles based on the provided topic.
  • Parameters for the search include:
    • Searching within the past 90 days.
    • Limiting results to 5 items.
    • Targeting specific domains like arxiv.org.

This ensures the content is up-to-date and authoritative.


4. Summarizing Research

The research results are processed in a loop:

  • Each of the 5 items retrieved by Exa is summarized individually using OpenAI’s text generation model.
  • Summaries are tailored to the audience and formatted with:
    • headline.
    • An article summary.
    • A clickable “Read More” link.

These summaries are stored as part of the newsletter content.


5. Generating the Introduction

The sequence creates an engaging introduction for the newsletter:

  • It welcomes the audience and briefly teases the content using HTML formatting for readability.
  • The introduction is designed to capture attention and set the tone for the newsletter.

6. Generating the Conclusion

At the end of the newsletter, the workflow generates a conclusion:

  • It summarizes the content and provides a closing statement.
  • The tone is professional and tailored to the audience, ensuring the newsletter ends on a positive note.

7. Optional Step: Creating an Illustration

If the user opts to include an illustration:

  • The system generates an image prompt based on the introduction and conclusion.
  • The prompt is sent to an AI image generator (e.g., DALL-E) to create a visually appealing illustration.
  • The resulting image is formatted with an HTML <img> tag for easy integration into the newsletter.

8. Assembling the Newsletter

The newsletter is built by combining:

  • The introduction.
  • Summarized research content.
  • The illustration (if included).
  • The conclusion.

Each component is formatted in HTML for seamless email delivery.


9. Test Copy Option

Before sending, the sequence asks:

  • Would you like to email a test copy to your address?
  • If the user chooses “Yes,” the email is sent as a test. If “No,” the sequence proceeds to the next step.

10. Final Email Delivery

The completed newsletter is sent to the intended recipients. The content is polished, informative, and customized to the user’s specifications.

OpenAI Image-to-Text
Exa AI Web Search