See llms.txt for all machine-readable content.

Back to Templates

Send a daily HTML post digest email with WordPress and SMTP

Last update

Last update 2 days ago

Categories

Share


Quick Overview

This workflow runs daily at 8:00 AM, pulls recent posts from a WordPress site via the WordPress REST API, builds a mobile-friendly HTML digest with a plain-text fallback, and sends it as an email using SMTP.

How it works

  1. Runs every day at 8:00 AM on a schedule.
  2. Loads configuration values such as the WordPress site URL, look-back window, post limit, and recipient email address.
  3. Requests the most recent WordPress posts published after the look-back timestamp from /wp-json/wp/v2/posts, including embedded featured media.
  4. Builds an HTML email digest (plus a plain-text version) containing each post’s title, date, excerpt, featured image, and link.
  5. Checks whether any posts were returned and exits without sending an email when there are no new posts.
  6. Sends the digest email via SMTP with a subject line that includes the site URL and the number of posts.

Setup

  1. Set the siteUrl, daysBack, postLimit, and recipient toEmail values in the configuration step.
  2. Configure SMTP/email sending credentials and set the fromEmail address in the email step.
  3. Ensure your WordPress site’s REST API is reachable (and adjust the schedule time if 8:00 AM is not desired).