Skip to main content

How to create and use AI Variables

AI Variables let you personalize and transform any data with AI prompting — translate names, clean company titles, fix formats, or even generate new values on the fly.

Victor Dolzijn avatar
Written by Victor Dolzijn
Updated today

What is AI Variable

AI Variables greatly expand the functionality of regular variables, helping you personalize your outreach and automate message customization.

You can simply write a prompt in natural language and pass contact or company data to it to get the result you need.

For example:

Translate {{ first_name }} to French language — return only name

Or for a more advanced case:

Write a natural first-line message for LinkedIn outreach to {{ first_name }} who works at {{ company_name }} as {{ position }}.
Reference their company’s industry: {{ company_industry }} and make the message friendly but professional.
Avoid clichés like ‘I came across your profile’ or ‘Hope you’re doing well’.
Keep it under 25 words and sound human.
Output only the message text, without greetings or quotes.

You can use AI Variables in AI Templates and Automation when creating nodes for:

  • LinkedIn Message

  • Send Connection

  • InMail

  • Email

  • Comment Post

View and manage AI Variables

  1. Go to AI → Variables in the left menu:
    https://amazing.getsales.io/ai/variables

  2. You’ll see three default AI Variables:

    • ai_contact_first_name

    • ai_company_conversational

    • ai_position_conversational

    List of pre-created AI Variables
  3. The AI Variables list includes:

    • Name – must start with a letter and contain no spaces (use underscores if needed).

    • Model – the AI model used to generate text.

    • Created – the date and time the variable was created.

    • Cost Grade – the estimated cost based on model token usage.

    • Actions – view usage logs, update, or delete the variable.

Tip: Click the three dots and select Update to view or edit an AI Variable’s settings and prompt.

We plan to add more ready-to-use AI Variables for popular use cases and may even launch a marketplace for sharing templates.

To create a new AI Variable:

  1. Click Add AI Variable in the top-right corner. A modal window will appear.

    Add AI Variable modal
  2. In Variable name, enter a name (letters only, underscores instead of spaces).

  3. In LLM Integration, select which Large Language Model (LLM) to use.
    You can use the built-in System OpenAI Key or connect your own LLM in Team Settings → LLM Integrations.
    Supported providers: OpenAI, Google, Anthropic, DeepSeek, and xAI.

  4. In LLM Model, choose the model to run your prompt.
    For the System OpenAI Key, you can use gpt-5-mini or gpt-4o-mini.
    You can also adjust parameters or apply preset configurations.

    LLM Model parameters
  5. In Prompt, write the instructions you want this variable to follow.
    Use Insert Variable to include system variables that pass data from contacts or companies, for example:

    “Translate {{position}} to Spanish — return only translation.”

  6. Enable Fallback and set a static text value.
    This fallback will appear if the AI Variable fails to generate output (for example, if credits run out or required data is missing).

  7. To test your prompt, select a contact in the right panel and click Generate.
    Generation usually takes between 5 seconds and 1 minute.

    Testing an AI Variable
  8. When you’re satisfied with the output, click Create to save your AI Variable.

Using AI Variables in Automations

Once you’ve created your AI Variables, you can add them to automation nodes.
They can be used in message text or subject lines for:

  • Send Connection Request

  • Send Message

  • Send InMail (including the subject)

  • Send Email (including the subject)

  • Comment Latest Post

To use AI Variables in your automation:

  1. Open the Automation Builder.

  2. Create a new node or edit an existing one.

  3. In the message text block, click Insert Variable → AI Variables and select your variable.

    Inserting AI Variable in automation
  4. You can also insert AI Variables into Subject fields for InMail or Email nodes.

    Using AI Variable in Subject
  5. That’s it — the variable will generate personalized text for each contact automatically during task execution.

Using AI Variables in Messenger

To use AI Variables in direct messages, first create AI Templates that reference your variables.

  1. Click Create in the sidebar.

    Create AI Template
  2. In the modal window, set:

    • Template name

    • Message type

    • Share with team (optional visibility toggle)
      Then click Create.

      Template creation modal
  3. Enter your message text, including AI Variables, then click Save.

    Saving AI Template
  4. Open Messenger and select a contact.

  5. Click AI Templates below the message input field.

    AI Templates in Messenger
  6. Choose your template and wait for it to generate.

  7. Once ready, you’ll see the generated text.

    Generated message example
  8. Edit the text if needed and click Send.

Troubleshooting

The “Generate” button keeps loading and then shows an error

Timeout error message

This usually happens due to a timeout — the LLM didn’t finish processing within one minute.
Try again; if the issue persists, contact support.

Error: “You have reached your LLM credits limit”

LLM credits limit error

This means the selected LLM has run out of available credits.

  • If you use your own LLM, manage credits directly from your provider’s platform.

  • If you use the built-in System OpenAI Key, you can check your balance by clicking Credits in the top-right corner of the screen.

    LLM credits button

If credits are depleted, AI Variable generation will be unavailable.
Wait for the next credit allocation or switch to your own LLM integration.

Each team currently receives 1000 LLM credits during the testing phase.
This limit may change later depending on your subscription plan.

Did this answer your question?