Create and use custom LLM workflow actions
Last updated: September 2, 2025
Available with any of the following subscriptions, except where noted:
|
|
|
|
|
|
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:
- Navigate to OpenAI. Then, sign up or log into your account.
- Retrieve your API key.
-
- For existing projects, ensure you have the necessary permissions to use the API.
- Only organization owners can create new projects and generate the corresponding API keys. Learn more about the different roles and permissions in your OpenAI account.
- Check that your API key is still valid and not expired.
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:
- Navigate to https://console.anthropic.com to sign up or log into your Anthropic account.
- Access your 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:
- Navigate to https://dashboard.cohere.com/ to sign up or log into your Cohere account.
- Access your 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:
- Navigate to https://accounts.x.ai/sign-in to sign up or log into your xAI account.
- Access your 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:
- Navigate to https://ai.google.dev/gemini-api/docs to sign up or log into your Gemini account.
- Access your 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.
- In your HubSpot account, navigate to Automation > Workflows.
- Click the name of an existing workflow or create a new workflow.
- Set your enrollment triggers.
- Click the + plus icon to add an action.
- In the left panel, click to expand the AI section. Then, click Use a custom LLM.
- From the AI provider dropdown menu, click Connect for the AI provider you want to connect.

- In the dialog box, enter the API key for the LLM provider.

-
Click Connect to [LLM provider].
- From the AI model dropdown menu, select the AI model you want to use for the API call.
- In the Prompt message field, enter your prompt.
- 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.
- At the top, click Save.
Manage your connected LLM account
To disconnect your LLM account:
- In your HubSpot account, click the settings settings icon in the top navigation bar. In the left sidebar menu, navigate to Integrations > Connected Apps.
- Search for and click the app for the desired LLM provider.
- In the top right, click Actions > Uninstall.