← All N8N workflows
Messaging & emailGmailHubspotInformation ExtractorLM Chat Google GeminiManual Trigger

create draft email for review and generate sales email and analyse and build persona

Configured with Gmail, Hubspot, Information Extractor, LM Chat Google Gemini, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen clicking ‘Testworkflow’Manual TriggerTransformVariablesEdit FieldsAI & modelsGoogle Gemini ChatModelLM Chat Google GeminiAI & modelsGoogle Gemini ChatModel1LM Chat Google GeminiMessagingCreate Draft Email ForReviewGmailAI & modelsGenerate Sales EmailInformation ExtractorAI & modelsAnalyse and BuildPersonaInformation ExtractorMessagingGet All Customer'sCorrespondenceGmailIntegrationGet ContactsHubspotRoutingFor Each ContactLoop Over ItemsRoutingContact RefNo Op

Node categories in this workflow

  • Trigger
  • Transform
  • AI & models
  • Messaging
  • Integration
  • Routing

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 ‘Test workflow’TriggerManual TriggerSee node parameters
VariablesTransformEdit FieldsSee node parameters
Google Gemini Chat ModelAI & modelsLM Chat Google GeminiSee node parameters
Google Gemini Chat Model1AI & modelsLM Chat Google GeminiSee node parameters
Create Draft Email For ReviewMessagingGmaildraft
Generate Sales EmailAI & modelsInformation ExtractorSee node parameters
Analyse and Build PersonaAI & modelsInformation ExtractorSee node parameters
Get All Customer's CorrespondenceMessagingGmailgetAll
Get ContactsIntegrationHubspotsearch
For Each ContactRoutingLoop Over ItemsSee node parameters
Contact RefRoutingNo OpSee 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

  • gmailOAuth2
  • googlePalmApi
  • hubspotAppToken

Workflow notes

2. Research Customer via Emails

2. Research Customer via Emails

Emails can be a great source of research on how a customer or potential customer thinks, behaves and communicates. This template does require some interaction beforehand but this should could be shared amongst colleagues or a CRM.

3. Build Persona Outline from Research

3. Build Persona Outline from Research

Once we gather all the emails, we can use AI to analyse and construct a quick persona on our customer. Personas are useful to understand the customer's position and how favourably they might respond to a product and/or service. The Information Extractor node is used to guide the LLM for attributes we're interested in.

4. Generate Sales Pitch based on Persona

4. Generate Sales Pitch based on Persona

Using the persona, we can again ask AI to generate the perfect sales email which takes into consideration the customer's beliefs, values and communication style. In this way, each sales email can be carefully written to improve its appeal to the customer.

5. Create Draft for Human Review

5. Create Draft for Human Review

Finally, an email draft is created to store the generated sales pitch for human review. If given, a list of customers to target, a SDR can ensure customised outreach in minutes rather than hours or days.

Try it out

Try it out

This n8n template uses existing emails from customers as context to customise and "finetune" outreach emails to them using AI.

By now, it should be common knowledge that we can leverage AI to generate unique emails but in a way, they can remain generic as the AI lacks the customer context to be truly personalised. One way to solve this is

How it works

  • Customers to target are pulled from Hubspot and each customer is then run in a loop. We're using a loop as the retrieved emails for each customer become separate items and a loop helps with item reference.
  • We connect to our Gmail account to pull all emails recieved from the customer.
  • The contents of the email will be suitable to build a short persona of the customer. We use the Information Extractor to get our AI model to pull out the key attributes of this persona such as decision making style and communication preferences.
  • With this persona, we can now pass this to our AI model to generate a personalised outreach email specifically for our customer.
  • Finally, a draft email is created for human review before sending. If you would rather send the email straight away, this is also possible.

How to use

  • Define the topic of the outreach email in the "variables" node. This directs the AI on what outreach email to generate.
  • Ensure the emails are pulled from the right account. If emails may contain sensitive data, adjust the filters and text parsing to ensure these are not leaked to the AI (which might then leak into the generated email).

Need Help?

Join the Discord or ask in the Forum!

Happy Hacking!

1. Get Targeted Existing Customers

1. Get Targeted Existing Customers

As with all campaigns, it's good to have a targeted subset of customers to aim for to assess the response. Here, we can pull them out of a CRM like Hubspot if granular filtering is required for example but even a simple csv of contacts would also work.

create draft email for review and generate sales email and analyse and build persona

create draft email for review and generate sales email and analyse and build persona

Purpose and structure

This folder contains the create draft email for review and generate sales email and analyse and build persona workflow. Its executable nodes use gmail, hubspot, informationExtractor, lmChatGoogleGemini, manualTrigger, noOp, set, splitInBatches. 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 ‘Test 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/Manual/0821_Manual_Noop_Create_Triggered.json MIT; preserve source notices.

More in Messaging & email