Logo
Home
Resources

Product

Custom Workflow

Resources

Blog
Youtube
Template
Home
>
Product
>
Template Top
>
detail

HubSpot Custom Workflow Guide: Automating Text Generation with Generative AI

This guide explains how to directly call cutting-edge Generative AI services—such as ChatGPT, Gemini, Claude, and Perplexity—within HubSpot workflows. By implementing this feature, you can automate the creation of personalized content based on your CRM data.

Demo Video

Over view
Code

Detail

1. Purpose and Benefits

The primary goal of this implementation is to integrate advanced AI text generation into HubSpot automation processes, enhancing both operational efficiency and the quality of output.

  • Multi-AI Integration: Choose the most suitable AI service (ChatGPT, Gemini, Claude, or Perplexity) based on the specific task or strength of each model.
  • Data-Driven AI Utilization: Incorporate HubSpot CRM data (properties) directly into prompts to generate content optimized for each individual contact.
  • Streamlined Process: Complete the entire "Data Retrieval → AI Generation → Property Storage" cycle within HubSpot without the need for external middleware.

2. Use Cases

  • Automated Content Categorization and Summarization: Analyze inquiry details or open-ended survey responses using AI to automatically categorize them or summarize key points for internal notifications.
  • Personalized Email Draft Generation: Automatically draft sales or follow-up emails based on a contact’s interests, history, and past interactions.
  • Automated Multilingual Translation: Translate input text into specific languages to facilitate smooth communication for businesses operating globally.

3. Implementation Steps

Follow these steps to set up the Generative AI action within your workflow.

Step 1: Initial Setup and API Integration

First, navigate to "Settings" and select the "Integrations" tab. Access the "Custom Workflows" section and register your API keys for the AI services you wish to use (ChatGPT, Gemini, Claude, Perplexity, etc.).

Step 2: Selecting AI Models

For each registered service, enable the specific models you want to use in your workflows (e.g., gpt-4o, gemini-1.5-pro).

Step 3: Adding the Workflow Action

In the HubSpot workflow editor, click the plus (+) icon to add an action. Select "Generative AI Action" and configure the AI service, model name, and the prompt. You can insert HubSpot contact properties directly into the prompt text here.

Step 4: Output Format and Saving

Specify the desired output format for the AI-generated text (such as plain text or JSON) and save the settings. This ensures the generated response is available for use in subsequent workflow steps.

Step 5: Activation and Testing

Once configured, turn on the workflow. Test it with a real record and verify the "Action succeeded" status in the workflow logs to ensure the AI's response is correctly outputted.

‍

Source Code

HTML
CSS
Javascript

FAQ

Which AI services are supported?

Currently, the system supports four major AI services: ChatGPT (OpenAI), Gemini (Google), Claude (Anthropic), and Perplexity. You can switch between them by registering their respective API keys.

Can I include HubSpot data, such as a contact's name, in the prompt?

Yes. By using the "Insert Token" feature in the workflow, you can dynamically embed properties like the contact's name, company, or recent interaction details into your prompts.

Where is the generated response stored?

The text generated by the AI is held as an "Output" of the workflow action. You can then use a "Set property value" action to save this output into a specific custom property (e.g., "AI Summary" or "Email Draft") for further use.

Search

Search more

Related Template

Need Customization?

We can customize this sample to match your specific business requirements.

Book Free Consultation

Got a quick dev request?

Put it on Trello!Need a fix for HubSpot, CMS, or GAS? Post it on Trello.

Development Requests Here

HubSpot Custom Workflow Guide: Automating Text Generation with Generative AI

GAS Library Guide: Automatically Extracting and Managing Overdue HubSpot Tasks in Google Sheets

GAS Library: Leveraging GAS Library: Automatically Extract Overdue HubSpot Tasks to Google Sheets

How to Configure Date Add/Subtract Actions in HubSpot Custom Workflows

HubSpot CMS: Implementing a High-Converting "Rich CTA" Module with Shine Effects

Company Info
Name : SweetsVillage .Inc
CEO :
‍
Tomoo Motoyama

HomeTemplateCustomWorkflow
Terms & ConditionsPrivacy PolicyContact us

Copyright ©SweetsVillage .Inc

Back To Top Image