{
  "nodes": [
    {
      "name": "Typeform: New Submission",
      "type": "n8n-nodes-base.typeformTrigger",
      "position": [
        0,
        400
      ],
      "parameters": {
        "formId": "PLACEHOLDER_TYPEFORM_FORM_ID"
      },
      "credentials": {
        "typeformApi": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Analyze Feedback Sentiment",
      "type": "n8n-nodes-base.googleCloudNaturalLanguage",
      "position": [
        200,
        400
      ],
      "parameters": {
        "content": "={{$json[\"Any suggestions for us? \"]}}",
        "options": {}
      },
      "credentials": {
        "googleCloudNaturalLanguageOAuth2Api": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Check Sentiment Score",
      "type": "n8n-nodes-base.if",
      "position": [
        400,
        400
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{$node[\"Analyze Feedback Sentiment\"].json[\"documentSentiment\"][\"score\"]}}",
              "value2": 0,
              "operation": "larger"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "name": "Add Feedback to Notion",
      "type": "n8n-nodes-base.notion",
      "position": [
        600,
        300
      ],
      "parameters": {
        "resource": "databasePage",
        "databaseId": "PLACEHOLDER_NOTION_DATABASE_ID",
        "propertiesUi": {
          "propertyValues": [
            {
              "key": "Name|title",
              "title": "={{$node[\"Typeform: New Submission\"].json[\"Name\"]}}"
            },
            {
              "key": "Feedback|rich_text",
              "textContent": "={{$node[\"Typeform: New Submission\"].json[\"Any suggestions for us? \"]}}"
            },
            {
              "key": "Sentiment Score|number",
              "numberValue": "={{$node[\"Analyze Feedback Sentiment\"].json[\"documentSentiment\"][\"score\"]}}"
            },
            {
              "key": "Source|rich_text",
              "textContent": "Typeform"
            },
            {
              "key": "Submitted At|date",
              "dateValue": "={{$now}}"
            }
          ]
        }
      },
      "credentials": {
        "notionApi": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Notify Slack with Positive Feedback",
      "type": "n8n-nodes-base.slack",
      "position": [
        800,
        300
      ],
      "parameters": {
        "channel": "PLACEHOLDER_SLACK_CHANNEL",
        "attachments": [
          {
            "text": "={{$node[\"Typeform: New Submission\"].json[\"Any suggestions for us? \"]}}",
            "title": "={{$node[\"Typeform: New Submission\"].json[\"Name\"]}} | Score: {{$node[\"Analyze Feedback Sentiment\"].json[\"documentSentiment\"][\"score\"]}}"
          }
        ],
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": "<your credential>"
      },
      "typeVersion": 1
    },
    {
      "name": "Create Trello Card for Follow-up",
      "type": "n8n-nodes-base.trello",
      "position": [
        600,
        500
      ],
      "parameters": {
        "name": "=Score: {{$node[\"Analyze Feedback Sentiment\"].json[\"documentSentiment\"][\"score\"]}}",
        "listId": "PLACEHOLDER_TRELLO_LIST_ID",
        "description": "=Score: {{$node[\"Analyze Feedback Sentiment\"].json[\"documentSentiment\"][\"score\"]}}\\nFeedback: {{$node[\"Typeform: New Submission\"].json[\"Any suggestions for us? \"]}}\\nUser: {{$node[\"Typeform: New Submission\"].json[\"Name\"]}}",
        "additionalFields": {}
      },
      "credentials": {
        "trelloApi": "<your credential>"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Check Sentiment Score": {
      "main": [
        [
          {
            "node": "Add Feedback to Notion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Trello Card for Follow-up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add Feedback to Notion": {
      "main": [
        [
          {
            "node": "Notify Slack with Positive Feedback",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Typeform: New Submission": {
      "main": [
        [
          {
            "node": "Analyze Feedback Sentiment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Feedback Sentiment": {
      "main": [
        [
          {
            "node": "Check Sentiment Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}