Back to Templates

Daily AI News Digest with Perplexity AI and Gmail Automation

Last update

Last update a day ago

Share


AI Latest 24 Update Workflow Explanation

Aim

The aim of the AI Latest 24 Update Workflow is to automate the daily collection and distribution of the most recent Artificial Intelligence and Technology news from the past 24 hours. It ensures users receive a clean, well-structured HTML email containing headlines, summaries, and links to trusted sources, styled professionally for easy reading.


Goal

The goal is to:

  1. Automate news retrieval by fetching the latest AI developments from trusted sources daily.
  2. Generate structured HTML output with bold headlines, concise summaries, and clickable links.
  3. Format the content professionally with inline CSS, ensuring the email is visually appealing.
  4. Distribute updates automatically to selected recipients via Gmail.
  5. Provide reusability so the HTML can be processed for other platforms if needed.

This ensures recipients receive accurate, up-to-date, and well-formatted AI news without manual effort.


Requirements

The workflow relies on the following components and configurations:

n8n Platform

Acts as the automation environment for scheduling, fetching, formatting, and delivering AI news updates.

Node Requirements

  1. Schedule Trigger

    • Runs the workflow every day at 10:00 AM.
    • Automates the process without manual initiation.
  2. Message a model (Perplexity API)

    • Uses the sonar-pro model from Perplexity AI.
    • Fetches the most recent AI developments in the past 24 hours.
    • Outputs results as a self-contained HTML email with inline CSS (card-style layout).
  3. Send a message (Gmail)

    • Sends the generated HTML email with the subject: “Latest Tech and AI news update 🚀”.
    • Recipients: [email protected].
  4. HTML Node

    • Processes the AI model’s HTML response.
    • Ensures the email formatting is clean, valid, and ready for delivery.

Credentials

  • Perplexity API account: For fetching AI news.
  • Gmail OAuth2 account: For secure email delivery.

Input Requirements

  • No manual input required; the workflow runs automatically on schedule.

Output

  • A daily AI news digest email containing:

    • Headlines in bold.
    • One-sentence summaries in normal text.
    • Full URLs as clickable links.
    • Styled in a clean card-based format with hover effects.

API Usage

The workflow integrates APIs to achieve automation:

  1. Perplexity API

    • Used in the Message a model node.
    • The API fetches the latest AI news, ensures data accuracy, and outputs HTML formatted content.
    • Provides styling via inline CSS (Segoe UI font, light background, card design).
    • Ensures the news is fresh (past 24 hours only).
  2. Gmail API

    • Used in the Send a message node.
    • Handles the secure delivery of emails with OAuth2 authentication.
    • Sends AI news updates directly to inboxes.

HTML Processing

The HTML Node ensures proper formatting before email delivery:

  • Process: Cleans and validates HTML ($json.message) generated by Perplexity.
  • Output: A self-contained HTML email with proper structure (<html>, <head>, <body>).
  • Relevance: Ensures Gmail sends a styled digest instead of raw text.

Workflow Summary

The AI Latest 24 Update Workflow automates daily AI news collection and delivery by:

  1. Triggering at 10:00 AM using the Schedule Trigger node.
  2. Fetching AI news via Perplexity API (Message a model node).
  3. Formatting results into clean HTML (HTML node).
  4. Sending the email via Gmail API to multiple recipients.

This workflow ensures a seamless, hands-off system where recipients get accurate, fresh, and well-designed AI news updates every day.