Skip to main content

Generate personalized HubSpot campaign emails with Groq AI and Gmail

Workflow preview

Workflow preview
100%
Generate personalized HubSpot campaign emails with Groq AI and Gmail preview
Open on n8n.io

1. Workflow Overview

How it works This workflow runs on a schedule and retrieves newly created HubSpot contacts from the past 24 hours. It processes each contact individually and generates a tailored marketing campaign...

Best for

  • Social Media automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgroq, n8n-nodes-base.gmail, n8n-nodes-base.splitinbatches, n8n-nodes-base.code, n8n-nodes-base.hubspot, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Avkash Kakdiya.

Original n8n.io source

1.1 Workflow description

Title
Generate personalized HubSpot campaign emails with Groq AI and Gmail
Workflow name
Generate personalized HubSpot campaign emails with Groq AI and Gmail

How it works

This workflow runs on a schedule and retrieves newly created HubSpot contacts from the past 24 hours. It processes each contact individually and generates a tailored marketing campaign using an AI model. The generated content is formatted into a clean HTML structure. Finally, a personalized email is sent to each contact with their campaign strategy.

Step-by-step

  • Trigger and fetch contacts

  • Schedule Trigger – Starts the workflow at defined intervals.

  • Search contacts – Retrieves contacts created in the last 24 hours from HubSpot.

  • Process and generate campaign

  • Loop Over Contacts – Splits contacts into individual items for processing.

  • AI Agent – Generates a personalized marketing campaign strategy.

  • Groq Chat Model – Sub-node providing the AI model for content generation.

  • Format AI's output – Converts AI text into HTML-friendly format.

  • Send a message – Sends the personalized email to each contact.

Why use this?

  • Automates personalized outreach for every new lead
  • Delivers instant value with AI-generated campaign strategies
  • Reduces manual marketing effort and response time
  • Improves engagement through highly tailored messaging
  • Easily scalable and customizable for different business needs

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3.1

Block 3 - Groq Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGroq - lmChatGroq
Config choices
Version 1

Block 4 - Send a message

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 5 - Loop Over Contacts

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 6 - Format AI's output

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Search contacts

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 8 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Generate personalized HubSpot campaign emails with Groq AI and Gmail
Complexity intermediate
Nodes 10
Categories Social Media, Multimodal AI
Author Avkash Kakdiya
Published 18 Mar 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/14147/14147.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate personalized HubSpot campaign emails with Groq AI and Gmail do?

How it works This workflow runs on a schedule and retrieves newly created HubSpot contacts from the past 24 hours. It processes each contact individually and generates a tailored marketing campaign...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Social Media, Multimodal AI use case.