Skip to content

Commit c8d583d

Browse files
committed
merge
2 parents 5b62a9c + 4a0c6aa commit c8d583d

File tree

318 files changed

+6079
-728
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

318 files changed

+6079
-728
lines changed

components/alttextlab/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Overview
2+
3+
AltTextLab's API provides powerful AI-generated alternative text for images - enhancing SEO, accessibility, and automation workflows. With Pipedream, you can create workflows that generate alt text for images automatically, connect it with your CMS or e-commerce platform. Pipedream’s serverless architecture lets you trigger these workflows on events, schedules, or incoming webhooks without maintaining your own infrastructure.
4+
# Example Use Cases
5+
6+
- **Automated SEO Optimization for E-commerce**: Automatically generate alt text for new product images uploaded to a Shopify or WooCommerce store and save the metadata to your CMS or database.
7+
8+
- **Content Publishing Pipelines**: When a new blog post with images is published in your CMS (e.g., Ghost, WordPress, Webflow), send the image URLs to AltTextLab, generate alt text, and attach it back to the post or send it via email for editorial review.
9+
10+
- **Bulk Image Processing for Media Libraries**: Periodically scan a folder in Dropbox, S3, or Google Drive for new images and generate alt text descriptions for accessibility compliance and tagging.
11+
12+
# Getting Started
13+
14+
To get started, first log in to or create your [Pipedream account](https://pipedream.com) and start a new workflow.
15+
16+
Go to [AltTextLab](https://www.alttextlab.com/) and create an account (or log in if you already have one). Then, in the Dashboard, navigate to the API Keys section, generate a new API key, and copy it — you’ll use this key to authenticate your requests.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
import altTextLab from "../../alttextlab.app.mjs";
2+
import { AI_WRITING_STYLE } from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "alttextlab-generate-alt-text",
6+
name: "Generate Alt Text",
7+
description: "Generates alt text for images using AI. [See the documentation](https://www.alttextlab.com/docs/api)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
altTextLab,
12+
alert: {
13+
type: "alert",
14+
alertType: "info",
15+
content: "Supported formats: PNG, JPG, WebP, AVIF, SVG",
16+
},
17+
imageUrl: {
18+
type: "string",
19+
label: "Image URL",
20+
description: "Provide the direct URL to the image you want to generate alt text for. Make sure the link is publicly accessible (not behind a login or firewall).",
21+
},
22+
lang: {
23+
type: "string",
24+
label: "Language",
25+
description: "Enter the language code for the alt text generation (e.g., \"en\" for English, \"fr\" for French). See the [full list of supported languages](https://www.alttextlab.com/docs/api#language)",
26+
default: "en",
27+
},
28+
style: {
29+
type: "string",
30+
label: "AI writing styles",
31+
options: AI_WRITING_STYLE,
32+
description: "Alt-text writing styles define the tone, structure, and level of detail used to describe an image. [Learn more](https://www.alttextlab.com/docs/writing-style)",
33+
default: "neutral",
34+
},
35+
keywords: {
36+
type: "string[]",
37+
label: "Keywords",
38+
description: "Enter one or more keywords to alt text generation. Separate multiple keywords with commas. Example: cat, window, sunset.",
39+
optional: true,
40+
},
41+
ecommerceProduct: {
42+
type: "string",
43+
label: "Ecommerce Product Name",
44+
description: "The name of the product.",
45+
optional: true,
46+
},
47+
ecommerceBrand: {
48+
type: "string",
49+
label: "Ecommerce Product Brand",
50+
description: "The brand of the product.",
51+
optional: true,
52+
},
53+
ecommerceColor: {
54+
type: "string",
55+
label: "Ecommerce Product Color",
56+
description: "The color of the product.",
57+
optional: true,
58+
},
59+
ecommerceMaterial: {
60+
type: "string",
61+
label: "Ecommerce Product Material",
62+
description: "The material of the product.",
63+
optional: true,
64+
},
65+
},
66+
async run({ $ }) {
67+
const response = await this.altTextLab.altTextGeneration({
68+
$,
69+
data: {
70+
source: "pipedream",
71+
imageUrl: this.imageUrl,
72+
lang: this.lang,
73+
style: this.style,
74+
keywords: this.keywords,
75+
ecommerce: {
76+
product: this.ecommerceProduct,
77+
brand: this.ecommerceBrand,
78+
color: this.ecommerceColor,
79+
material: this.ecommerceMaterial,
80+
},
81+
},
82+
});
83+
84+
$.export("$summary", "Alt text has been generated");
85+
return response;
86+
},
87+
};
Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
1+
import { axios } from "@pipedream/platform";
2+
13
export default {
24
type: "app",
35
app: "alttextlab",
46
propDefinitions: {},
57
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
8+
_baseUrl() {
9+
return "https://app.alttextlab.com/api/v1";
10+
},
11+
_headers(headers) {
12+
return {
13+
...headers,
14+
"x-api-key": `${this.$auth.api_key}`,
15+
};
16+
},
17+
async _makeRequest({
18+
$ = this, path, headers, ...otherOptions
19+
}) {
20+
return axios($, {
21+
url: this._baseUrl() + path,
22+
headers: this._headers(headers),
23+
...otherOptions,
24+
});
25+
},
26+
async altTextGeneration(args) {
27+
return this._makeRequest({
28+
path: "/alt-text/generate",
29+
method: "POST",
30+
...args,
31+
});
932
},
1033
},
11-
};
34+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
export const AI_WRITING_STYLE = [
2+
{
3+
label: "Descriptive",
4+
value: "descriptive",
5+
},
6+
{
7+
label: "Neutral",
8+
value: "neutral",
9+
},
10+
{
11+
label: "Matter of fact",
12+
value: "matter-of-fact",
13+
},
14+
{
15+
label: "Minimal",
16+
value: "minimal",
17+
},
18+
];

