Skip to content

LLM: generate text

Use LLM: generate text to ask a Claude model for a short piece of text mid-journey, then reuse it in a later push, email, or SMS. This point authenticates with its own Anthropic API key. It doesn’t use any account-level integration configured elsewhere in Settings.

Typical uses:

  • Personalize a message line: draft a one-line hook from a traveler’s tags, then drop it into the next push or email with Dynamic Content.
  • Summarize before sending: turn a few tags, such as last order or browsing category, into a short natural-language line a template can display.
  • Vary the wording: ask for a slightly different phrasing on each run so travelers don’t see identical text every time they pass through.

Configure the point

Anchor link to
  1. Drag LLM: generate text from the Integrations section of the left panel onto the canvas.
  2. Double-click the point and enter a Step Name.
  3. In Anthropic API key, enter your Anthropic API key. It’s stored masked, like a webhook secret header.
LLM generate text drawer with Step Name filled and Anthropic API key masked
  1. In Model, choose the Claude model to use. Defaults to claude-haiku-4-5.

    • claude-haiku-4-5: answers fastest.
    • claude-sonnet-5: a middle option between Haiku and Opus.
    • claude-opus-5: slower than the other two, but still finishes within the point’s 10-second timeout. Costs more per token than Sonnet or Haiku.

    Every call bills your own Anthropic key for every traveler who reaches this step.

Model field set to claude-haiku-4-5 with the per-model timing note
  1. In Prompt, write what you want the model to generate. It takes the same macros as any Webhook body, for example {{device:hwid}}.
Prompt field with a product recommendation prompt using a tag macro
  1. Click Save.

Responses are capped at about 300 tokens (roughly a short paragraph) to keep the request inside the Webhook timeout. Ask for something that short. A longer or more detailed prompt doesn’t get more room to answer.

The traveler continues to whatever step you connect next on the canvas.

Attributes after the step runs

Anchor link to
AttributeWhat it holds
llm_textThe generated text
llm_input_tokensToken count for the request’s input
llm_output_tokensToken count for the request’s output

How to use llm_text in later steps

Anchor link to

Failures and unexpected responses

Anchor link to

A failed request drops the traveler from the journey. See Errors and failed requests.

A response that comes back but isn’t what you expected keeps the traveler in the journey:

  • Text cut off at the 300-token cap: llm_text holds the truncated text.
  • Model declined to answer: llm_text holds whatever it replied with instead.

Example scenario: Personalizing a re-engagement push with Claude

Anchor link to

A team wants a lapsed user’s re-engagement push to open with a one-line personalized hook instead of generic copy.

  1. Add a Trigger-based entry element and set it to fire on a UserLapsed event.
  2. Add LLM: generate text right after it. In Prompt, write Write one short, upbeat sentence inviting {{tag:Name}} back, mentioning they browsed {{tag:Last Category}}.
  3. Add a Push step right after it. In the message editor, click Personalization and insert llm_text into the push text.

Once this runs, each lapsed user gets a push that opens with a line Claude generated for them, instead of the same static copy for everyone.