{
  "id": "HYmhoBTyrdnZ8bAL",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Powered Blog Writing",
  "tags": [],
  "nodes": [
    {
      "id": "65f804e0-15e8-4e4d-8d9d-86b3822d3614",
      "name": "Outline Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        536,
        380
      ],
      "parameters": {
        "text": "=Here is the topic to write a blog about: {{ $json.output }}",
        "options": {
          "systemMessage": "# Overview\nYou are an expert outline writer. Your job is to generate a structured outline for a blog post with section titles and key points."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "559d723e-954a-457d-bb8e-062dc8915807",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 940,
        "height": 260,
        "content": "# Prompt Chaining\n \u2705 Improved Accuracy and Quality \u2013 Each step focuses on a specific task, reducing errors and hallucinations.\n\n \u2705 Greater Control Over Each Step \u2013 You can refine or tweak individual steps without affecting the entire process.\n\n \u2705 Specialization Leads to More Effective AI Agents \u2013 Each AI agent becomes a specialist rather than a generalist, improving reliability.\n\n \u2705 Easier Debugging and Optimization \u2013 If an output isn\u2019t ideal, you only need to fix the weak link rather than redoing everything.\n\n \u2705 More Scalable and Reusable Workflows \u2013 A structured, step-by-step workflow can be repurposed for different use cases.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "18e552bf-ebae-4aa0-9244-a6753ee4ec92",
      "name": "Outline Evaluation",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        912,
        380
      ],
      "parameters": {
        "text": "=Here is the outline: \n\n{{ $json.output }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an expert blog evaluator. Revise this outline and ensure it covers the following key criteria: \n(1) Engaging Introduction \n(2) Clear Section Breakdown\n(3) Logical Flow\n(4) Conclusion with Key Takeaways\n\n## Output\nOnly output the revised outline."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "bf5bc10e-574f-4650-9422-21647d405821",
      "name": "Blog Writer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1288,
        380
      ],
      "parameters": {
        "text": "=Here if the revised outline: {{ $json.output }}",
        "options": {
          "systemMessage": "=# Overview\nYou are an expert blog writer. Generate a detailed blog post using the outline with well-structured paragraphs and engaging content."
        },
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "22ed99f2-2d63-40e4-9aa8-427994ecab86",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        624,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b604cdd2-c6db-48db-a946-b756e910e361",
      "name": "Azure OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1000,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "67dcf633-5cc0-468a-95d9-6b85282a5419",
      "name": "Azure OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        1376,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dbd44165-f8e6-41f7-b0e9-1f770596d20c",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -60,
        380
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 5
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b9f95c9-74a4-42b0-a1fc-335d36754cc8",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        160,
        380
      ],
      "parameters": {
        "text": "You are an AI agent specializing in generating blog topic ideas specifically for the Sparrow API testing platform. Your role is to analyze the latest trends, user needs, and industry developments related to API testing and the Sparrow platform. When provided with information about the target audience or content objectives, you will suggest a range of blog topics tailored to Sparrow\u2019s features, use cases, best practices, and integration tips. For each topic, include a clear title, a brief description outlining the blog\u2019s focus, and a note on how it benefits Sparrow users or those interested in API testing. Your recommendations should be relevant, actionable, and designed to help users maximize their experience with the Sparrow API testing platform.",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2
    },
    {
      "id": "3ae23f34-844e-4e6f-a56e-faf8c4b1ed03",
      "name": "Azure OpenAI Chat Model3",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        248,
        600
      ],
      "parameters": {
        "model": "gpt-4o",
        "options": {}
      },
      "credentials": {
        "azureOpenAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "23d4155c-fb24-481f-a3d7-ffb03c928d41",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1664,
        380
      ],
      "parameters": {
        "columns": {
          "value": {
            "Blog": "={{ $json.output }}",
            "Date": "={{ $now.format('dd/MM/yyyy') }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Blog",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Blog",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1BK_pkJ3kn2Xm-xOstWTQQMfHB-DZZwEf9jZ4SGRxhV8/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1BK_pkJ3kn2Xm-xOstWTQQMfHB-DZZwEf9jZ4SGRxhV8",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1BK_pkJ3kn2Xm-xOstWTQQMfHB-DZZwEf9jZ4SGRxhV8/edit?usp=drivesdk",
          "cachedResultName": "Blogs"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.6
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e196efb3-acc6-4535-aa90-85c46ce2088a",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Outline Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Blog Writer": {
      "main": [
        [
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Outline Writer": {
      "main": [
        [
          {
            "node": "Outline Evaluation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Outline Evaluation": {
      "main": [
        [
          {
            "node": "Blog Writer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Outline Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Outline Evaluation",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Blog Writer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model3": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}