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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking ‘Test workflow’ | Trigger | Manual Trigger | See node parameters |
| Variables | Transform | Edit Fields | See node parameters |
| Google Gemini Chat Model | AI & models | LM Chat Google Gemini | See node parameters |
| Google Gemini Chat Model1 | AI & models | LM Chat Google Gemini | See node parameters |
| Create Draft Email For Review | Messaging | Gmail | draft |
| Generate Sales Email | AI & models | Information Extractor | See node parameters |
| Analyse and Build Persona | AI & models | Information Extractor | See node parameters |
| Get All Customer's Correspondence | Messaging | Gmail | getAll |
| Get Contacts | Integration | Hubspot | search |
| For Each Contact | Routing | Loop Over Items | See node parameters |
| Contact Ref | Routing | No Op | See node parameters |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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
gmailOAuth2googlePalmApihubspotAppToken
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.