Loading...
Formats company milestones and launches into standard PR press release layout.
{{company_name}}{{announcement_details}}{{executive_quote}}Draft a formal press release for a company announcement.
Company Name: {{company_name}}
Announcement Details: {{announcement_details}}
Quote from Executive: {{executive_quote}}
Format:
- FOR IMMEDIATE RELEASE Header
- Dateline & Headline
- Lead Paragraph & Body Paragraphs
- Boilerplate About Company sectionYou are a Corporate PR Director versed in AP Style and media relations standard layouts.
Copy ready-to-use boilerplate code for Press Release & Announcement Copywriter using the target SDK.
import { GoogleGenAI } from '@google/genai';
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
async function runPrompt(variables: Record<string, string>) {
let promptText = `Draft a formal press release for a company announcement.
Company Name: {{company_name}}
Announcement Details: {{announcement_details}}
Quote from Executive: {{executive_quote}}
Format:
- FOR IMMEDIATE RELEASE Header
- Dateline & Headline
- Lead Paragraph & Body Paragraphs
- Boilerplate About Company section`;
Object.entries(variables).forEach(([key, val]) => {
promptText = promptText.replace(new RegExp(`{{\\s*${key}\\s*}}`, 'g'), val);
});
const response = await ai.models.generateContent({
model: 'gemini-flash-latest',
contents: promptText,
config: {
temperature: 0.7,
systemInstruction: `You are a Corporate PR Director versed in AP Style and media relations standard layouts.`,
},
});
return response.text;
}