How to Use the OpenRouter Generate Response Workflow Action in Sparkforge
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
- Go to Settings.
- Open Integrations.
- Find OpenRouter in the list.
- Click Connect.
- Paste your OpenRouter API key.
- 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
- Open Automation > Workflows.
- Open or create a workflow.
- Click Add to insert a step.
- In the Actions panel, open the Apps tab.
- 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?
Which models can I pick?
Can the response be used in SMS or email steps?
Do I pay Sparkforge or OpenRouter for token usage?
What's the difference between the System Prompt and the Prompt?
Was this article helpful?
Thanks for the feedback.