← All N8N workflows
AI & researchEmail SendExtract From FileHtmlHTTP RequestIf

Get and prepare Dummy Data

Configured with Email Send, Extract From File, Html, HTTP Request, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen clicking "ExecuteWorkflow"Manual TriggerTransformExtract from FileExtract From FileTransformSome Options for theCampaignEdit FieldsAI & modelsInformation ExtractorInformation ExtractorAI & modelsOpenAI Chat Model1OpenAI Chat ModelRoutingAI did fail us1Stop And ErrorTransformFake couponEdit FieldsWeb / APIDownload dummy dataHTTP RequestTransformAI Output + Prev DataMergeRoutingIs the result valid?IfRoutingCoupon them or not toCoupon themIfTransformHtml Template for ourEmailHtmlTransformThe composed E-Mail +Prev DataMergeTransformHtml Template for ourEmail with a CouponHtmlTransformThe composed E-Mailwith Coupon + Prev DataMergeMessagingSend EmailEmail Send

Node categories in this workflow

  • Trigger
  • Transform
  • AI & models
  • Routing
  • Web / API
  • Messaging

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When clicking "Execute Workflow"TriggerManual TriggerSee node parameters
Extract from FileTransformExtract From Filexls
Some Options for the CampaignTransformEdit FieldsSee node parameters
Information ExtractorAI & modelsInformation ExtractorSee node parameters
OpenAI Chat Model1AI & modelsOpenAI Chat ModelSee node parameters
AI did fail us1RoutingStop And ErrorSee node parameters
Fake couponTransformEdit FieldsSee node parameters
Download dummy dataWeb / APIHTTP RequestSee node parameters
AI Output + Prev DataTransformMergeSee node parameters
Is the result valid?RoutingIfSee node parameters
Coupon them or not to Coupon themRoutingIfSee node parameters
Html Template for our EmailTransformHtmlSee node parameters
The composed E-Mail + Prev DataTransformMergeSee node parameters
Html Template for our Email with a CouponTransformHtmlSee node parameters
The composed E-Mail with Coupon + Prev DataTransformMergeSee node parameters
Send EmailMessagingEmail SendSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • openAiApi
  • smtp

Workflow notes

Let GPT do the heavy work

Let GPT do the heavy work

For the prompt we follow the one-shot'ish principle. Also I've decided to NOT give the AI the personal data. Keeps it simpler regarding data privacy.

The AI-Chain will generate a Headline and the Text for the Email and even decides if we should send the user a Coupon.

Make sure we have what we need

Make sure we have what we need

We do not want to sent empty messages to our customers

Mocked: Fake a Coupon Code

Mocked: Fake a Coupon Code

For a real life scenario add the automated coupon generation here

Documentation

Documentation

This Workflow is for the n8n AI / Langchain Competition.

It solves the Problem: Personalizing marketing emails based on customer purchase history.

I've found it a bit ambiguous and decided to go the "Convert unhappy customers with a Coupon"-Route.

So this workflow utilizes the new LangChain Node for generating personalized E-Mail campaigns and decide if the user might need a coupon to be satisfied. Classic Rebound stuff.

There is also a Node "Some Options..." which can be adjusted to quickly change the direction this Campaign should go.

Additionally we use n8n to generate the HTML Mails by two different Templates. One with simple text and another for that Coupon handling.

Enjoy the Workflow! ❤️ https://let-the-work-flow.com

Send the Email to the Customer

Send the Email to the Customer

Although it's cool that n8n allows sending emails via SMPT I would recommend to stick to your newsletter tool for that to keep track of opt-outs and stuff.

Get and prepare Dummy Data

Get and prepare Dummy Data

Purpose and structure

This folder contains the Get and prepare Dummy Data workflow. Its executable nodes use emailSend, extractFromFile, html, httpRequest, if, informationExtractor, lmChatOpenAi, manualTrigger, merge, set, stopAndError. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When clicking "Execute Workflow"

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Stopanderror/0331_Stopanderror_Extractfromfile_Send_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Get and prepare Dummy Data
  • HTML Email-Template without Coupon
  • HTML Email-Template with Coupon

More in AI & research