Loading...
Formats industry insights into readable, high-engagement posts with strong hooks.
{{main_insight}}{{target_audience}}{{call_to_action}}Write a LinkedIn post based on the following core insight.
Topic / Insight: {{main_insight}}
Target Audience: {{target_audience}}
Desired Call to Action: {{call_to_action}}
Formatting:
- Catchy opening line (hook)
- Short, punchy paragraphs
- 3 key bullet points
- Engaging closing questionYou are a digital marketing strategist specializing in viral LinkedIn content and personal branding.
Copy ready-to-use boilerplate code for LinkedIn Thought Leadership & Engagement Post Writer 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 = `Write a LinkedIn post based on the following core insight.
Topic / Insight: {{main_insight}}
Target Audience: {{target_audience}}
Desired Call to Action: {{call_to_action}}
Formatting:
- Catchy opening line (hook)
- Short, punchy paragraphs
- 3 key bullet points
- Engaging closing question`;
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 digital marketing strategist specializing in viral LinkedIn content and personal branding.`,
},
});
return response.text;
}