diff --git a/docs/introduction/foundations/components/triggers/trigger-guide.mdx b/docs/introduction/foundations/components/triggers/trigger-guide.mdx index 7db78d070b..88a74fb761 100644 --- a/docs/introduction/foundations/components/triggers/trigger-guide.mdx +++ b/docs/introduction/foundations/components/triggers/trigger-guide.mdx @@ -49,7 +49,10 @@ entity.disable_trigger("") # Disable trigger via ID ```javascript Enable Trigger using javascript code -Coming soon! +import { Composio } from "composio-core"; + +const client = new Composio({ apiKey: "" }); +let trigger = await client.triggers.enable({ triggerId }); ``` @@ -121,15 +124,9 @@ listener.listen() ```Javascript Create a trigger listener -import { LangchainToolSet } from "composio-core"; // or any other toolset - -const toolset = new LangchainToolSet({ apiKey: process.env.COMPOSIO_API_KEY }); / -const composio_client = toolset.client - -// If not using LangchainToolSet -// import {Composio} from "composio-core"; -//const composio_client = new Composio({apiKey: process.env.COMPOSIO_API_KEY}); +import { Composio } from "composio-core"; // or any other toolset +const composio_client = new Composio({ apiKey: "" }); // Subscribe to triggers and perform actions composio_client.triggers.subscribe((data) => { @@ -139,7 +136,7 @@ composio_client.triggers.subscribe((data) => { -Coming soon! +You can set webhook url in the dashboard. diff --git a/docs/patterns/howtos/tool-finding.mdx b/docs/patterns/howtos/tool-finding.mdx index 3ec7fc4f74..23eb15db36 100644 --- a/docs/patterns/howtos/tool-finding.mdx +++ b/docs/patterns/howtos/tool-finding.mdx @@ -29,7 +29,15 @@ composio apps -Coming soon! + +```javascript javascript +import { Composio } from "composio-core"; +const composio_client = new Composio({ apiKey: process.env.COMPOSIO_API_KEY }); +const apps = await composio_client.apps.list(); + +console.log(apps); +``` + @@ -63,7 +71,15 @@ composio connections -Coming soon! + +```javascript javascript +import { Composio } from "composio-core"; +const composio_client = new Composio({ apiKey: process.env.COMPOSIO_API_KEY }); +const connections = await composio_client.getEntity("").getConnections(); + +console.log(connections); +``` + @@ -91,7 +107,15 @@ composio actions --limit 10 -Coming soon! + +```javascript javascript +import { Composio } from "composio-core"; +const composio_client = new Composio({ apiKey: process.env.COMPOSIO_API_KEY }); +const actions = await composio_client.actions.list(); + +console.log(actions); +``` + \ No newline at end of file