Integrations / Google Slides
Google Slides
Read, create and edit Google Slides presentations.
5 actions
OAuth 2
1 read4 write
Calls slides.googleapis.com
Connect
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
| Scope | Why it is requested |
|---|---|
https://www.googleapis.com/auth/userinfo.email | See which Google account you connected |
https://www.googleapis.com/auth/presentations | See, 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
| Input | Type | Description | |
|---|---|---|---|
presentation_id | string | Required | Presentation ID |
layout | string | Required | Predefined slide layout |
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
| Input | Type | Description | |
|---|---|---|---|
title | string | Required | Presentation title |
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
| Input | Type | Description | |
|---|---|---|---|
presentation_id | string | Required | The long ID in the presentation address |
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
| Input | Type | Description | |
|---|---|---|---|
presentation_id | string | Required | Presentation ID |
object_id | string | Required | ID of the shape or text box |
text | string | Required | Text to insert |
insertion_index | integer | Optional | Character index to insert at (default 0, the start) |
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
| Input | Type | Description | |
|---|---|---|---|
presentation_id | string | Required | Presentation ID |
find | string | Required | Text to find |
replace_with | string | Required | Replacement text |
match_case | boolean | Optional | Case-sensitive match (default false) |
await setu.execute({
userId: "user_1",
action: "googleslides.replace_all_text",
input: {
"presentation_id": "<presentation_id>",
"find": "<find>",
"replace_with": "<replace_with>"
},
});