Skip to content

OpenAI: generate text

Use OpenAI: generate text to ask an OpenAI 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 OpenAI 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 OpenAI: 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 OpenAI API key, enter your OpenAI API key. It’s stored masked, like a webhook secret header.
OpenAI generate text drawer with Step Name filled and OpenAI API key masked
  1. In Model, choose the OpenAI model to use. Defaults to gpt-5-mini.

    • gpt-5-nano and gpt-5-mini: both answer well within the point’s 10-second timeout.
    • gpt-5: can run close to the timeout on a long prompt. Costs more per token than the smaller models.

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

Model field set to gpt-5-mini 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.

Reasoning is set to minimal and 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: Drafting a browse-abandonment email line with OpenAI

Anchor link to

A team wants a browse-abandonment email to open with a line about the specific product a visitor looked at, instead of a generic “come back” subject.

  1. Add a Trigger-based entry element and set it to fire on a ProductViewedNoPurchase event.
  2. Add OpenAI: generate text right after it. In Prompt, write Write one short sentence recommending {{tag:Last Viewed Product}} to a shopper who looked at it but didn't buy.
  3. Add a Send Email step right after it, using Dynamic Content to insert llm_text into the email body.

Once this runs, each visitor gets an email opening line about the exact product they viewed, instead of one generic line for the whole segment.