Affiliate Threads
An AI-assisted affiliate content engine for Meta Threads, built as a Hermes Agent plugin. It turns product candidates in your Google Sheet into research-backed, conversation-oriented posts — and publishes nothing until a human approves it.
Self-hosted · MIT licensed · Hermes Agent plugin
The rule it is built around
AI creates and reasons. Code controls and validates. Human approves. Threads publishes. Google Sheets records the business state.
Publishing is the one step the model never takes by itself: a post goes through threads_publish, which re-checks the row and waits for your approval.
How it works
- 1.Candidates live in a Google Sheet you own: product, description, affiliate URL, category, and a status. The pipeline picks exactly one row marked Ready To Generate — deterministically, never by model choice.
- 2.Before any research, it asks whether you have used the product, and parks until you answer. Your Used and Testimonial cells decide whether the copy may speak from experience.
- 3.Research starts on the open web; the seller's description is background, never evidence. Then come the angle, a one-line point of view, your voice, a beat plan, and hook variants.
- 4.The drafts run through an anti-slop audit, a naturalization rewrite, the affiliate editorial and evidence reviews, and a check against your recent posts for repeated shapes.
- 5.A Telegram preview shows the draft with its topic tag, angle, hook, and beats. You approve, hold, cancel, or ask for a regenerate.
- 6.On approval, threads_publish re-checks the row, publishes through the official Threads Graph API, and only then writes Status and the post URL back to the sheet.
What it needs
- Hermes Agent, with the gateway configured for Telegram.
-
A Meta app with the Threads use case, and a long-lived Threads
user token with
threads_basicandthreads_content_publish. - A Google Sheet with the candidate columns, authorized through the bundled google-workspace skill.
Quick start
hermes plugins install msyamsularif/affiliate-threads-generator --enable
hermes gateway restart
The install prompts for the credentials it needs — the Threads
token, the sheet id, and the tab name — and Hermes stores them. The
plugin arrives as one bundle: its tools, hooks, skill, and the
/affiliate-threads status command.
Full instructions: docs/installation.md.
Documentation
- Installation — install the plugin and verify the wiring.
- Configuration — every setting, with its default.
- Threads app setup — create the Meta app, mint the long-lived token, and keep it alive.
- Google Sheets setup — build the candidate sheet and the columns the pipeline reads.
- Cron setup — schedule generation, and the monthly token refresh.
- Operations runbook — day-to-day operation, and what to check when something breaks.
- Credentials — where each value comes from, and how to rotate it.
- Anti-slop integration — how the bundled writing-quality skill slots into the pipeline.
The AIffiliate app
AIffiliate is the Meta Threads app the plugin publishes through — a
Threads-use-case app you register and authorize yourself. It asks
Meta for two permissions and nothing more:
threads_basic and threads_content_publish.
Posts go only to the account behind the token, only after a human approves them, and only through Meta's official Graph API. Replies, followers, and insights are outside its permissions.