components/alttextlab/package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@pipedream/alttextlab",
3-
"version": "0.0.1",
2+
"name": "@pipedream/alttextify",
3+
"version": "0.1.0",
44
"description": "Pipedream AltTextLab Components",
55
"main": "alttextlab.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
1417
}
15-
}
18+
}
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import common from "../common/common.mjs";
2+
3+
export default {
4+
key: "asana-list-task-stories",
5+
name: "List Task Stories",
6+
description: "List stories (including comments) for a task. [See the documentation](https://developers.asana.com/reference/getstoriesfortask)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
...common.props,
11+
taskId: {
12+
label: "Task GID",
13+
description: "The ID of the task to retrieve stories for",
14+
type: "string",
15+
propDefinition: [
16+
common.props.asana,
17+
"tasks",
18+
(c) => ({
19+
project: c.project,
20+
}),
21+
],
22+
},
23+
commentsOnly: {
24+
type: "boolean",
25+
label: "Comments Only",
26+
description: "Only return comments",
27+
optional: true,
28+
},
29+
optFields: {
30+
type: "string[]",
31+
label: "Opt Fields",
32+
description: "This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. See the [documentation](https://developers.asana.com/reference/stories) for available fields.",
33+
optional: true,
34+
},
35+
maxResults: {
36+
type: "integer",
37+
label: "Max Results",
38+
description: "The maximum number of results to return",
39+
default: 100,
40+
optional: true,
41+
},
42+
},
43+
methods: {
44+
async getStoriesForTask({
45+
taskId, ...opts
46+
}) {
47+
return this.asana._makeRequest({
48+
path: `tasks/${taskId}/stories`,
49+
...opts,
50+
});
51+
},
52+
},
53+
async run({ $ }) {
54+
let hasMore, count = 0;
55+
56+
const params = {
57+
limit: this.maxResults,
58+
opt_fields: this.optFields
59+
? this.optFields?.join(",")
60+
: undefined,
61+
};
62+
63+
const results = [];
64+
65+
do {
66+
const {
67+
data, next_page: next,
68+
} = await this.getStoriesForTask({
69+
$,
70+
taskId: this.taskId,
71+
params,
72+
});
73+
74+
hasMore = next;
75+
params.offset = next?.offset;
76+
77+
if (data.length === 0) {
78+
break;
79+
}
80+
81+
for (const story of data) {
82+
if (this.commentsOnly && story.type !== "comment") {
83+
continue;
84+
}
85+
results.push(story);
86+
if (++count >= this.maxResults) {
87+
hasMore = false;
88+
break;
89+
}
90+
}
91+
} while (hasMore);
92+
93+
$.export("$summary", `Found ${results.length} stories`);
94+
return results;
95+
},
96+
};

components/asana/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/asana",
3-
"version": "0.7.4",
3+
"version": "0.8.0",
44
"description": "Pipedream Asana Components",
55
"main": "asana.app.mjs",
66
"keywords": [

components/assemblyai/actions/create-captions/create-captions.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import assemblyai from "../../assemblyai.app.mjs";
22

33
export default {
44
name: "Create Captions",
5-
description: "Export your completed transcripts in SRT (srt) or VTT (vtt) format, which can be used for subtitles and closed captions in videos. [See the documentation](https://www.assemblyai.com/docs/API%20reference/transcript)",
5+
description: "Export your completed transcripts in SRT (srt) or VTT (vtt) format, which can be used for subtitles and closed captions in videos. [See the documentation](https://www.assemblyai.com/docs/api-reference/transcripts/get-subtitles)",
66
key: "assemblyai-create-captions",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
type: "action",
99
props: {
1010
assemblyai,

0 commit comments

Comments
 (0)