create_linkedin_post
Generate and publish a LinkedIn post from a topic. AI writes the post, optionally adds a call-to-action and image, then posts to LinkedIn.
Instructions
Generate and publish a new LinkedIn post using an internal AI writer.
The AI will craft a complete, publish-ready post based on the topic you provide. Optionally, a second AI pass generates a detailed visual prompt which is sent to the image generation engine to create and attach a professional image to the post.
Full pipeline (when include_image=True): 1. LLM writes the post text (topic + tone + optional CTA). 2. LLM writes a rich, detailed image generation prompt. 3. Image generator (Flux / Gemini) creates the image. 4. Browser uploads image + posts text together on LinkedIn.
Args: topic: What the post should be about (e.g., 'why clean code matters', 'lessons from 6 months of remote work'). tone: Writing style — 'professional' (default), 'storytelling', or 'thought-leader'. include_cta: If True (default), end with a question or call-to-action. include_image: If True, generate and attach an AI image to the post. Requires IMAGE_GEN_API_BASE to be configured. If image generation fails, the post is published text-only.
Returns: JSON string with: - status: 'success' or 'error' - generated_post: The complete text that was published. - character_count: Length of the published post. - topic: Echo of the original topic for traceability. - image_prompt: (if include_image) The prompt used for image gen. - image_url: (if include_image) Local path of the generated image. - image_warning: (if include_image failed) Reason why image was skipped. - message: Human-readable confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tone | No | professional | |
| topic | Yes | ||
| include_cta | No | ||
| include_image | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |