{
  "name": "Generate and post Google Play review replies with Anthropic Claude and Google Drive",
  "nodes": [
    {
      "id": "c2a94739-ae45-41ee-abda-66c7b43645c4",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        3456,
        384
      ]
    },
    {
      "id": "c432ea5d-1dd7-4fe8-8764-d7a7b4cbede3",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        3616,
        384
      ]
    },
    {
      "id": "bd519b52-088d-48e1-8c84-d7fc82a6d5ca",
      "name": "Fetch list of applications",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        1424,
        32
      ]
    },
    {
      "id": "dda81596-5ebb-4ff9-97d1-90cd05557981",
      "name": "Fetch app bundle id and name",
      "type": "n8n-nodes-base.set",
      "position": [
        1648,
        32
      ]
    },
    {
      "id": "59714a87-67bc-4328-a3a1-f0f2dd6f181e",
      "name": "Loop over apps",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1856,
        32
      ]
    },
    {
      "id": "c2a32db0-f17c-4472-bfe6-6763e9fb6593",
      "name": "Fetch reviews from Google Play",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2128,
        176
      ]
    },
    {
      "id": "fa77246f-b163-4413-bec2-22c4acf8b44f",
      "name": "Fetch yesterday's reviews",
      "type": "n8n-nodes-base.filter",
      "position": [
        2560,
        176
      ]
    },
    {
      "id": "2546b019-1098-4a78-a9e4-c82b8829ca2c",
      "name": "Any reviews yesterday?",
      "type": "n8n-nodes-base.if",
      "position": [
        2800,
        176
      ]
    },
    {
      "id": "c32f5d87-434b-41e5-b8cf-6a6d590f5480",
      "name": "Fetch fields required by LLM",
      "type": "n8n-nodes-base.set",
      "position": [
        3040,
        160
      ]
    },
    {
      "id": "134edbf1-b114-4331-bba1-0daea747ac08",
      "name": "LLM Response Generator",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        3456,
        160
      ]
    },
    {
      "id": "52449955-61a6-4919-8273-dbdf8e672b1c",
      "name": "Get rid of empty items",
      "type": "n8n-nodes-base.filter",
      "position": [
        2128,
        -112
      ]
    },
    {
      "id": "a8bb4636-9efb-4300-a04f-b7079b3d71e5",
      "name": "Search responses ready to be posted",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1424,
        768
      ]
    },
    {
      "id": "a8fa1b3a-3d7e-4bc3-8ee1-3b751463932b",
      "name": "Post responses",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2080,
        768
      ]
    },
    {
      "id": "d1a4fe9c-a09c-4cd8-a1de-aa6a75be2aa0",
      "name": "Create a success log for the review",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2320,
        672
      ]
    },
    {
      "id": "f67c121f-b59b-4f60-8e98-e5ec86c14c48",
      "name": "Create an error log for the review",
      "type": "n8n-nodes-base.dataTable",
      "position": [
        2320,
        864
      ]
    },
    {
      "id": "7a9d4a66-5966-4a2a-aace-fa24d0084bf3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        16
      ],
      "parameters": {
        "width": 640,
        "height": 896,
        "content": "## Generate responses for Google Play Store reviews using Anthropic Claude, Google Drive and Google Play Store API \nThis workflow empowers app developers and community management teams by automating t"
      }
    },
    {
      "id": "1d470646-400e-42f1-b097-24e84d9c0797",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        0
      ],
      "parameters": {
        "width": 256,
        "height": 224,
        "content": "## FIRST STEP: GENERATE AI RESPONSES\nAt 10 am, download the previous day's reviews from Google Play Store and generate AI responses in a spreadsheet in *ToReview* folder"
      }
    },
    {
      "id": "49e8692c-92f8-46ae-8733-84d2cdf096dd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        368
      ],
      "parameters": {
        "width": 256,
        "height": 224,
        "content": "## SECOND STEP: HUMAN IN THE LOOP\nA human reviews the spreadsheet, makes any required adjustments to the responses and moves the spreadsheet to a different folder called *ToSubmit*"
      }
    },
    {
      "id": "80c24326-18f5-40e6-a5cb-9aa0598d52db",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        704
      ],
      "parameters": {
        "width": 256,
        "height": 224,
        "content": "## THIRD STEP: POST RESPONSES\nAt 5pm, fetch the spreadsheets in *ToSubmit* folder, post the responses using the Google Play Store API, create execution logs and move the processed spreadsheets to a di"
      }
    },
    {
      "id": "6ff7d7a4-cf93-4af0-9150-0819220cbc97",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2752,
        64
      ],
      "parameters": {
        "width": 192,
        "height": 256,
        "content": "If there are no reviews for the app from yesterday, continue the loop with the next app "
      }
    },
    {
      "id": "9fa0f3a6-9698-4c3e-ada3-b3af88d36e7e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        -176
      ],
      "parameters": {
        "width": 400,
        "height": 224,
        "content": "Collect all the reviews and responses in a spreadsheet"
      }
    },
    {
      "id": "d849a33e-860e-45db-a6ed-5592158c9479",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2496,
        -176
      ],
      "parameters": {
        "width": 208,
        "height": 224,
        "content": "Upload the spreadsheet to \"ToReview* folder"
      }
    },
    {
      "id": "8ef283b3-185a-4a61-a4b8-acf87aef6186",
      "name": "Upload spreadsheet",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2544,
        -112
      ]
    },
    {
      "id": "a2981f2b-e0ac-4a64-985f-b3875c698861",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        704
      ],
      "parameters": {
        "width": 192,
        "height": 240,
        "content": "Search the files in *ToSubmit* folder"
      }
    },
    {
      "id": "f8e792de-4597-4726-9e3d-faa367e89afa",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1600,
        704
      ],
      "parameters": {
        "width": 192,
        "height": 240,
        "content": "Download files in the folder"
      }
    },
    {
      "id": "fc40641c-766b-41d4-b3e5-df037cb83a90",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2080,
        64
      ],
      "parameters": {
        "width": 192,
        "height": 256,
        "content": "Fetch reviews from Google Play API "
      }
    },
    {
      "id": "27606a4c-1586-4ec4-92b7-a9e9d8fba5df",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2048,
        704
      ],
      "parameters": {
        "width": 176,
        "height": 240,
        "content": "Post responses using Google Play API"
      }
    },
    {
      "id": "58b73198-2b2a-482d-8744-d3b93b60c02f",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        944
      ],
      "parameters": {
        "width": 192,
        "height": 272,
        "content": "After posting all responses, move the spreadsheet to Archived folder"
      }
    },
    {
      "id": "94106cc1-92ac-4fd3-bf19-ef0ac948de89",
      "name": "Move spreadsheet to Archived folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1872,
        1040
      ]
    },
    {
      "id": "f3f27a99-0e61-4027-83c9-375ef3024cb1",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1376,
        -144
      ],
      "parameters": {
        "width": 416,
        "height": 352,
        "content": "### Data table fields \n* bundle_id: Google Play Store bundle id for each app. Bundle ids can be found in the Google Play Store url of the app. For example the bundle id of the app with url https://pla"
      }
    },
    {
      "id": "32417b29-40cd-4df6-af83-7d8f8514f2a5",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2256,
        496
      ],
      "parameters": {
        "width": 400,
        "height": 544,
        "content": "### Data table fields\n* reviewID: Google Play Store Identifier for each review.\n* bundleID: Corresponding application bundle identifier.\n* successful: Boolean status indicating the posting success."
      }
    },
    {
      "id": "e38727bc-7f63-4935-bb7f-0dd2801222ce",
      "name": "Split out fetched reviews",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2336,
        176
      ]
    },
    {
      "id": "c157f1bf-199a-4a73-b2db-741019221a46",
      "name": "Aggregate reviews for LLM use",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3248,
        160
      ]
    },
    {
      "id": "38c5b386-713f-41f4-abbc-cfdf6ca4c70b",
      "name": "Split responses",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        3776,
        160
      ]
    },
    {
      "id": "32dc7419-f649-426b-8318-a37474fe910d",
      "name": "Create the spreadsheet",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2336,
        -112
      ]
    },
    {
      "id": "334defb9-260a-4869-9f82-24608c203198",
      "name": "Download responses sheet",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1648,
        768
      ]
    },
    {
      "id": "c55f1fd7-b256-4ade-8aa1-7cdfe68ec50e",
      "name": "Extract responses",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1872,
        768
      ]
    },
    {
      "id": "3cd9af4c-9501-42c0-9ab9-0f14b9056414",
      "name": "Trigger download",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1200,
        32
      ]
    },
    {
      "id": "d9ee30a1-d365-44d6-8082-60f248520338",
      "name": "Trigger posting responses",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1168,
        768
      ]
    }
  ],
  "connections": {
    "Loop over apps": {
      "main": [
        [
          {
            "node": "Get rid of empty items",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Fetch reviews from Google Play",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post responses": {
      "main": [
        [
          {
            "node": "Create a success log for the review",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create an error log for the review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split responses": {
      "main": [
        [
          {
            "node": "Loop over apps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger download": {
      "main": [
        [
          {
            "node": "Fetch list of applications",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract responses": {
      "main": [
        [
          {
            "node": "Post responses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "LLM Response Generator",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Any reviews yesterday?": {
      "main": [
        [
          {
            "node": "Fetch fields required by LLM",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop over apps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create the spreadsheet": {
      "main": [
        [
          {
            "node": "Upload spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get rid of empty items": {
      "main": [
        [
          {
            "node": "Create the spreadsheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LLM Response Generator": {
      "main": [
        [
          {
            "node": "Split responses",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download responses sheet": {
      "main": [
        [
          {
            "node": "Extract responses",
            "type": "main",
            "index": 0
          },
          {
            "node": "Move spreadsheet to Archived folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "LLM Response Generator",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Fetch yesterday's reviews": {
      "main": [
        [
          {
            "node": "Any reviews yesterday?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split out fetched reviews": {
      "main": [
        [
          {
            "node": "Fetch yesterday's reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger posting responses": {
      "main": [
        [
          {
            "node": "Search responses ready to be posted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch list of applications": {
      "main": [
        [
          {
            "node": "Fetch app bundle id and name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch app bundle id and name": {
      "main": [
        [
          {
            "node": "Loop over apps",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch fields required by LLM": {
      "main": [
        [
          {
            "node": "Aggregate reviews for LLM use",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate reviews for LLM use": {
      "main": [
        [
          {
            "node": "LLM Response Generator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch reviews from Google Play": {
      "main": [
        [
          {
            "node": "Split out fetched reviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search responses ready to be posted": {
      "main": [
        [
          {
            "node": "Download responses sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}