SOP-22: AI Batch Create Forum Posts

API SOP

AI agent creates multiple forum posts on behalf of different users. Requires admin token.

3 nodes · 3 edgesmedirank
apisopmedirankpostsai-agentbatch
ex-sop-22-ai-batch-posts.osop.yaml
# 原始:SOP-22: 批次建立多篇文章(AI 代發)
osop_version: '1.0'
id: sop-22-ai-batch-posts
name: 'SOP-22: AI Batch Create Forum Posts'
description: AI agent creates multiple forum posts on behalf of different users. Requires admin token.
version: 1.0.0
tags:
- api
- sop
- medirank
- posts
- ai-agent
- batch
nodes:
- id: step_ai
  type: agent
  subtype: llm
  name: AI generates post content
  description: AI agent generates titles and content for multiple forum posts.
- id: step_1
  type: api
  subtype: rest
  name: GET /users
  description: Get list of user IDs to post on behalf of.
  runtime:
    method: GET
    url: https://medi-rank.com/api/v1
    endpoint: /users
    headers:
      Authorization: Bearer ${secrets.TOKEN}
- id: step_2
  type: api
  subtype: rest
  name: POST /posts
  description: Create a forum post as a specific user. Repeat for each post in the batch.
  runtime:
    method: POST
    url: https://medi-rank.com/api/v1
    endpoint: /posts
    headers:
      Authorization: Bearer ${secrets.TOKEN}
    body:
      title: AI-generated post title
      content: <p>AI-generated content</p>
      user_id: ${user_id}
      tags[]:
      - tag
edges:
- from: step_ai
  to: step_1
  mode: sequential
- from: step_1
  to: step_2
  mode: sequential
- from: step_2
  to: step_2
  mode: loop
  when: more_posts_to_create
  label: 'Rate limit: max 60 req/min, retry after 429'