Workflow Action: OpenRouter Generate Response
AI-powered responses allow workflows to generate dynamic messages, summaries, and contextual outputs automatically. The Generate Response action enables Patient Copilot users to connect workflows with advanced AI models through OpenRouter, allowing automated responses based on prompts, workflow data, and contact information. This makes it possible to automate personalized messaging, summarize conversations, or generate intelligent responses without manual input. * * * ## What is Generate Response Workflow Action? The Generate Response workflow action allows workflows in Patient Copilot to generate AI-powered responses using models accessed through OpenRouter. By sending prompts to a selected AI model, workflows can automatically produce dynamic responses based on instructions, context, and workflow variables. OpenRouter acts as a gateway that provides access to multiple AI models. This allows Patient Copilot users to select the model that best fits their automation needs, whether generating conversational replies, summarizing data, or producing personalized marketing content. When the workflow reaches this action, the prompt is sent to the selected model, the model generates a response, and the result becomes available as an output variable that can be used in later workflow steps such as sending messages or updating records. * * * ## Key Benefits of OpenRouter: Generate Response AI response generation unlocks powerful automation capabilities inside workflows by enabling dynamic and context-aware messaging. Using OpenRouter expands this capability by providing access to multiple AI models through a single integration. - Multi-Model Access: Connect to multiple AI providers through OpenRouter and choose the best model for each automation task. - Dynamic AI Responses: Automatically generate responses using prompts and workflow variables for highly personalized outputs. - Flexible Automation: Use AI-generated responses in SMS, email, internal notifications, or CRM updates. - Custom Prompt Control: Define system prompts and instructions to control tone, behavior, and formatting of AI responses. - Scalable Automation: Generate intelligent responses across large workflows without manual intervention. * * * ## Connect Your OpenRouter Account Before using the Generate Response action in workflows, the OpenRouter integration must be connected. This connection allows Patient Copilot to securely communicate with OpenRouter’s AI models using your API key. Connecting the integration ensures that workflows can send prompts to AI models and receive generated responses. ### Steps to Connect OpenRouter 1. Navigate to Settings. 2. Select Integrations. 3. Locate OpenRouter from the integrations list. 4. Click Connect. 5. Enter your OpenRouter API Key. 6. Click Save to complete the integration.!(https://assets.patientcopilot.ai/09de2be32a7219ca.png)!(https://assets.patientcopilot.ai/f593167bfd450041.png) * * * ## Using System Prompt vs Prompt Understanding the difference between the System Prompt and the Prompt is important for creating effective AI-generated responses. The System Prompt defines the AI’s personality, behavior, or rules. It remains consistent across requests and helps control how the AI behaves. The Prompt defines the specific task or question the AI should complete. Example configuration: System Prompt: You are a friendly sales assistant that writes short and persuasive messages. Prompt: Create a follow-up message for {{contact.first_name}} who downloaded our pricing guide. This separation allows workflows to maintain a consistent AI behavior while dynamically generating responses for different contacts. * * * ## How To Setup OpenRouter: Generate Response Action After connecting the OpenRouter integration, the Generate Response workflow action can be added to a workflow to generate AI-powered responses automatically. This action sends a prompt to the selected AI model through OpenRouter and returns the generated response, which can then be used in later workflow steps such as sending messages or updating CRM records. ### Step 1: Add a New Action to the Workflow 1. ### Navigate to Automation → Workflows. 2. Open an existing workflow or create a new workflow. 3. In the workflow builder, click Add to insert a new step. 4. The Actions panel will appear on the right side of the screen.!(https://assets.patientcopilot.ai/d6e67b4def7289e2.png)!(https://assets.patientcopilot.ai/8cc738dfcec05bc6.png) ### Step 2: Select the OpenRouter App 1. ### Inside the Actions panel, select the Apps tab. 2. Scroll through the installed applications list. 3. Locate OpenRouter.!(https://assets.patientcopilot.ai/3885b02fd8c84988.png) ### Step 3: Choose the Generate Response Action 1. ### Click OpenRouter to expand the available actions. 2. Select Generate Response. This action runs a prompt through the selected AI model and returns the generated response to the workflow.!(https://assets.patientcopilot.ai/363916c57b362ecf.png) ### Step 4: Configure the Generate Response Action After selecting the action, the Generate Response configuration panel will open. This panel contains the fields used to define how the AI should behave and what response it should generate. ### Action Name The Action Name field allows you to give the workflow action a custom name. This is useful when workflows contain multiple AI actions and you want to easily identify their purpose. Example: Generate Lead Follow-Up Email ### System Prompt The System Prompt defines the role, tone, and behavior the AI model should follow when generating responses. This instruction helps guide how the AI interprets prompts and structures its replies. Use this field to establish the AI’s role or personality. Example: You are a helpful front office assistant that provides clear, professional responses to customer inquiries.!(https://assets.patientcopilot.ai/b375b303382851c4.png) ### Prompt The Prompt defines the specific task the AI should perform. This is the instruction sent to the selected AI model. Prompts can include workflow variables to dynamically generate responses based on contact data or workflow context. Example prompt: ```
You are an Email Assistant. Your task is to write clear, professional emails based on the user’s intent, audience, and key details.