Skip to content

Create and use custom LLM workflow actions

Last updated: September 2, 2025

Available with any of the following subscriptions, except where noted:

Marketing Hub   Enterprise
Sales Hub   Enterprise
Service Hub   Enterprise
Operations Hub   Enterprise
Content Hub   Enterprise
Smart CRM   Enterprise

Connect HubSpot with Large Language Models providers (LLMs), and start using the AI-powered action Use a custom LLM in your workflows. This allows you to select from several LLM providers within one workflow action. You can then use the outputs of this action with other workflow actions, such as sending email notifications and updating CRM records. 

Supported LLM providers

You can use the following LLM providers with the Use a custom LLM workflow action:

  • OpenAI
  • Anthropic (Claude)
  • Cohere
  • xAI (Grok)
  • Google (Gemini)

Retrieve your LLM API key

To connect HubSpot to an LLM provider, you'll first need the API key from the LLM provider you want to use.

Please note: you must keep the API key secure, as it provides access to your LLM instance.

OpenAI API key

To connect your OpenAI account and HubSpot, a user with the role of owner in your OpenAI account must first retrieve your OpenAI API key:

  1. Navigate to OpenAI. Then, sign up or log into your account. 
  2. Retrieve your API key.

screenshot showing how to retrieve an OpenAI API key.

Anthropic API key

Before you can connect your Anthropic account to HubSpot, a user with the role of admin or developer in your Anthropic account must first retrieve your Anthropic API key: 

  1. Navigate to https://console.anthropic.com to sign up or log into your Anthropic account. 
  2. Access your Anthropic API key.

screenshot showing how to retrieve an Anthropic API key.

Cohere API key

Before you can connect your Cohere account to HubSpot, a user with the role of owner in your Cohere account must first retrieve your Cohere API key: 

  1. Navigate to https://dashboard.cohere.com/ to sign up or log into your Cohere account. 
  2. Access your Cohere API key


screenshot showing how to retrieve a Cohere API key.

xAI API key

Before you can connect your xAI account to HubSpot, a user with API write permissions in your xAI account must first retrieve your xAI API key: 

  1. Navigate to https://accounts.x.ai/sign-in to sign up or log into your xAI account. 
  2. Access your xAI API key

screenshot showing how to retrieve an xAI API key.

Google (Gemini) API key

Before you can connect your Gemini account to HubSpot, you'll need to retrieve your Gemini API key first: 

  1. Navigate to https://ai.google.dev/gemini-api/docs to sign up or log into your Gemini account. 
  2. Access your Gemini API key

screenshot showing how to retrieve a Gemini API key.

Add the Use a custom LLM action to a workflow

After retrieving the API key for your LLM provider, you can add the Use a custom LLM action to workflows in HubSpot. 

  1. In your HubSpot account, navigate to Automation > Workflows.
  2. Click the name of an existing workflow or create a new workflow.
  3. Set your enrollment triggers
  4. Click the + plus icon to add an action.
  5. In the left panel, click to expand the AI section. Then, click Use a custom LLM.
  6. From the AI provider dropdown menu, click Connect for the AI provider you want to connect.
screenshot showing the AI provider dropdown menu for the Use a custom LLM workflow action.
  1. In the dialog box, enter the API key for the LLM provider.
workflows-use-a-custom-LLM-action-new-2
  1. Click Connect to [LLM provider].

  2. From the AI model dropdown menu, select the AI model you want to use for the API call. 
  3. In the Prompt message field, enter your prompt
  4. Click to expand the Advanced settings section. Then, configure the following: 
    • Temperature: the randomness of the generated text. Lower values will result in more predictable responses, while higher values will result in more creative responses.
    • Reasoning effort: the effort on reasoning. You can select from High, Medium, or Low. Higher values will result in more detailed responses but may take longer to generate.
  1. At the top, click Save.

screenshot showing the option in the left panel to set the Temperature and Reasoning effort in a Use a custom LLM workflow action.

Manage your connected LLM account 

To disconnect your LLM account: 

  1. In your HubSpot account, click the settings settings icon in the top navigation bar. In the left sidebar menu, navigate to Integrations > Connected Apps.
  2. Search for and click the app for the desired LLM provider. 
  3. In the top right, click Actions > Uninstall. 
Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.