{
  "id": "xVUJ5eOUjRLO1M3p",
  "meta": {
    "builderVariant": "mcp",
    "aiBuilderAssisted": true
  },
  "name": "Analyze Facebook post comments sentiment with OpenAI and Google Sheets",
  "tags": [],
  "nodes": [
    {
      "id": "d612e40f-eb0a-49fb-8bd0-79b5c3c5e5ba",
      "name": "Run Manually",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        0,
        192
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "69438f04-3a1f-4eda-8f63-938e75e5f943",
      "name": "Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        224,
        192
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "cfg-1",
              "name": "facebook_post_id",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Your Facebook Page Post ID, e.g. 123456789012345_678901234567890__>"
            },
            {
              "id": "cfg-2",
              "name": "sentiment_categories",
              "type": "string",
              "value": "Positive, Neutral, Negative"
            },
            {
              "id": "cfg-3",
              "name": "openai_model",
              "type": "string",
              "value": "gpt-5-mini"
            },
            {
              "id": "cfg-4",
              "name": "batch_size",
              "type": "number",
              "value": 5
            },
            {
              "id": "cfg-5",
              "name": "wait_seconds",
              "type": "number",
              "value": 2
            },
            {
              "id": "cfg-6",
              "name": "max_pages",
              "type": "number",
              "value": 20
            },
            {
              "id": "cfg-7",
              "name": "spreadsheet_id",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Your Google Sheet ID (from the sheet URL)__>"
            },
            {
              "id": "cfg-8",
              "name": "sheet_name",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Your sheet/tab name, e.g. Comments__>"
            },
            {
              "id": "cfg-9",
              "name": "summary_recipient_email",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Email address to receive the sentiment summary report__>"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "2dc1b83b-b38a-4024-af0f-07f0517d4fb3",
      "name": "Get Facebook Post",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        448,
        192
      ],
      "parameters": {
        "node": "={{ $('Configuration').item.json.facebook_post_id }}",
        "options": {
          "fields": {
            "field": [
              {
                "name": "id,message,created_time,permalink_url"
              }
            ]
          }
        },
        "graphApiVersion": "v21.0"
      },
      "typeVersion": 1
    },
    {
      "id": "32a8fbff-2be6-450a-85e1-9a3f3a4bcbff",
      "name": "Get Facebook Comments Page",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        672,
        192
      ],
      "parameters": {
        "edge": "comments",
        "node": "={{ $('Configuration').item.json.facebook_post_id }}",
        "options": {
          "fields": {
            "field": [
              {
                "name": "id,from,message,created_time,comment_count"
              }
            ]
          },
          "queryParameters": {
            "parameter": [
              {
                "name": "order",
                "value": "reverse_chronological"
              },
              {
                "name": "after",
                "value": "={{ $json.after || '' }}"
              },
              {
                "name": "summary",
                "value": "true"
              }
            ]
          }
        },
        "graphApiVersion": "v21.0"
      },
      "typeVersion": 1
    },
    {
      "id": "33b48fb5-de65-4779-909a-ef12538e44dd",
      "name": "Has Next Page?",
      "type": "n8n-nodes-base.if",
      "position": [
        896,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "cond-1",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $('Get Facebook Comments Page').item.json.paging.cursors.after }}",
              "rightValue": ""
            },
            {
              "id": "cond-2",
              "operator": {
                "type": "number",
                "operation": "lt"
              },
              "leftValue": "={{ $json.page_count || 0 }}",
              "rightValue": "={{ $('Configuration').item.json.max_pages }}"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "12aee985-478b-4052-a176-b081f41a9a1b",
      "name": "Set Next Page Cursor",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "np-1",
              "name": "after",
              "type": "string",
              "value": "={{ $json.paging.cursors.after }}"
            },
            {
              "id": "np-2",
              "name": "page_count",
              "type": "number",
              "value": "={{ ($json.page_count || 0) + 1 }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "df462f16-1b4d-473e-a153-c33d71830add",
      "name": "Call 'Analyze Comments Batch'",
      "type": "n8n-nodes-base.executeWorkflow",
      "position": [
        896,
        192
      ],
      "parameters": {
        "options": {
          "waitForSubWorkflow": true
        },
        "workflowId": {
          "__rl": true,
          "mode": "id",
          "value": "xVUJ5eOUjRLO1M3p",
          "cachedResultName": "Analyze Facebook post comments sentiment with OpenAI and Google Sheets"
        },
        "workflowInputs": {
          "value": {
            "post_id": "={{ $('Configuration').item.json.facebook_post_id }}",
            "comments": "={{ $('Get Facebook Comments Page').item.json.data }}",
            "batch_size": "={{ $('Configuration').item.json.batch_size }}",
            "sheet_name": "={{ $('Configuration').item.json.sheet_name }}",
            "openai_model": "={{ $('Configuration').item.json.openai_model }}",
            "wait_seconds": "={{ $('Configuration').item.json.wait_seconds }}",
            "spreadsheet_id": "={{ $('Configuration').item.json.spreadsheet_id }}",
            "sentiment_categories": "={{ $('Configuration').item.json.sentiment_categories }}",
            "summary_recipient_email": "={{ $('Configuration').item.json.summary_recipient_email }}"
          },
          "schema": [
            {
              "id": "comments",
              "type": "array",
              "display": true,
              "required": false,
              "displayName": "comments",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "post_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "post_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sentiment_categories",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "sentiment_categories",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "openai_model",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "openai_model",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "batch_size",
              "type": "number",
              "display": true,
              "required": false,
              "displayName": "batch_size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "wait_seconds",
              "type": "number",
              "display": true,
              "required": false,
              "displayName": "wait_seconds",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "spreadsheet_id",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "spreadsheet_id",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "sheet_name",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "sheet_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "summary_recipient_email",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "summary_recipient_email",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "8afad4e7-dcc6-4aeb-9a32-d66ed540b1fa",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        0,
        720
      ],
      "parameters": {
        "workflowInputs": {
          "values": [
            {
              "name": "comments",
              "type": "array"
            },
            {
              "name": "post_id"
            },
            {
              "name": "sentiment_categories"
            },
            {
              "name": "openai_model"
            },
            {
              "name": "batch_size",
              "type": "number"
            },
            {
              "name": "wait_seconds",
              "type": "number"
            },
            {
              "name": "spreadsheet_id"
            },
            {
              "name": "sheet_name"
            },
            {
              "name": "summary_recipient_email"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "94c4660f-d67a-48e5-92f9-a33ee685e93d",
      "name": "Split Out Each Comment",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        224,
        720
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "comments"
      },
      "typeVersion": 1
    },
    {
      "id": "78014c74-ba09-4e1c-9f55-3f3f48ed11a1",
      "name": "Read All Comments for This Post",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        736,
        416
      ],
      "parameters": {
        "options": {},
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $('When Executed by Another Workflow').item.json.post_id }}",
              "lookupColumn": "POST ID"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('When Executed by Another Workflow').item.json.sheet_name }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('When Executed by Another Workflow').item.json.spreadsheet_id }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "e3551500-45d4-4854-8c10-cb9d9178a558",
      "name": "Aggregate Sentiment Values",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1024,
        416
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "renameField": true,
              "outputFieldName": "sentiments",
              "fieldToAggregate": "SENTIMENT"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "233f5f7a-d149-4cd3-9c1d-1514faba6ed8",
      "name": "Build Summary Report",
      "type": "n8n-nodes-base.set",
      "position": [
        1248,
        416
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "sum-1",
              "name": "post_id",
              "type": "string",
              "value": "={{ $('When Executed by Another Workflow').item.json.post_id }}"
            },
            {
              "id": "sum-2",
              "name": "total_comments",
              "type": "number",
              "value": "={{ $json.sentiments.length }}"
            },
            {
              "id": "sum-3",
              "name": "positive_count",
              "type": "number",
              "value": "={{ $json.sentiments.filter(s => s === 'Positive').length }}"
            },
            {
              "id": "sum-4",
              "name": "neutral_count",
              "type": "number",
              "value": "={{ $json.sentiments.filter(s => s === 'Neutral').length }}"
            },
            {
              "id": "sum-5",
              "name": "negative_count",
              "type": "number",
              "value": "={{ $json.sentiments.filter(s => s === 'Negative').length }}"
            },
            {
              "id": "sum-6",
              "name": "generated_at",
              "type": "string",
              "value": "={{ $now.toISO() }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "5a5ffdb0-e043-46a8-a136-eab6f8fafaaa",
      "name": "Send Sentiment Summary Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1472,
        416
      ],
      "parameters": {
        "sendTo": "={{ $('When Executed by Another Workflow').item.json.summary_recipient_email }}",
        "message": "=<h2>Facebook Comments Sentiment Report</h2><p><b>Post ID:</b> {{ $json.post_id }}</p><p><b>Total comments analyzed:</b> {{ $json.total_comments }}</p><ul><li>Positive: {{ $json.positive_count }}</li><li>Neutral: {{ $json.neutral_count }}</li><li>Negative: {{ $json.negative_count }}</li></ul><p><i>Generated at {{ $json.generated_at }}</i></p>",
        "options": {},
        "subject": "=Facebook comments sentiment report - post {{ $json.post_id }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "92136cfa-e163-4a31-be05-a819c665d6d8",
      "name": "Analyze Comment Sentiment",
      "type": "@n8n/n8n-nodes-langchain.sentimentAnalysis",
      "position": [
        672,
        720
      ],
      "parameters": {
        "options": {
          "categories": "{{ $('When Executed by Another Workflow').item.json.sentiment_categories }}",
          "systemPromptTemplate": "You are highly intelligent and accurate sentiment analyzer. Analyze the sentiment of the provided text. Categorize it into one of the following: {categories}. Use the provided formatting instructions. Only output the JSON."
        },
        "inputText": "={{ $json.comments.message || 'empty' }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "bb22a249-1fab-47d9-9e70-3d2f9dd8a2c3",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        752,
        944
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('When Executed by Another Workflow').item.json.openai_model }}"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "17122d2e-0f17-4ad3-a642-eec3cc3974b4",
      "name": "Save Comment to Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1024,
        720
      ],
      "parameters": {
        "columns": {
          "value": {
            "COMMENT": "={{ $json.comments.message }}",
            "POST ID": "={{ $('When Executed by Another Workflow').item.json.post_id }}",
            "SENTIMENT": "={{ $json.sentimentAnalysis.category }}",
            "COMMENT ID": "={{ $json.comments.id }}"
          },
          "schema": [
            {
              "id": "POST ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "POST ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "COMMENT ID",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "COMMENT ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "COMMENT",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "COMMENT",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "SENTIMENT",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "SENTIMENT",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "COMMENT ID"
          ]
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('When Executed by Another Workflow').item.json.sheet_name }}"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $('When Executed by Another Workflow').item.json.spreadsheet_id }}"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "95799a18-7a16-4140-9bcf-b94bc510734b",
      "name": "Wait to Respect Rate Limits",
      "type": "n8n-nodes-base.wait",
      "position": [
        1248,
        832
      ],
      "parameters": {
        "amount": "={{ $('When Executed by Another Workflow').item.json.wait_seconds }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "ebe329ae-b78e-47a7-900e-0c3d4e15ff29",
      "name": "Loop Over Comments",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        448,
        720
      ],
      "parameters": {
        "options": {},
        "batchSize": "={{ $('When Executed by Another Workflow').item.json.batch_size }}"
      },
      "typeVersion": 3
    },
    {
      "id": "337182a2-e2e0-4c09-b2cd-166da35b8a8d",
      "name": "Sticky Note 36d3f48e",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1744,
        -240
      ],
      "parameters": {
        "color": 4,
        "width": 800,
        "height": 1812,
        "content": "# Analyze Facebook post comments sentiment with OpenAI\n# \ud83d\udce5  [Open full documentation on Notion](https://automatisation.notion.site/Course-Analyze-Facebook-post-comments-sentiment-with-OpenAI-and-Google-Sheets-3a03d6550fd981f6877ffb117c95a816)\n\n## How it works\nThis workflow fetches all comments on one of your Facebook Page posts, analyzes each comment's sentiment with OpenAI, saves the results to Google Sheets, and emails you a summary report once every comment has been processed.\n\nTwo entry points live in this single file: a Manual Trigger that fetches the post and paginates through all its comments, and an Execute Workflow Trigger that this same workflow calls on itself to batch-process each page of comments (sentiment analysis + sheet write + summary email). This keeps the whole template in one importable JSON file.\n\n## Setup\n1. Add your Facebook Graph API credentials to both Facebook nodes.\n2. Add your OpenAI credentials to the OpenAI Chat Model node.\n3. Add your Google Sheets credentials and pick your spreadsheet + tab.\n4. Add your Gmail credentials for the summary report.\n5. Open the \"Call 'Analyze Comments Batch'\" node and set its Workflow to THIS workflow (self-reference) once it has been saved.\n6. Fill in the Configuration node: Facebook Post ID, Google Sheet ID, sheet/tab name, and the email that should receive the summary.\n\n## Requirements\n- A Facebook Page and a Post ID you have access to (Facebook Graph API credential)\n- OpenAI account\n- A Google Sheet with columns: POST ID, COMMENT ID, COMMENT, SENTIMENT\n- Gmail account to receive the summary\n\n## Customization\n- Adjust `sentiment_categories`, `batch_size`, `wait_seconds` and `max_pages` in the Configuration node.\n- Change the OpenAI model in Configuration (`openai_model`).\n\nNeed help customizing?\nContact me for consulting and support : [Linkedin](https://www.linkedin.com/in/doctor-firass/)\n\n# MY NEW YOUTUBE CHANNEL\n\ud83d\udc49 [Subscribe to my new YouTube channel](https://www.youtube.com/@DrFiras_AI). Here I'll share videos and Shorts with practical tutorials and FREE templates for n8n.\n\n[![The AI Doctor](https://www.dr-firas.com/the-ai-doctor.png)](https://www.youtube.com/@DrFiras_AI)"
      },
      "typeVersion": 1
    },
    {
      "id": "9341f248-ddb8-4c69-aa1a-5a152fb501de",
      "name": "Sticky Note 06f84673",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 200,
        "content": "## STEP 1 - Configure & fetch the post\nSet your Facebook Post ID in Configuration, then fetch the post and its comments (paginated)."
      },
      "typeVersion": 1
    },
    {
      "id": "9b722312-293f-4568-93f1-93573f020085",
      "name": "Sticky Note 6b5780ca",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -48
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 200,
        "content": "## STEP 2 - Pagination\nLoops back automatically while Facebook still has more comment pages (capped by `max_pages`)."
      },
      "typeVersion": 1
    },
    {
      "id": "3ba7173d-1447-42ce-9526-ac3ec1117a53",
      "name": "Sticky Note eef625f9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        768,
        -224
      ],
      "parameters": {
        "color": 7,
        "width": 476,
        "height": 200,
        "content": "## STEP 3 - Hand off each page for analysis\nCalls this same workflow on itself so the batch logic stays modular in one file."
      },
      "typeVersion": 1
    },
    {
      "id": "6649b8f5-27ea-4b0c-8542-c09746b63c91",
      "name": "Sticky Note 7b678bd0",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        704
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 248,
        "content": "## STEP 4 - Analyze & save each comment\nOpenAI classifies sentiment; results are appended/updated in Google Sheets; a short wait avoids rate limits."
      },
      "typeVersion": 1
    },
    {
      "id": "2354655b-c17c-4eb4-b7c6-f45df91dd654",
      "name": "Sticky Note 85e74c1e",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        416
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 200,
        "content": "## STEP 5 - Executive summary email\nOnce all comments in the page are processed, reads the sheet back, tallies sentiment, and emails you the report."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "binaryMode": "separate",
    "availableInMCP": true,
    "executionOrder": "v1"
  },
  "versionId": "efc65fbd-7386-488d-b450-b153a5d5d7f4",
  "nodeGroups": [],
  "connections": {
    "Run Manually": {
      "main": [
        [
          {
            "node": "Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configuration": {
      "main": [
        [
          {
            "node": "Get Facebook Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Has Next Page?": {
      "main": [
        [
          {
            "node": "Set Next Page Cursor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Facebook Post": {
      "main": [
        [
          {
            "node": "Get Facebook Comments Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Comment Sentiment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Comments": {
      "main": [
        [
          {
            "node": "Read All Comments for This Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Analyze Comment Sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Summary Report": {
      "main": [
        [
          {
            "node": "Send Sentiment Summary Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Next Page Cursor": {
      "main": [
        [
          {
            "node": "Get Facebook Comments Page",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Each Comment": {
      "main": [
        [
          {
            "node": "Loop Over Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Comment Sentiment": {
      "main": [
        [
          {
            "node": "Save Comment to Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate Sentiment Values": {
      "main": [
        [
          {
            "node": "Build Summary Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Facebook Comments Page": {
      "main": [
        [
          {
            "node": "Has Next Page?",
            "type": "main",
            "index": 0
          },
          {
            "node": "Call 'Analyze Comments Batch'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait to Respect Rate Limits": {
      "main": [
        [
          {
            "node": "Loop Over Comments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Comment to Google Sheets": {
      "main": [
        [
          {
            "node": "Wait to Respect Rate Limits",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read All Comments for This Post": {
      "main": [
        [
          {
            "node": "Aggregate Sentiment Values",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Split Out Each Comment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}