{
  "name": "Soke — Content Optimization Pipeline",
  "flow": [
    {
      "id": 1,
      "module": "http:ActionSendData",
      "version": 3,
      "parameters": { "handleErrors": true, "useNewZLibDeCompress": true },
      "mapper": {
        "url": "https://api.usesoke.ai/api/v1/research/keywords",
        "method": "post",
        "headers": [
          { "name": "Content-Type", "value": "application/json" },
          { "name": "X-Soke-Key", "value": "sk_live_your_api_key" }
        ],
        "bodyType": "raw",
        "parseResponse": true,
        "contentType": "application/json",
        "body": "{\"topic\": \"productivity tips for developers\", \"platform\": \"youtube\", \"maxResults\": 10}"
      },
      "metadata": {
        "designer": { "x": 0, "y": 0 },
        "expect": [
          { "name": "url", "type": "url", "label": "URL", "required": true },
          "name", "method", "type", "select", "label", "Method", "required", true
        ]
      }
    },
    {
      "id": 2,
      "module": "http:ActionSendData",
      "version": 3,
      "parameters": { "handleErrors": true, "useNewZLibDeCompress": true },
      "mapper": {
        "url": "https://api.usesoke.ai/api/v1/content/optimize-title",
        "method": "post",
        "headers": [
          { "name": "Content-Type", "value": "application/json" },
          { "name": "X-Soke-Key", "value": "sk_live_your_api_key" }
        ],
        "bodyType": "raw",
        "parseResponse": true,
        "contentType": "application/json",
        "body": "{\"draftTitle\": \"How to boost your productivity as a developer\", \"platform\": \"youtube\", \"keywords\": {{1.data.data.keywords}}}"
      },
      "metadata": {
        "designer": { "x": 300, "y": 0 }
      }
    },
    {
      "id": 3,
      "module": "http:ActionSendData",
      "version": 3,
      "parameters": { "handleErrors": true, "useNewZLibDeCompress": true },
      "mapper": {
        "url": "https://api.usesoke.ai/api/v1/content/generate-description",
        "method": "post",
        "headers": [
          { "name": "Content-Type", "value": "application/json" },
          { "name": "X-Soke-Key", "value": "sk_live_your_api_key" }
        ],
        "bodyType": "raw",
        "parseResponse": true,
        "contentType": "application/json",
        "body": "{\"title\": \"{{2.data.data.alternatives[0].title}}\", \"platform\": \"youtube\", \"keywords\": {{1.data.data.keywords}}, \"tone\": \"casual\"}"
      },
      "metadata": {
        "designer": { "x": 600, "y": 0 }
      }
    },
    {
      "id": 4,
      "module": "util:SetVariable2",
      "version": 1,
      "parameters": {},
      "mapper": {
        "name": "result",
        "value": "Title: {{2.data.data.alternatives[0].title}} | Description: {{3.data.data.description}}"
      },
      "metadata": {
        "designer": { "x": 900, "y": 0 }
      }
    }
  ],
  "metadata": {
    "version": 1,
    "scenario": {
      "roundtrips": 1,
      "maxErrors": 3,
      "autoCommit": true,
      "autoCommitTriggerLast": true,
      "sequential": true,
      "confidential": false,
      "dataloss": false,
      "dlq": false
    },
    "designer": { "orphans": [] }
  }
}
