@pipedream/google_photos
Version:
Pipedream Google Photos Components
31 lines (29 loc) • 733 B
JavaScript
import app from "../../google_photos.app.mjs";
export default {
key: "google_photos-create-album",
version: "0.0.1",
type: "action",
name: "Create Album",
description: "Creates an album. [See the documentation](https://developers.google.com/photos/library/guides/manage-albums#creating-new-album)",
props: {
app,
title: {
type: "string",
label: "Title",
description: "Album title",
},
},
async run ({ $ }) {
const resp = await this.app.createAlbum({
$,
albumId: this.albumId,
data: {
album: {
title: this.title,
},
},
});
$.export("$summary", `Album(ID:${resp.id}) has been created successfully.`);
return resp;
},
};