{
  "name": "S2D recipe - google-sheets-to-google-slides",
  "nodes": [
    {
      "id": "e1000000-0000-4000-8000-000000000001",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -540,
        -340
      ],
      "parameters": {
        "width": 560,
        "height": 300,
        "content": "## Google Slides deck from a Google Sheets row\nMark a row Ready and it becomes one SourceToDocs run: a deck from your Google Slides template, saved to Google Drive. The link is written back to the row and Status changes to Generated.\n\n**Set up before you activate**\n- Credentials: Google Sheets on the trigger and the Google Sheets node, SourceToDocs (API token) on the SourceToDocs node\n- SourceToDocs document: your Google Slides document, and its data set with the columns Client, Project, Headline, Summary, Next step, Presenter, Date\n- Your sheet: the decks spreadsheet and tab in the trigger and the Google Sheets node (columns Deck ID, Client, Project, Headline, Summary, Next step, Presenter, Status, Deck link)\n\nGuide: https://sourcetodocs.com/automations/google-sheets-to-google-slides/"
      }
    },
    {
      "id": "e1000000-0000-4000-8000-000000000002",
      "name": "Google Sheets Trigger",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "typeVersion": 1,
      "position": [
        -480,
        0
      ],
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "event": "anyUpdate",
        "includeInOutput": "new",
        "options": {
          "columnsToWatch": [
            "Status"
          ]
        }
      }
    },
    {
      "id": "e1000000-0000-4000-8000-000000000003",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.4,
      "position": [
        -260,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e1c00000-0000-4000-8000-000000000001",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.Status }}",
              "rightValue": "Ready"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "e1000000-0000-4000-8000-000000000004",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -40,
        -20
      ],
      "parameters": {
        "batchSize": 1,
        "options": {}
      }
    },
    {
      "id": "e1000000-0000-4000-8000-000000000005",
      "name": "SourceToDocs",
      "type": "@twovmodules/n8n-nodes-sourcetodocs.sourceToDocs",
      "typeVersion": 1.1,
      "position": [
        200,
        0
      ],
      "parameters": {
        "resource": "document",
        "operation": "generate",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "rowsFrom": "mapped",
        "mappedDataSetId": "",
        "output": "simplified",
        "options": {},
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Client": "={{ $json.Client }}",
            "Project": "={{ $json.Project }}",
            "Headline": "={{ $json.Headline }}",
            "Summary": "={{ $json.Summary }}",
            "Next step": "={{ $json['Next step'] }}",
            "Presenter": "={{ $json.Presenter }}",
            "Date": "={{ $now.toFormat('d LLLL yyyy') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Client",
              "displayName": "Client",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "Project",
              "displayName": "Project",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "Headline",
              "displayName": "Headline",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "Summary",
              "displayName": "Summary",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "Next step",
              "displayName": "Next step",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "Presenter",
              "displayName": "Presenter",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            },
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": false,
              "display": true,
              "type": "string",
              "removed": false
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      }
    },
    {
      "id": "e1000000-0000-4000-8000-000000000006",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        440,
        0
      ],
      "parameters": {
        "resource": "sheet",
        "operation": "update",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Deck ID": "={{ $('Loop Over Items').item.json['Deck ID'] }}",
            "Deck link": "={{ $json.file_url }}",
            "Status": "Generated"
          },
          "matchingColumns": [
            "Deck ID"
          ],
          "schema": [
            {
              "id": "Deck ID",
              "displayName": "Deck ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Client",
              "displayName": "Client",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Project",
              "displayName": "Project",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Headline",
              "displayName": "Headline",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Summary",
              "displayName": "Summary",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Next step",
              "displayName": "Next step",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Presenter",
              "displayName": "Presenter",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Deck link",
              "displayName": "Deck link",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "SourceToDocs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SourceToDocs": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
