L2 Hub
Google
gslides
Create Slides from Template

L2 Construct: create_slides_from_template

slides google

Description

CreateSlidesFromTemplate creates a new Google Slides presentation from a template. It copies the specified template, replaces placeholder text with provided content, optionally inserts charts from a specified spreadsheet, and returns the ID, name, and URL of the newly created presentation.

L2 Data

  1. Provider: google
  2. Module: gslides
  3. Action: create_slides_from_template

Example Step

{
  "name": "insert-your-step-name",
  "type": "l2",
  "l2_data": {
    "provider": "google",
    "module": "gslides",
    "action": "create_slides_from_template"
  }
}
 

Input

Example

{
  "template_name": "Monthly_Report_For_2024_Template",
  "new_presentation_name": "Weekly Report 04/11/2024",
  "text_replacements": {
    "date": "04/11/2024",
    "week": "Week 1"
  },
  "chart_replacements": {
    "sales_chart": {
      "spreadsheet_id": "1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc",
      "chart_id": 1
    }
  }
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/google/gslides/create-slide-template-input",
  "$ref": "#/$defs/CreateSlideTemplateInput",
  "$defs": {
    "ChartReplacement": {
      "properties": {
        "spreadsheet_id": {
          "type": "string"
        },
        "chart_id": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["spreadsheet_id", "chart_id"]
    },
    "CreateSlideTemplateInput": {
      "properties": {
        "template_name": {
          "type": "string"
        },
        "new_presentation_name": {
          "type": "string"
        },
        "text_replacements": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "chart_replacements": {
          "additionalProperties": {
            "$ref": "#/$defs/ChartReplacement"
          },
          "type": "object"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": [
        "template_name",
        "new_presentation_name",
        "text_replacements"
      ]
    }
  }
}
 

Output

Example

{
  "presentation_id": "1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc",
  "presentation_name": "Weekly Report 04/11/2024",
  "presentation_url": "https://docs.google.com/presentation/d/1EAYk18WDjIG-zp_0vLm3CsfQh_i8eXc67Jo2O9C6Vuc"
}
 

Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://pontus.bpa/pkgs/l2/google/gslides/create-slide-template-output",
  "$ref": "#/$defs/CreateSlideTemplateOutput",
  "$defs": {
    "CreateSlideTemplateOutput": {
      "properties": {
        "presentation_id": {
          "type": "string"
        },
        "presentation_name": {
          "type": "string"
        },
        "presentation_url": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "required": ["presentation_id", "presentation_name", "presentation_url"]
    }
  }
}