Setu Recipes: reusable workflows across every app.Browse templates

Integrations / Google Slides

Google Slides

Read, create and edit Google Slides presentations.

5 actions OAuth 2 1 read4 write Calls slides.googleapis.com

Connect

TypeScript
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "googleslides" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();

Permissions requested

ScopeWhy it is requested
https://www.googleapis.com/auth/userinfo.emailSee which Google account you connected
https://www.googleapis.com/auth/presentationsSee, edit and create your Google Slides presentations

Actions

Add slidewritegoogleslides.add_slideAdd a new slide with a predefined layout to the end of a presentation and return its ID.

Needs scope: https://www.googleapis.com/auth/presentations

InputTypeDescription
presentation_idstringRequiredPresentation ID
layoutstringRequiredPredefined slide layout
TypeScript
await setu.execute({
  userId: "user_1",
  action: "googleslides.add_slide",
  input: {
    "presentation_id": "<presentation_id>",
    "layout": "<layout>"
  },
});
Create presentationwritegoogleslides.create_presentationCreate a new blank Google Slides presentation with a title.

Needs scope: https://www.googleapis.com/auth/presentations

InputTypeDescription
titlestringRequiredPresentation title
TypeScript
await setu.execute({
  userId: "user_1",
  action: "googleslides.create_presentation",
  input: {
    "title": "<title>"
  },
});
Get presentationreadgoogleslides.get_presentationGet a presentation's title, slide IDs and the IDs of the shapes on each slide (needed for insert_text).

Needs scope: https://www.googleapis.com/auth/presentations

InputTypeDescription
presentation_idstringRequiredThe long ID in the presentation address
TypeScript
await setu.execute({
  userId: "user_1",
  action: "googleslides.get_presentation",
  input: {
    "presentation_id": "<presentation_id>"
  },
});
Insert text into shapewritegoogleslides.insert_textInsert text into an existing shape or text box (get its ID from get_presentation) at a character index.

Needs scope: https://www.googleapis.com/auth/presentations

InputTypeDescription
presentation_idstringRequiredPresentation ID
object_idstringRequiredID of the shape or text box
textstringRequiredText to insert
insertion_indexintegerOptionalCharacter index to insert at (default 0, the start)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "googleslides.insert_text",
  input: {
    "presentation_id": "<presentation_id>",
    "object_id": "<object_id>",
    "text": "<text>"
  },
});
Replace text everywherewritegoogleslides.replace_all_textFind text across all slides and replace it, for example to fill {{placeholders}} in a template deck. Returns how many were changed.

Needs scope: https://www.googleapis.com/auth/presentations

InputTypeDescription
presentation_idstringRequiredPresentation ID
findstringRequiredText to find
replace_withstringRequiredReplacement text
match_casebooleanOptionalCase-sensitive match (default false)
TypeScript
await setu.execute({
  userId: "user_1",
  action: "googleslides.replace_all_text",
  input: {
    "presentation_id": "<presentation_id>",
    "find": "<find>",
    "replace_with": "<replace_with>"
  },
});