Skip to content

Commit 2d4bf90

Browse files
authored
Merge branch 'master' into issue-15178
2 parents 4ebba7c + 3a1bbdf commit 2d4bf90

File tree

31 files changed

+1198
-117
lines changed

31 files changed

+1198
-117
lines changed

components/clear_books/clear_books.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/dixa/dixa.app.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export default {
88
console.log(Object.keys(this.$auth));
99
},
1010
},
11-
};
11+
};

components/egnyte/egnyte.app.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "egnyte",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/egnyte/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/egnyte",
3+
"version": "0.0.1",
4+
"description": "Pipedream Egnyte Components",
5+
"main": "egnyte.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"egnyte"
9+
],
10+
"homepage": "https://pipedream.com/apps/egnyte",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}

components/google_drive/actions/create-file-from-text/create-file-from-text.mjs

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "google_drive-create-file-from-text",
66
name: "Create New File From Text",
77
description: "Create a new file from plain text. [See the documentation](https://developers.google.com/drive/api/v3/reference/files/create) for more information",
8-
version: "0.1.7",
8+
version: "0.2.0",
99
type: "action",
1010
props: {
1111
googleDrive,
@@ -44,24 +44,66 @@ export default {
4444
optional: true,
4545
default: "",
4646
},
47+
mimeType: {
48+
type: "string",
49+
label: "Conversion Format",
50+
description:
51+
"The [format](https://developers.google.com/drive/api/v3/ref-export-formats) in which the text is presented",
52+
optional: true,
53+
default: "text/plain",
54+
options: [
55+
{
56+
value: "text/plain",
57+
label: "Plain Text",
58+
},
59+
{
60+
value: "text/markdown",
61+
label: "Markdown",
62+
},
63+
{
64+
value: "text/html",
65+
label: "HTML",
66+
},
67+
{
68+
value: "application/rtf",
69+
label: "Rich Text",
70+
},
71+
{
72+
value: "text/csv",
73+
label: "CSV",
74+
},
75+
],
76+
},
4777
},
4878
async run({ $ }) {
4979
const {
5080
parentId,
5181
name,
5282
content,
83+
mimeType,
5384
} = this;
5485
const file = Readable.from([
5586
content,
5687
]);
88+
const drive = this.googleDrive.drive();
5789
const driveId = this.googleDrive.getDriveId(this.drive);
58-
const resp = await this.googleDrive.createFile({
59-
mimeType: "text/plain",
60-
file,
61-
name,
62-
parentId,
63-
driveId,
90+
const parent = parentId ?? driveId;
91+
92+
const { data: resp } = await drive.files.create({
93+
supportsAllDrives: true,
94+
media: {
95+
mimeType,
96+
body: file,
97+
},
98+
requestBody: {
99+
name,
100+
mimeType: "application/vnd.google-apps.document",
101+
parents: [
102+
parent,
103+
],
104+
},
64105
});
106+
65107
$.export("$summary", `Successfully created a new file, "${resp.name}"`);
66108
return resp;
67109
},

components/google_drive/package.json

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

components/linkup/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Overview
2+
The Linkup API allows you to access and retrieve high-quality, real-time content from the internet for various use cases, including search, trend analysis, and contextual data gathering. By integrating the Linkup API with Pipedream, you can automate workflows that leverage Linkup's powerful search capabilities, enabling efficient data retrieval, content processing, and integration with other tools and platforms.
3+
4+
# Example Use Cases
5+
6+
- **Automated Content Research and Reporting:** Create a workflow that uses the Linkup API to perform automated searches based on specific queries. The results can be processed and stored in Google Sheets or a database for further analysis. This is particularly useful for market research, trend analysis, or competitive intelligence.
7+
8+
- **Slack Notifications for Trending Topics:** Use Pipedream to set up a workflow that triggers regular searches on trending topics using the Linkup API. The results can then be sent to a Slack channel, keeping your team informed about the latest developments in your industry.
9+
10+
- **Dynamic Content Generation for Marketing:** Integrate Linkup with a CMS or email marketing platform. Automatically fetch relevant content or insights from the Linkup API and embed them into newsletters, blog posts, or social media updates, ensuring fresh and engaging content for your audience.
11+
12+
- **Enhanced Customer Support Knowledge Base:** Use the Linkup API to fetch and update relevant, real-time information from trusted sources to enhance your customer support responses or update your knowledge base dynamically.
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
import app from "../../linkup.app.mjs";
2+
3+
export default {
4+
name: "Linkup Search",
5+
description: "Search and retrieve insights using the Linkup API. [See the documentation](https://docs.linkup.so/pages/api-reference/endpoint/post-search)",
6+
key: "linkup-search",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
app,
11+
query: {
12+
type: "string",
13+
label: "Query",
14+
description: "The search query for Linkup.",
15+
},
16+
depth: {
17+
type: "string",
18+
label: "Search Depth",
19+
description: "Defines the precision of the search. `standard` returns results quickly; `deep` takes longer but yields more complete results.",
20+
options: [
21+
"standard",
22+
"deep",
23+
],
24+
},
25+
outputType: {
26+
type: "string",
27+
label: "Output Type",
28+
description: "The type of output you want to get. Use `structured` for a custom-formatted response defined by `structuredOutputSchema`",
29+
options: [
30+
{
31+
value: "sourcedAnswer",
32+
label: "Natural language answer and its sources",
33+
},
34+
{
35+
value: "searchResults",
36+
label: "Raw context",
37+
},
38+
{
39+
value: "structured",
40+
label: "Json format of the response",
41+
},
42+
],
43+
reloadProps: true,
44+
},
45+
structuredOutputSchema: {
46+
type: "string",
47+
label: "Structured Output Schema",
48+
description: "Schema for structured output (only applicable if Output Type is 'structured'). Provide a JSON schema (as a string) representing the desired response format.",
49+
optional: true,
50+
hidden: true,
51+
},
52+
includeImages: {
53+
type: "boolean",
54+
label: "Include Images",
55+
description: "Defines whether the API should include images in its results",
56+
optional: true,
57+
},
58+
},
59+
additionalProps(props) {
60+
if (this.outputType === "structured") {
61+
props.structuredOutputSchema.optional = false;
62+
props.structuredOutputSchema.hidden = false;
63+
props.structuredOutputSchema.default = `{
64+
"type": "object",
65+
"properties": {
66+
"results": {
67+
"type": "array",
68+
"items": {
69+
"type": "object",
70+
"properties": {
71+
"name": {
72+
"type": "string"
73+
},
74+
"year": {
75+
"type": "number"
76+
}
77+
},
78+
"required": [
79+
"name",
80+
"year"
81+
],
82+
"additionalProperties": false
83+
}
84+
}
85+
},
86+
"required": [
87+
"results"
88+
],
89+
"additionalProperties": false
90+
}`;
91+
}
92+
return {};
93+
},
94+
async run({ $ }) {
95+
try {
96+
const response = await this.app.search({
97+
query: this.query,
98+
depth: this.depth,
99+
outputType: this.outputType,
100+
structuredOutputSchema:
101+
this.structuredOutputSchema && JSON.parse(this.structuredOutputSchema),
102+
includeImages: this.includeImages,
103+
});
104+
$.export("$summary", "Successfully completed search query");
105+
return response;
106+
} catch (error) {
107+
console.error("Error calling Linkup API:", error);
108+
throw new Error(`Failed to fetch data from Linkup API: ${error.message}`);
109+
}
110+
},
111+
};

components/linkup/linkup.app.mjs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1+
import { LinkupClient } from "linkup-sdk";
2+
13
export default {
24
type: "app",
35
app: "linkup",
46
propDefinitions: {},
57
methods: {
6-
// this.$auth contains connected account data
7-
authKeys() {
8-
console.log(Object.keys(this.$auth));
8+
_getClient() {
9+
return new LinkupClient({
10+
apiKey: this.$auth.api_key,
11+
});
12+
},
13+
search(params) {
14+
const client = this._getClient();
15+
return client.search(params);
916
},
1017
},
11-
};
18+
};

components/linkup/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/linkup",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "Pipedream Linkup Components",
55
"main": "linkup.app.mjs",
66
"keywords": [
@@ -11,5 +11,8 @@
1111
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
1212
"publishConfig": {
1313
"access": "public"
14+
},
15+
"dependencies": {
16+
"linkup-sdk": "^1.0.3"
1417
}
15-
}
18+
}

0 commit comments

Comments
 (0)