Skip to content

[Components] limitless_ai #17139 #17242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions components/limitless_ai/actions/get-lifelog/get-lifelog.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import app from "../../limitless_ai.app.mjs";

export default {
key: "limitless_ai-get-lifelog",
name: "Get Lifelog",
description: "Returns a specific lifelog entry by ID. [See the documentation](https://www.limitless.ai/developers#get-lifelog)",
version: "0.0.1",
type: "action",
props: {
app,
includeMarkdown: {
propDefinition: [
app,
"includeMarkdown",
],
},
includeHeadings: {
propDefinition: [
app,
"includeHeadings",
],
},
id: {
propDefinition: [
app,
"id",
],
},
},
async run({ $ }) {
const response = await this.app.getLifelog({
$,
id: this.id,
params: {
includeMarkdown: this.includeMarkdown,
includeHeadings: this.includeHeadings,
},
});
$.export("$summary", `Successfully sent the request and retrieved ${response.meta.lifelogs.count} Lifelog with the specified ID`);
return response;
},
};
91 changes: 91 additions & 0 deletions components/limitless_ai/actions/get-lifelogs/get-lifelogs.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import app from "../../limitless_ai.app.mjs";

export default {
key: "limitless_ai-get-lifelogs",
name: "Get Lifelogs",
description: "Returns a list of lifelog entries based on specified time range or date. [See the documentation](https://www.limitless.ai/developers#get-lifelogs)",
version: "0.0.1",
type: "action",
props: {
app,
timezone: {
propDefinition: [
app,
"timezone",
],
},
date: {
propDefinition: [
app,
"date",
],
},
start: {
propDefinition: [
app,
"start",
],
},
end: {
propDefinition: [
app,
"end",
],
},
cursor: {
propDefinition: [
app,
"cursor",
],
},
direction: {
propDefinition: [
app,
"direction",
],
},
includeMarkdown: {
propDefinition: [
app,
"includeMarkdown",
],
},
includeHeadings: {
propDefinition: [
app,
"includeHeadings",
],
},
isStarred: {
propDefinition: [
app,
"isStarred",
],
},
limit: {
propDefinition: [
app,
"limit",
],
},
},
async run({ $ }) {
const response = await this.app.getLifelogs({
$,
params: {
timezone: this.timezone,
date: this.date,
start: this.start,
end: this.end,
cursor: this.cursor,
direction: this.direction,
includeMarkdown: this.includeMarkdown,
includeHeadings: this.includeHeadings,
isStarred: this.isStarred,
limit: this.limit,
},
});
$.export("$summary", `Successfully retrieved ${response.meta.lifelogs.count} Lifelogs`);
return response;
},
};
6 changes: 6 additions & 0 deletions components/limitless_ai/common/constants.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
DIRECTION_OPTIONS: [
"asc",
"desc",
],
};
106 changes: 102 additions & 4 deletions components/limitless_ai/limitless_ai.app.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,109 @@
import { axios } from "@pipedream/platform";
import constants from "./common/constants.mjs";

export default {
type: "app",
app: "limitless_ai",
propDefinitions: {},
propDefinitions: {
timezone: {
type: "string",
label: "Timezone",
description: "Time zone identifier, e.g., UTC or America/New_York",
optional: true,
},
date: {
type: "string",
label: "Date",
description: "Specific date in ISO format: `YYYY-MM-DD`. If `start` or `end` are provided, `date` will be ignored",
},
start: {
type: "string",
label: "Start",
description: "Start date or timestamp for the query range. ISO-8601 format: `YYYY-MM-DD` or `YYYY-MM-DD HH:mm:SS`",
optional: true,
},
end: {
type: "string",
label: "End",
description: "End date or timestamp for the query range. ISO-8601 format: `YYYY-MM-DD` or `YYYY-MM-DD HH:mm:SS`",
optional: true,
},
cursor: {
type: "string",
label: "Cursor",
description: "Pagination cursor to fetch the next set of results",
optional: true,
},
direction: {
type: "string",
label: "Direction",
description: "Order of results",
options: constants.DIRECTION_OPTIONS,
optional: true,
},
includeMarkdown: {
type: "boolean",
label: "Include Markdown",
description: "Whether to include Markdown-formatted content",
optional: true,
},
includeHeadings: {
type: "boolean",
label: "Include Headings",
description: "Whether to include document headings in the result",
optional: true,
},
isStarred: {
type: "boolean",
label: "Is Starred",
description: "Filter results by starred status",
optional: true,
},
limit: {
type: "string",
label: "Limit",
description: "Maximum number of results to return",
optional: true,
},
id: {
type: "string",
label: "ID",
description: "The ID of the lifelog entry to retrieve, given in the URL",
},
},
methods: {
// this.$auth contains connected account data
authKeys() {
console.log(Object.keys(this.$auth));
_baseUrl() {
return "https://api.limitless.ai/v1";
},
async _makeRequest(opts = {}) {
const {
$ = this,
path,
headers,
...otherOpts
} = opts;
return axios($, {
...otherOpts,
url: this._baseUrl() + path,
headers: {
"x-api-key": `${this.$auth.api_key}`,
...headers,
},
});
},
async getLifelogs(args = {}) {
return this._makeRequest({
path: "/lifelogs",
...args,
});
},
async getLifelog({
id, ...args
}) {
return this._makeRequest({
path: `/lifelogs/${id}`,
...args,
});
},
},
};
7 changes: 5 additions & 2 deletions components/limitless_ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/limitless_ai",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream Limitless.ai Components",
"main": "limitless_ai.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.1.0"
}
}
}
36 changes: 15 additions & 21 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading