Skip to content

Social media workflow: automated X/Twitter and LinkedIn posting from internal triggers (releases, PRs, announcements) #9

Description

@Al629176

Summary

Design and implement automated social media workflows using the existing orchestration framework. Workflows should be able to tweet, retweet, and reply on X/Twitter, and post or reply on LinkedIn — triggered from internal events such as new releases, major merged PRs, or curated announcements — with an approval step before anything goes public.

Problem

Social media posts around releases and major updates are currently done manually, are inconsistent, and often miss the window when a topic is buzzing. Automating this via the workflow framework lets the team capture every release moment and maintain a steady content cadence without per-post manual effort.

Solution

Build two workflow definitions (X/Twitter and LinkedIn) that:

  1. Listen for internal triggers (GitHub release event, major PR merge, or a manual "announce this" trigger)
  2. Draft the post content (using the LLM inference layer)
  3. Route for human approval before publishing
  4. Post/reply/retweet via the respective platform API

Workflow A — X / Twitter

Triggers

  • New GitHub release published
  • PR merged with label announce or major
  • Manual trigger with a topic/URL payload

Actions

  • Draft a tweet (280 chars) using the release notes or PR description as context
  • Optionally draft a thread (2–3 tweets) for bigger releases
  • Retweet / quote-tweet a related external post if provided
  • Reply to a specific tweet ID if triggered with one

Approval gate

  • Post draft + preview to a private Slack/Discord channel or internal dashboard
  • Require explicit approval (reaction or button click) before the tweet goes out
  • If no approval within X hours, draft expires without posting

Implementation

  • X/Twitter OAuth2 credentials stored in secrets (not hardcoded)
  • twitter_post workflow node: takes text + optional media, posts tweet, returns tweet ID
  • twitter_reply workflow node: takes tweet ID + text, posts reply
  • twitter_retweet workflow node: takes tweet ID, retweets or quote-tweets
  • LLM draft step: takes release notes / PR body → outputs tweet draft
  • Approval step: sends draft to approval channel, waits for signal
  • Full workflow wired together and triggered from GitHub release webhook

Workflow B — LinkedIn

Triggers

  • Same as X (release, major PR, manual)
  • Can also trigger on blog post publication

Actions

  • Draft a LinkedIn post (longer form, 1–3 paragraphs) from the same source content
  • Reply to a specific LinkedIn post/comment if triggered with a post ID

Approval gate

  • Same pattern as X — draft goes to approval channel before publishing

Implementation

  • LinkedIn OAuth2 credentials stored in secrets
  • linkedin_post workflow node: takes text + optional URL/media, creates post
  • linkedin_reply workflow node: takes post URN + text, posts comment
  • LLM draft step: takes release notes / PR body → outputs LinkedIn-appropriate longer-form draft
  • Approval step: same pattern as X
  • Full workflow triggered from GitHub release webhook

Shared infrastructure

  • A reusable approval_gate workflow node that sends a draft to a configured channel and waits for a human approval signal before continuing (used by both A and B)
  • Secrets management: API keys/tokens stored securely, never in workflow definition files
  • Dry-run mode: run the full workflow but skip the actual API post (for testing)
  • Rate-limit awareness: don't fire multiple posts within a short window for the same event

Acceptance criteria

  • A new GitHub release automatically drafts a tweet and a LinkedIn post, routes both for approval, and publishes upon approval
  • announce-labelled PR merge triggers the same flow
  • Approval gate works — unapproved drafts never post
  • Dry-run mode confirmed working
  • Secrets are not exposed in logs or workflow definitions
  • Both workflows tested end-to-end in staging before production rollout

Related

  • Orchestration framework: tinyhumansai/openhuman orchestration layer
  • Workflow builder: tinyhumansai/tinyflows
  • Discord release notifications: openhuman #4841

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions