{
  "name": "DON! Creator Program - Application to Google Sheets",
  "nodes": [
    {
      "parameters": {
        "path": "don-creator-program-apply",
        "httpMethod": "POST",
        "responseMode": "responseNode",
        "options": {}
      },
      "id": "creator-application-webhook",
      "name": "Creator Application Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -560,
        0
      ],
      "webhookId": "don-creator-program-apply"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "application_id",
              "name": "application_id",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.application_id}}"
            },
            {
              "id": "created_at",
              "name": "created_at",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.created_at}}"
            },
            {
              "id": "status",
              "name": "status",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.status}}"
            },
            {
              "id": "artist_name",
              "name": "artist_name",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.artist_name}}"
            },
            {
              "id": "label_name",
              "name": "label_name",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.label_name}}"
            },
            {
              "id": "email",
              "name": "email",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.email}}"
            },
            {
              "id": "whatsapp",
              "name": "whatsapp",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.whatsapp}}"
            },
            {
              "id": "country",
              "name": "country",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.country}}"
            },
            {
              "id": "instagram",
              "name": "instagram",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.instagram}}"
            },
            {
              "id": "portfolio_url",
              "name": "portfolio_url",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.portfolio_url}}"
            },
            {
              "id": "artwork_link",
              "name": "artwork_link",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.artwork_link}}"
            },
            {
              "id": "art_style",
              "name": "art_style",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.art_style}}"
            },
            {
              "id": "artist_bio",
              "name": "artist_bio",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.artist_bio}}"
            },
            {
              "id": "payout_preference",
              "name": "payout_preference",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.payout_preference}}"
            },
            {
              "id": "notes",
              "name": "notes",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.notes}}"
            },
            {
              "id": "proposed_split",
              "name": "proposed_split",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.proposed_split}}"
            },
            {
              "id": "original_art_confirmed",
              "name": "original_art_confirmed",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.original_art_confirmed}}"
            },
            {
              "id": "royalty_terms_accepted",
              "name": "royalty_terms_accepted",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.royalty_terms_accepted}}"
            },
            {
              "id": "source",
              "name": "source",
              "type": "string",
              "value": "={{$json.body.googleSheetsRow.source}}"
            }
          ]
        },
        "options": {}
      },
      "id": "normalize-sheet-row",
      "name": "Normalize Sheet Row",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -320,
        0
      ]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": "REPLACE_WITH_CREATOR_PROGRAM_SPREADSHEET_ID",
        "sheetName": "Applications",
        "columns": {
          "mappingMode": "autoMapInputData",
          "value": {}
        },
        "options": {}
      },
      "id": "append-google-sheet",
      "name": "Append Creator Application",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -80,
        0
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "REPLACE_WITH_GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ { ok: true, applicationId: $json.application_id, labelName: $json.label_name, status: $json.status } }}",
        "options": {}
      },
      "id": "respond-accepted",
      "name": "Respond Accepted",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1.1,
      "position": [
        160,
        0
      ]
    }
  ],
  "connections": {
    "Creator Application Webhook": {
      "main": [
        [
          {
            "node": "Normalize Sheet Row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Sheet Row": {
      "main": [
        [
          {
            "node": "Append Creator Application",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append Creator Application": {
      "main": [
        [
          {
            "node": "Respond Accepted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "active": false,
  "versionId": "don-creator-program-application-to-sheets-v1"
}
