How it works
What this workflow does
Create an editable newsletter issue from links the editor has already selected. An authenticated webhook validates the issue brief and two to five distinct links, asks OpenAI for a subject, preheader, introduction, one linked section per source, and a closing, then saves the result as an unaddressed Gmail draft.
The workflow imports inactive with dryRun: true. Run with sample data uses a fictional issue and two links, so the preview does not call OpenAI, Gmail, or the Data Table.
This is the newsletter layer for the Content Publishing, Social Distribution & Newsletter Intelligence blueprint; the Subscriber Lifecycle & Engagement blueprint covers audience segmentation and lifecycle messaging.
Every curated link appears once
Validate newsletter brief requires a stable request ID, issue name, theme, audience, and two to five unique HTTPS links. Each link needs a title and a relevant excerpt between 20 and 1,600 characters. The links are numbered so the model can reference them.
OpenAI must use every supplied link exactly once and return exactly one section per link ID. It cannot add URLs or unsupported claims; the workflow appends the source title and original URL from the editor's input. The subject must fit on one line, and the preheader, intro, section blurbs, and closing all have length limits.
Assemble newsletter issue builds the plain-text draft with a visible preheader line, the issue name, the introduction, each titled section with its link, and the closing. Unknown, repeated, or missing link IDs stop the run before Gmail.
Draft safety and replays
The Data Table stores request state by event_key. An existing request stops the run and preserves the editorial queue. A new request is reserved as draft_pending, saved as a Gmail draft with a blank recipient, verified for a draft ID, and recorded as draft_ready.
The workflow never addresses or sends the newsletter. The editor verifies the copy and moves the preheader into the newsletter platform's preview-text field.
Validation scope
The supplied report confirms the isolated n8n 2.47.4 import, inactive state, and sample path. It also covers structural checks, single use of every curated link, rejection of unknown or repeated IDs, and the empty Gmail recipient. Live OpenAI, Gmail, and Data Table calls require a staging test with your accounts.
How to use
Before you start
- A current n8n instance with Data Table support.
- An OpenAI API key and a JSON-mode model.
- A Gmail OAuth account for the editor or shared mailbox.
- A trusted content queue or internal form.
1. Import and run the sample
Download the complete package, extract the ZIP, and read the full setup guide. Import curated-newsletter-draft.n8n.json and keep it inactive.
Open Run with sample data and choose Test workflow. Assemble newsletter issue should return two linked sections, a one-line subject, and the preheader.
2. Create the state table
Create an n8n Data Table with text columns event_key, status, detail, and result_id. Enter its ID in Setup. The workflow uses the request ID, the draft state, the subject, and the Gmail draft ID.
3. Configure model and credentials
In Setup, set tableId, the model, and your brandVoice. Add an OpenAI bearer Header Auth credential on Draft with OpenAI and select a Gmail OAuth credential on Save unaddressed newsletter draft. Put a private inbound Header Auth credential on Receive event.
4. Send a curated issue
POST requestId, issueName, theme, audience, and a links array. Each link needs title, url, and excerpt. Use the supplied test payloads to check the brief and expected issue.
The webhook acknowledges receipt; the execution or Gmail Drafts show the outcome. A missing, repeated, or unknown link ID stops before Gmail.
5. Review and operate
In staging, set dryRun to false and submit a test issue. Verify that the recipient is blank and that every link matches the curated input. Open the full sources and check the summaries before publication.
A repeated request ID skips draft creation in normal serial delivery. If draft_pending remains, check Gmail before clearing the reservation. Use a fresh request ID for a deliberate revision.
Related automations
Use the Industry News Digest System to source timely links, and the Article-to-Social Draft System to distribute the published issue. The Campaign Image & Caption System supplies reviewable campaign creative. Read the Content Publishing & Newsletter Intelligence blueprint for the wider newsletter process.