How to Use the OpenRouter Generate Response Workflow Action in Sparkforge

By Sparkforge Support Team ·Last reviewed May 3, 2026

The OpenRouter Generate Response action sends prompts to AI models and returns the result as a workflow variable, so you can automate replies, summaries, and personalized messages.

The Generate Response action lets a Sparkforge workflow call an AI model through OpenRouter and use the result in later steps — sending a message, updating a contact, or routing to another action.

What the action does

You write a prompt, pick a model, and the workflow sends the request to OpenRouter at runtime. The response comes back as an output variable you can reference downstream with merge fields.

OpenRouter is a gateway to multiple model providers, so one integration covers conversational replies, summaries, classification, or marketing copy generation.

Connect your OpenRouter account

  1. Go to Settings.
  2. Open Integrations.
  3. Find OpenRouter in the list.
  4. Click Connect.
  5. Paste your OpenRouter API key.
  6. Click Save.

System Prompt vs Prompt

The System Prompt sets persistent behavior — tone, role, formatting rules. It stays consistent across runs.

The Prompt is the specific request for a single execution and usually pulls in dynamic data through merge fields.

Example

System Prompt: You are a friendly sales assistant that writes short, persuasive messages.

Prompt: Write a follow-up message for {{contact.first_name}} who downloaded our pricing guide.

Add the action to a workflow

  1. Open Automation > Workflows.
  2. Open or create a workflow.
  3. Click Add to insert a step.
  4. In the Actions panel, open the Apps tab.
  5. Select OpenRouter, then Generate Response.

Configure the action

  • Action Name — label it clearly when you use multiple AI actions in one workflow.
  • Model — pick the OpenRouter model that fits the task and budget.
  • System Prompt — define behavior and constraints.
  • Prompt — write the task, with merge fields for contact or workflow variables.
  • Output — the response is stored as a variable for later steps.

Where to use the response

Common downstream steps:

  • Send SMS or email with the generated text
  • Add the result as an internal note on the contact
  • Update a custom field
  • Pass it to another action through merge fields

Frequently Asked Questions

Do I need my own OpenRouter API key?
Yes. Create an account at OpenRouter, generate an API key, and paste it into the Sparkforge integrations page.
Which models can I pick?
Any model OpenRouter exposes through your account. Choose by quality, latency, and per-token cost depending on the task.
Can the response be used in SMS or email steps?
Yes. The output variable can be inserted into any later workflow action that accepts merge fields.
Do I pay Sparkforge or OpenRouter for token usage?
Token usage is billed by OpenRouter against the API key you connected. Sparkforge does not mark up model costs.
What's the difference between the System Prompt and the Prompt?
The System Prompt defines persistent behavior — tone, rules, persona. The Prompt is the specific task for a single run, and usually contains the dynamic merge fields.

Was this article helpful?