Skip to content

Commit e843edc

Browse files
committed
Merge remote-tracking branch 'origin/master' into issue-17404
2 parents 331feeb + a28b6b4 commit e843edc

File tree

149 files changed

+5057
-184
lines changed

Some content is hidden

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

149 files changed

+5057
-184
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: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { axios } from "@pipedream/platform";
2+
3+
export default {
4+
type: "app",
5+
app: "alttextlab",
6+
propDefinitions: {},
7+
methods: {
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+
});
32+
},
33+
},
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: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "@pipedream/alttextify",
3+
"version": "0.1.0",
4+
"description": "Pipedream AltTextLab Components",
5+
"main": "alttextlab.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"alttextlab"
9+
],
10+
"homepage": "https://pipedream.com/apps/alttextlab",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
},
15+
"dependencies": {
16+
"@pipedream/platform": "^3.0.3"
17+
}
18+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Create Captions",
55
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)",
66
key: "assemblyai-create-captions",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
assemblyai,

components/assemblyai/actions/get-transcription/get-transcription.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
name: "Get Transcription",
55
description: "Fetches a specific transcribed result from the AssemblyAI API. [See the documentation](https://www.assemblyai.com/docs/API%20reference/transcript)",
66
key: "assemblyai-get-transcription",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
type: "action",
99
props: {
1010
assemblyai,

components/assemblyai/assemblyai.app.mjs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,19 @@ export default {
9999
};
100100
let prevUrl;
101101
const results = [];
102+
const afterId = args.params?.after_id;
102103

103104
do {
104105
const {
105106
transcripts, page_details: pageDetails,
106107
} = await this.listTranscripts(config);
107-
results.push(...transcripts);
108+
for (const transcript of transcripts) {
109+
if (transcript.id === afterId) {
110+
return results;
111+
}
112+
results.push(transcript);
113+
}
114+
config.params.after_id = undefined;
108115
prevUrl = pageDetails.prev_url;
109116
config.url = prevUrl;
110117
} while (prevUrl);

components/assemblyai/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/assemblyai",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Pipedream AssemblyAI Components",
55
"main": "assemblyai.app.mjs",
66
"keywords": [
@@ -13,6 +13,6 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@pipedream/platform": "^1.5.1"
16+
"@pipedream/platform": "^3.1.0"
1717
}
1818
}

components/assemblyai/sources/new-transcription-completed/new-transcription-completed.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "New Transcription Completed",
66
description: "Emit new event when a transcribed audio file from AssemblyAI is ready. [See the documentation](https://www.assemblyai.com/docs/API%20reference/transcript)",
77
key: "assemblyai-new-transcription-completed",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "source",
1010
dedupe: "unique",
1111
props: {

0 commit comments

Comments
 (0)