mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 06:58:07 -05:00
feat(webhooks): deprecate singular webhook block + add trigger mode to blocks (#903)
* feat(triggers): added new trigger mode for blocks, added socket event, ran migrations * Rename old trigger/ directory to background/ * cleaned up, ensured that we display active webhook at the block-level * fix submenu in tag dropdown * keyboard nav on tag dropdown submenu * feat(triggers): add outlook to new triggers system * cleanup * add types to tag dropdown, type all outputs for tools and use that over block outputs * update doc generator to truly reflect outputs * fix docs * add trigger handler * fix active webhook tag * tag dropdown fix for triggers * remove trigger mode schema change * feat(execution-filesystem): system to pass files between blocks (#866) * feat(files): pass files between blocks * presigned URL for downloads * Remove latest migration before merge * starter block file upload wasn't getting logged * checkpoint in human readable form * checkpoint files / file type outputs * file downloads working for block outputs * checkpoint file download * fix type issues * remove filereference interface with simpler user file interface * show files in the tag dropdown for start block * more migration to simple url object, reduce presigned time to 5 min * Remove migration 0065_parallel_nightmare and related files - Deleted apps/sim/db/migrations/0065_parallel_nightmare.sql - Deleted apps/sim/db/migrations/meta/0065_snapshot.json - Removed 0065 entry from apps/sim/db/migrations/meta/_journal.json Preparing for merge with origin/staging and migration regeneration * add migration files * fix tests * Update apps/sim/lib/uploads/setup.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/lib/workflows/execution-file-storage.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * Update apps/sim/lib/workflows/execution-file-storage.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * cleanup types * fix lint * fix logs typing for file refs * open download in new tab * fixed * Update apps/sim/tools/index.ts Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * fix file block * cleanup unused code * fix bugs * remove hacky file id logic * fix drag and drop * fix tests --------- Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> * feat(trigger-mode): added trigger-mode to workflow_blocks table (#902) * fix(schedules-perms): use regular perm system to view/edit schedule info (#901) * fix(schedules-perms): use regular perm system to view schedule info * fix perms * improve logging * cleanup * prevent tooltip showing up on modal open * updated trigger config * fix type issues --------- Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com> Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
This commit is contained in:
@@ -71,19 +71,16 @@ Read records from an Airtable table
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token |
|
||||
| `baseId` | string | Yes | ID of the Airtable base |
|
||||
| `tableId` | string | Yes | ID of the table |
|
||||
| `maxRecords` | number | No | Maximum number of records to return |
|
||||
| `filterFormula` | string | No | Formula to filter records \(e.g., |
|
||||
| `filterFormula` | string | No | Formula to filter records \(e.g., "\(\{Field Name\} = \'Value\'\)"\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `records` | json | Retrieved record data |
|
||||
| `record` | json | Single record data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `records` | json | Array of retrieved Airtable records |
|
||||
|
||||
### `airtable_get_record`
|
||||
|
||||
@@ -93,7 +90,6 @@ Retrieve a single record from an Airtable table by its ID
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token |
|
||||
| `baseId` | string | Yes | ID of the Airtable base |
|
||||
| `tableId` | string | Yes | ID or name of the table |
|
||||
| `recordId` | string | Yes | ID of the record to retrieve |
|
||||
@@ -102,9 +98,8 @@ Retrieve a single record from an Airtable table by its ID
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `records` | json | Retrieved record data |
|
||||
| `record` | json | Single record data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `record` | json | Retrieved Airtable record with id, createdTime, and fields |
|
||||
| `metadata` | json | Operation metadata including record count |
|
||||
|
||||
### `airtable_create_records`
|
||||
|
||||
@@ -114,17 +109,16 @@ Write new records to an Airtable table
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token |
|
||||
| `baseId` | string | Yes | ID of the Airtable base |
|
||||
| `tableId` | string | Yes | ID or name of the table |
|
||||
| `records` | json | Yes | Array of records to create, each with a `fields` object |
|
||||
| `fields` | string | No | No description |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `records` | json | Retrieved record data |
|
||||
| `record` | json | Single record data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `records` | json | Array of created Airtable records |
|
||||
|
||||
### `airtable_update_record`
|
||||
|
||||
@@ -134,7 +128,6 @@ Update an existing record in an Airtable table by ID
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token |
|
||||
| `baseId` | string | Yes | ID of the Airtable base |
|
||||
| `tableId` | string | Yes | ID or name of the table |
|
||||
| `recordId` | string | Yes | ID of the record to update |
|
||||
@@ -144,9 +137,8 @@ Update an existing record in an Airtable table by ID
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `records` | json | Retrieved record data |
|
||||
| `record` | json | Single record data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `record` | json | Updated Airtable record with id, createdTime, and fields |
|
||||
| `metadata` | json | Operation metadata including record count and updated field names |
|
||||
|
||||
### `airtable_update_multiple_records`
|
||||
|
||||
@@ -156,17 +148,17 @@ Update multiple existing records in an Airtable table
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token |
|
||||
| `baseId` | string | Yes | ID of the Airtable base |
|
||||
| `tableId` | string | Yes | ID or name of the table |
|
||||
| `records` | json | Yes | Array of records to update, each with an `id` and a `fields` object |
|
||||
| `fields` | string | No | No description |
|
||||
| `fields` | string | No | No description |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `records` | json | Retrieved record data |
|
||||
| `record` | json | Single record data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `records` | json | Array of updated Airtable records |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -71,10 +71,7 @@ Search for academic papers on ArXiv by keywords, authors, titles, or other field
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `papers` | json | Found papers data |
|
||||
| `totalResults` | number | Total results count |
|
||||
| `paper` | json | Paper details |
|
||||
| `authorPapers` | json | Author papers list |
|
||||
| `papers` | json | Array of papers matching the search query |
|
||||
|
||||
### `arxiv_get_paper`
|
||||
|
||||
@@ -84,16 +81,13 @@ Get detailed information about a specific ArXiv paper by its ID.
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `paperId` | string | Yes | ArXiv paper ID \(e.g., |
|
||||
| `paperId` | string | Yes | ArXiv paper ID \(e.g., "1706.03762"\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `papers` | json | Found papers data |
|
||||
| `totalResults` | number | Total results count |
|
||||
| `paper` | json | Paper details |
|
||||
| `authorPapers` | json | Author papers list |
|
||||
| `paper` | json | Detailed information about the requested ArXiv paper |
|
||||
|
||||
### `arxiv_get_author_papers`
|
||||
|
||||
@@ -110,10 +104,7 @@ Search for papers by a specific author on ArXiv.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `papers` | json | Found papers data |
|
||||
| `totalResults` | number | Total results count |
|
||||
| `paper` | json | Paper details |
|
||||
| `authorPapers` | json | Author papers list |
|
||||
| `authorPapers` | json | Array of papers authored by the specified author |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ Runs a browser automation task using BrowserUse
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `task` | string | Yes | What should the browser agent do |
|
||||
| `variables` | json | No | Optional variables to use as secrets \(format: \{key: value\}\) |
|
||||
| `format` | string | No | No description |
|
||||
| `save_browser_data` | boolean | No | Whether to save browser data |
|
||||
| `model` | string | No | LLM model to use \(default: gpt-4o\) |
|
||||
| `apiKey` | string | Yes | API key for BrowserUse API |
|
||||
@@ -81,10 +82,9 @@ Runs a browser automation task using BrowserUse
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `id` | string | Task execution identifier |
|
||||
| `success` | boolean | Task completion status |
|
||||
| `output` | any | Task output data |
|
||||
| `steps` | json | Execution steps taken |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Browser automation task results including task ID, success status, output data, and execution steps |
|
||||
| `error` | string | Error message if the operation failed |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -220,7 +220,8 @@ Populate Clay with data from a JSON file. Enables direct communication and notif
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | any | Response data |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Clay populate operation results including response data from Clay webhook |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ Retrieve content from Confluence pages using the Confluence API.
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Confluence |
|
||||
| `domain` | string | Yes | Your Confluence domain \(e.g., yourcompany.atlassian.net\) |
|
||||
| `pageId` | string | Yes | Confluence page ID to retrieve |
|
||||
| `cloudId` | string | No | Confluence Cloud ID for the instance. If not provided, it will be fetched using the domain. |
|
||||
@@ -66,11 +65,10 @@ Retrieve content from Confluence pages using the Confluence API.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Timestamp |
|
||||
| `pageId` | string | Page identifier |
|
||||
| `content` | string | Page content |
|
||||
| `ts` | string | Timestamp of retrieval |
|
||||
| `pageId` | string | Confluence page ID |
|
||||
| `content` | string | Page content with HTML tags stripped |
|
||||
| `title` | string | Page title |
|
||||
| `success` | boolean | Operation success status |
|
||||
|
||||
### `confluence_update`
|
||||
|
||||
@@ -80,7 +78,6 @@ Update a Confluence page using the Confluence API.
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Confluence |
|
||||
| `domain` | string | Yes | Your Confluence domain \(e.g., yourcompany.atlassian.net\) |
|
||||
| `pageId` | string | Yes | Confluence page ID to update |
|
||||
| `title` | string | No | New title for the page |
|
||||
@@ -92,11 +89,10 @@ Update a Confluence page using the Confluence API.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Timestamp |
|
||||
| `pageId` | string | Page identifier |
|
||||
| `content` | string | Page content |
|
||||
| `title` | string | Page title |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `ts` | string | Timestamp of update |
|
||||
| `pageId` | string | Confluence page ID |
|
||||
| `title` | string | Updated page title |
|
||||
| `success` | boolean | Update operation success status |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ Send a message to a Discord channel
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Message content |
|
||||
| `data` | any | Response data |
|
||||
| `message` | string | Success or error message |
|
||||
| `data` | object | Discord message data |
|
||||
|
||||
### `discord_get_messages`
|
||||
|
||||
@@ -99,8 +99,8 @@ Retrieve messages from a Discord channel
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Message content |
|
||||
| `data` | any | Response data |
|
||||
| `message` | string | Success or error message |
|
||||
| `messages` | array | Array of Discord messages with full metadata |
|
||||
|
||||
### `discord_get_server`
|
||||
|
||||
@@ -117,8 +117,8 @@ Retrieve information about a Discord server (guild)
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Message content |
|
||||
| `data` | any | Response data |
|
||||
| `message` | string | Success or error message |
|
||||
| `data` | object | Discord server \(guild\) information |
|
||||
|
||||
### `discord_get_user`
|
||||
|
||||
@@ -135,8 +135,8 @@ Retrieve information about a Discord user
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Message content |
|
||||
| `data` | any | Response data |
|
||||
| `message` | string | Success or error message |
|
||||
| `data` | object | Discord user information |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,11 +68,7 @@ Search the web using Exa AI. Returns relevant search results with titles, URLs,
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `similarLinks` | json | Similar links found |
|
||||
| `answer` | string | Generated answer |
|
||||
| `citations` | json | Answer citations |
|
||||
| `research` | json | Research findings |
|
||||
| `results` | array | Search results with titles, URLs, and text snippets |
|
||||
|
||||
### `exa_get_contents`
|
||||
|
||||
@@ -91,11 +87,7 @@ Retrieve the contents of webpages using Exa AI. Returns the title, text content,
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `similarLinks` | json | Similar links found |
|
||||
| `answer` | string | Generated answer |
|
||||
| `citations` | json | Answer citations |
|
||||
| `research` | json | Research findings |
|
||||
| `results` | array | Retrieved content from URLs with title, text, and summaries |
|
||||
|
||||
### `exa_find_similar_links`
|
||||
|
||||
@@ -114,11 +106,7 @@ Find webpages similar to a given URL using Exa AI. Returns a list of similar lin
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `similarLinks` | json | Similar links found |
|
||||
| `answer` | string | Generated answer |
|
||||
| `citations` | json | Answer citations |
|
||||
| `research` | json | Research findings |
|
||||
| `similarLinks` | array | Similar links found with titles, URLs, and text snippets |
|
||||
|
||||
### `exa_answer`
|
||||
|
||||
@@ -136,11 +124,8 @@ Get an AI-generated answer to a question with citations from the web using Exa A
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `similarLinks` | json | Similar links found |
|
||||
| `answer` | string | Generated answer |
|
||||
| `citations` | json | Answer citations |
|
||||
| `research` | json | Research findings |
|
||||
| `answer` | string | AI-generated answer to the question |
|
||||
| `citations` | array | Sources and citations for the answer |
|
||||
|
||||
### `exa_research`
|
||||
|
||||
@@ -158,11 +143,7 @@ Perform comprehensive research using AI to generate detailed reports with citati
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `similarLinks` | json | Similar links found |
|
||||
| `answer` | string | Generated answer |
|
||||
| `citations` | json | Answer citations |
|
||||
| `research` | json | Research findings |
|
||||
| `research` | array | Comprehensive research findings with citations and summaries |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -71,8 +71,8 @@ Parse one or more uploaded files or files from URLs (text, PDF, CSV, images, etc
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `files` | json | Parsed file data |
|
||||
| `combinedContent` | string | Combined file content |
|
||||
| `files` | json | Array of parsed file objects with content, metadata, and file properties |
|
||||
| `combinedContent` | string | All file contents merged into a single text string |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -81,14 +81,9 @@ Extract structured content from web pages with comprehensive metadata support. C
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `markdown` | string | Page content markdown |
|
||||
| `html` | any | Raw HTML content |
|
||||
| `metadata` | json | Page metadata |
|
||||
| `data` | json | Search results data |
|
||||
| `warning` | any | Warning messages |
|
||||
| `pages` | json | Crawled pages data |
|
||||
| `total` | number | Total pages found |
|
||||
| `creditsUsed` | number | Credits consumed |
|
||||
| `markdown` | string | Page content in markdown format |
|
||||
| `html` | string | Raw HTML content of the page |
|
||||
| `metadata` | object | Page metadata including SEO and Open Graph information |
|
||||
|
||||
### `firecrawl_search`
|
||||
|
||||
@@ -105,14 +100,7 @@ Search for information on the web using Firecrawl
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `markdown` | string | Page content markdown |
|
||||
| `html` | any | Raw HTML content |
|
||||
| `metadata` | json | Page metadata |
|
||||
| `data` | json | Search results data |
|
||||
| `warning` | any | Warning messages |
|
||||
| `pages` | json | Crawled pages data |
|
||||
| `total` | number | Total pages found |
|
||||
| `creditsUsed` | number | Credits consumed |
|
||||
| `data` | array | Search results data |
|
||||
|
||||
### `firecrawl_crawl`
|
||||
|
||||
@@ -131,14 +119,7 @@ Crawl entire websites and extract structured content from all accessible pages
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `markdown` | string | Page content markdown |
|
||||
| `html` | any | Raw HTML content |
|
||||
| `metadata` | json | Page metadata |
|
||||
| `data` | json | Search results data |
|
||||
| `warning` | any | Warning messages |
|
||||
| `pages` | json | Crawled pages data |
|
||||
| `total` | number | Total pages found |
|
||||
| `creditsUsed` | number | Credits consumed |
|
||||
| `pages` | array | Array of crawled pages with their content and metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
32
apps/docs/content/docs/tools/generic_webhook.mdx
Normal file
32
apps/docs/content/docs/tools/generic_webhook.mdx
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: Webhook
|
||||
description: Receive webhooks from any service
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="generic_webhook"
|
||||
color="#10B981"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
fill='currentColor'
|
||||
|
||||
|
||||
viewBox='0 0 24 24'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path d='M17.974 7A4.967 4.967 0 0 0 18 6.5a5.5 5.5 0 1 0-8.672 4.491L7.18 15.114A2.428 2.428 0 0 0 6.496 15 2.5 2.5 0 1 0 9 17.496a2.36 2.36 0 0 0-.93-1.925l2.576-4.943-.41-.241A4.5 4.5 0 1 1 17 6.5a4.8 4.8 0 0 1-.022.452zM6.503 18.999a1.5 1.5 0 1 1 1.496-1.503A1.518 1.518 0 0 1 6.503 19zM18.5 12a5.735 5.735 0 0 0-1.453.157l-2.744-3.941A2.414 2.414 0 0 0 15 6.5a2.544 2.544 0 1 0-1.518 2.284l3.17 4.557.36-.13A4.267 4.267 0 0 1 18.5 13a4.5 4.5 0 1 1-.008 9h-.006a4.684 4.684 0 0 1-3.12-1.355l-.703.71A5.653 5.653 0 0 0 18.49 23h.011a5.5 5.5 0 0 0 0-11zM11 6.5A1.5 1.5 0 1 1 12.5 8 1.509 1.509 0 0 1 11 6.5zM18.5 20a2.5 2.5 0 1 0-2.447-3h-5.05l-.003.497A4.546 4.546 0 0 1 6.5 22 4.526 4.526 0 0 1 2 17.5a4.596 4.596 0 0 1 3.148-4.37l-.296-.954A5.606 5.606 0 0 0 1 17.5 5.532 5.532 0 0 0 6.5 23a5.573 5.573 0 0 0 5.478-5h4.08a2.487 2.487 0 0 0 2.442 2zm0-4a1.5 1.5 0 1 1-1.5 1.5 1.509 1.509 0 0 1 1.5-1.5z' />
|
||||
<path fill='none' d='M0 0h24v24H0z' />
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `triggers`
|
||||
- Type: `generic_webhook`
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: GitHub
|
||||
description: Interact with GitHub
|
||||
description: Interact with GitHub or trigger workflows from GitHub events
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -35,7 +35,7 @@ In Sim, the GitHub integration enables your agents to interact directly with Git
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Access GitHub repositories, pull requests, and comments through the GitHub API. Automate code reviews, PR management, and repository interactions within your workflow.
|
||||
Access GitHub repositories, pull requests, and comments through the GitHub API. Automate code reviews, PR management, and repository interactions within your workflow. Trigger workflows from GitHub events like push, pull requests, and issues.
|
||||
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ Fetch PR details including diff and files changed
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Response metadata |
|
||||
| `content` | string | Human-readable PR summary |
|
||||
| `metadata` | object | Detailed PR metadata including file changes |
|
||||
|
||||
### `github_comment`
|
||||
|
||||
@@ -85,8 +85,8 @@ Create comments on GitHub PRs
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Response metadata |
|
||||
| `content` | string | Human-readable comment confirmation |
|
||||
| `metadata` | object | Comment metadata |
|
||||
|
||||
### `github_repo_info`
|
||||
|
||||
@@ -104,8 +104,8 @@ Retrieve comprehensive GitHub repository metadata including stars, forks, issues
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Response metadata |
|
||||
| `content` | string | Human-readable repository summary |
|
||||
| `metadata` | object | Repository metadata |
|
||||
|
||||
### `github_latest_commit`
|
||||
|
||||
@@ -117,15 +117,15 @@ Retrieve the latest commit from a GitHub repository
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `owner` | string | Yes | Repository owner \(user or organization\) |
|
||||
| `repo` | string | Yes | Repository name |
|
||||
| `branch` | string | No | Branch name \(defaults to the repository |
|
||||
| `branch` | string | No | Branch name \(defaults to the repository's default branch\) |
|
||||
| `apiKey` | string | Yes | GitHub API token |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Response metadata |
|
||||
| `content` | string | Human-readable commit summary |
|
||||
| `metadata` | object | Commit metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Gmail
|
||||
description: Send Gmail
|
||||
description: Send Gmail or trigger workflows from Gmail events
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -51,7 +51,7 @@ In Sim, the Gmail integration enables your agents to send, read, and search emai
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate Gmail functionality to send email messages within your workflow. Automate email communications and process email content using OAuth authentication.
|
||||
Comprehensive Gmail integration with OAuth authentication. Send email messages, read email content, and trigger workflows from Gmail events like new emails and label changes.
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ Send emails using Gmail
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Gmail API |
|
||||
| `to` | string | Yes | Recipient email address |
|
||||
| `subject` | string | Yes | Email subject |
|
||||
| `body` | string | Yes | Email body content |
|
||||
@@ -74,8 +73,8 @@ Send emails using Gmail
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Email metadata |
|
||||
| `content` | string | Success message |
|
||||
| `metadata` | object | Email metadata |
|
||||
|
||||
### `gmail_draft`
|
||||
|
||||
@@ -85,7 +84,6 @@ Draft emails using Gmail
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Gmail API |
|
||||
| `to` | string | Yes | Recipient email address |
|
||||
| `subject` | string | Yes | Email subject |
|
||||
| `body` | string | Yes | Email body content |
|
||||
@@ -94,8 +92,8 @@ Draft emails using Gmail
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Email metadata |
|
||||
| `content` | string | Success message |
|
||||
| `metadata` | object | Draft metadata |
|
||||
|
||||
### `gmail_read`
|
||||
|
||||
@@ -105,7 +103,6 @@ Read emails from Gmail
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Gmail API |
|
||||
| `messageId` | string | No | ID of the message to read |
|
||||
| `folder` | string | No | Folder/label to read emails from |
|
||||
| `unreadOnly` | boolean | No | Only retrieve unread messages |
|
||||
@@ -115,8 +112,8 @@ Read emails from Gmail
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Email metadata |
|
||||
| `content` | string | Email content or summary |
|
||||
| `metadata` | object | Email metadata |
|
||||
|
||||
### `gmail_search`
|
||||
|
||||
@@ -126,7 +123,6 @@ Search emails in Gmail
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Gmail API |
|
||||
| `query` | string | Yes | Search query for emails |
|
||||
| `maxResults` | number | No | Maximum number of results to return |
|
||||
|
||||
@@ -134,8 +130,8 @@ Search emails in Gmail
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Response content |
|
||||
| `metadata` | json | Email metadata |
|
||||
| `content` | string | Search results summary |
|
||||
| `metadata` | object | Search metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -104,7 +104,6 @@ Create a new event in Google Calendar
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `summary` | string | Yes | Event title/summary |
|
||||
| `description` | string | No | Event description |
|
||||
@@ -119,8 +118,8 @@ Create a new event in Google Calendar
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Operation response content |
|
||||
| `metadata` | json | Event metadata |
|
||||
| `content` | string | Event creation confirmation message |
|
||||
| `metadata` | json | Created event metadata including ID, status, and details |
|
||||
|
||||
### `google_calendar_list`
|
||||
|
||||
@@ -130,7 +129,6 @@ List events from Google Calendar
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `timeMin` | string | No | Lower bound for events \(RFC3339 timestamp, e.g., 2025-06-03T00:00:00Z\) |
|
||||
| `timeMax` | string | No | Upper bound for events \(RFC3339 timestamp, e.g., 2025-06-04T00:00:00Z\) |
|
||||
@@ -141,8 +139,8 @@ List events from Google Calendar
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Operation response content |
|
||||
| `metadata` | json | Event metadata |
|
||||
| `content` | string | Summary of found events count |
|
||||
| `metadata` | json | List of events with pagination tokens and event details |
|
||||
|
||||
### `google_calendar_get`
|
||||
|
||||
@@ -152,7 +150,6 @@ Get a specific event from Google Calendar
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `eventId` | string | Yes | Event ID to retrieve |
|
||||
|
||||
@@ -160,8 +157,8 @@ Get a specific event from Google Calendar
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Operation response content |
|
||||
| `metadata` | json | Event metadata |
|
||||
| `content` | string | Event retrieval confirmation message |
|
||||
| `metadata` | json | Event details including ID, status, times, and attendees |
|
||||
|
||||
### `google_calendar_quick_add`
|
||||
|
||||
@@ -171,9 +168,8 @@ Create events from natural language text
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `text` | string | Yes | Natural language text describing the event \(e.g., |
|
||||
| `text` | string | Yes | Natural language text describing the event \(e.g., "Meeting with John tomorrow at 3pm"\) |
|
||||
| `attendees` | array | No | Array of attendee email addresses \(comma-separated string also accepted\) |
|
||||
| `sendUpdates` | string | No | How to send updates to attendees: all, externalOnly, or none |
|
||||
|
||||
@@ -181,8 +177,8 @@ Create events from natural language text
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Operation response content |
|
||||
| `metadata` | json | Event metadata |
|
||||
| `content` | string | Event creation confirmation message from natural language |
|
||||
| `metadata` | json | Created event metadata including parsed details |
|
||||
|
||||
### `google_calendar_invite`
|
||||
|
||||
@@ -192,7 +188,6 @@ Invite attendees to an existing Google Calendar event
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Google Calendar API |
|
||||
| `calendarId` | string | No | Calendar ID \(defaults to primary\) |
|
||||
| `eventId` | string | Yes | Event ID to invite attendees to |
|
||||
| `attendees` | array | Yes | Array of attendee email addresses to invite |
|
||||
@@ -203,8 +198,8 @@ Invite attendees to an existing Google Calendar event
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Operation response content |
|
||||
| `metadata` | json | Event metadata |
|
||||
| `content` | string | Attendee invitation confirmation message with email delivery status |
|
||||
| `metadata` | json | Updated event metadata including attendee list and details |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,16 +95,14 @@ Read content from a Google Docs document
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Docs API |
|
||||
| `documentId` | string | Yes | The ID of the document to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Document content |
|
||||
| `metadata` | json | Document metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `content` | string | Extracted document text content |
|
||||
| `metadata` | json | Document metadata including ID, title, and URL |
|
||||
|
||||
### `google_docs_write`
|
||||
|
||||
@@ -114,7 +112,6 @@ Write or update content in a Google Docs document
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Docs API |
|
||||
| `documentId` | string | Yes | The ID of the document to write to |
|
||||
| `content` | string | Yes | The content to write to the document |
|
||||
|
||||
@@ -122,9 +119,8 @@ Write or update content in a Google Docs document
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Document content |
|
||||
| `metadata` | json | Document metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `updatedContent` | boolean | Indicates if document content was updated successfully |
|
||||
| `metadata` | json | Updated document metadata including ID, title, and URL |
|
||||
|
||||
### `google_docs_create`
|
||||
|
||||
@@ -134,7 +130,6 @@ Create a new Google Docs document
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Docs API |
|
||||
| `title` | string | Yes | The title of the document to create |
|
||||
| `content` | string | No | The content of the document to create |
|
||||
| `folderSelector` | string | No | Select the folder to create the document in |
|
||||
@@ -144,9 +139,7 @@ Create a new Google Docs document
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Document content |
|
||||
| `metadata` | json | Document metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `metadata` | json | Created document metadata including ID, title, and URL |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +87,6 @@ Upload a file to Google Drive
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Drive API |
|
||||
| `fileName` | string | Yes | The name of the file to upload |
|
||||
| `content` | string | Yes | The content of the file to upload |
|
||||
| `mimeType` | string | No | The MIME type of the file to upload |
|
||||
@@ -98,8 +97,7 @@ Upload a file to Google Drive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `file` | json | File data |
|
||||
| `files` | json | Files list |
|
||||
| `file` | json | Uploaded file metadata including ID, name, and links |
|
||||
|
||||
### `google_drive_create_folder`
|
||||
|
||||
@@ -109,7 +107,6 @@ Create a new folder in Google Drive
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Drive API |
|
||||
| `fileName` | string | Yes | Name of the folder to create |
|
||||
| `folderSelector` | string | No | Select the parent folder to create the folder in |
|
||||
| `folderId` | string | No | ID of the parent folder \(internal use\) |
|
||||
@@ -118,8 +115,7 @@ Create a new folder in Google Drive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `file` | json | File data |
|
||||
| `files` | json | Files list |
|
||||
| `file` | json | Created folder metadata including ID, name, and parent information |
|
||||
|
||||
### `google_drive_list`
|
||||
|
||||
@@ -129,7 +125,6 @@ List files and folders in Google Drive
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Drive API |
|
||||
| `folderSelector` | string | No | Select the folder to list files from |
|
||||
| `folderId` | string | No | The ID of the folder to list files from \(internal use\) |
|
||||
| `query` | string | No | A query to filter the files |
|
||||
@@ -140,8 +135,7 @@ List files and folders in Google Drive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `file` | json | File data |
|
||||
| `files` | json | Files list |
|
||||
| `files` | json | Array of file metadata objects from the specified folder |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -81,8 +81,7 @@ Search the web with the Custom Search API
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | Search result items |
|
||||
| `searchInformation` | json | Search metadata |
|
||||
| `items` | array | Array of search results from Google |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -110,7 +110,6 @@ Read data from a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Sheets API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to read from |
|
||||
| `range` | string | No | The range of cells to read from |
|
||||
|
||||
@@ -118,13 +117,8 @@ Read data from a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `tableRange` | string | Table range |
|
||||
| `data` | json | Sheet data including range and cell values |
|
||||
| `metadata` | json | Spreadsheet metadata including ID and URL |
|
||||
|
||||
### `google_sheets_write`
|
||||
|
||||
@@ -134,7 +128,6 @@ Write data to a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Sheets API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to write to |
|
||||
| `range` | string | No | The range of cells to write to |
|
||||
| `values` | array | Yes | The data to write to the spreadsheet |
|
||||
@@ -145,13 +138,11 @@ Write data to a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `tableRange` | string | Table range |
|
||||
| `updatedRange` | string | Range of cells that were updated |
|
||||
| `updatedRows` | number | Number of rows updated |
|
||||
| `updatedColumns` | number | Number of columns updated |
|
||||
| `updatedCells` | number | Number of cells updated |
|
||||
| `metadata` | json | Spreadsheet metadata including ID and URL |
|
||||
|
||||
### `google_sheets_update`
|
||||
|
||||
@@ -161,7 +152,6 @@ Update data in a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Sheets API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to update |
|
||||
| `range` | string | No | The range of cells to update |
|
||||
| `values` | array | Yes | The data to update in the spreadsheet |
|
||||
@@ -172,13 +162,11 @@ Update data in a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `tableRange` | string | Table range |
|
||||
| `updatedRange` | string | Range of cells that were updated |
|
||||
| `updatedRows` | number | Number of rows updated |
|
||||
| `updatedColumns` | number | Number of columns updated |
|
||||
| `updatedCells` | number | Number of cells updated |
|
||||
| `metadata` | json | Spreadsheet metadata including ID and URL |
|
||||
|
||||
### `google_sheets_append`
|
||||
|
||||
@@ -188,7 +176,6 @@ Append data to the end of a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Google Sheets API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to append to |
|
||||
| `range` | string | No | The range of cells to append after |
|
||||
| `values` | array | Yes | The data to append to the spreadsheet |
|
||||
@@ -200,13 +187,12 @@ Append data to the end of a Google Sheets spreadsheet
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `tableRange` | string | Table range |
|
||||
| `tableRange` | string | Range of the table where data was appended |
|
||||
| `updatedRange` | string | Range of cells that were updated |
|
||||
| `updatedRows` | number | Number of rows updated |
|
||||
| `updatedColumns` | number | Number of columns updated |
|
||||
| `updatedCells` | number | Number of cells updated |
|
||||
| `metadata` | json | Spreadsheet metadata including ID and URL |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,9 +92,8 @@ Generate completions using Hugging Face Inference API
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Generated response |
|
||||
| `model` | string | Model used |
|
||||
| `usage` | json | Token usage stats |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Chat completion results |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ Returns companies matching a set of criteria using Hunter.io AI-powered search.
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `query` | string | No | Natural language search query for companies |
|
||||
| `domain` | string | No | Company domain names to filter by |
|
||||
| `headcount` | string | No | Company size filter \(e.g., |
|
||||
| `headcount` | string | No | Company size filter \(e.g., "1-10", "11-50"\) |
|
||||
| `company_type` | string | No | Type of organization |
|
||||
| `technology` | string | No | Technology used by companies |
|
||||
| `apiKey` | string | Yes | Hunter.io API Key |
|
||||
@@ -66,15 +66,7 @@ Returns companies matching a set of criteria using Hunter.io AI-powered search.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `emails` | json | Email addresses found |
|
||||
| `email` | string | Found email address |
|
||||
| `score` | number | Confidence score |
|
||||
| `result` | string | Verification result |
|
||||
| `status` | string | Status message |
|
||||
| `total` | number | Total results count |
|
||||
| `personal_emails` | number | Personal emails count |
|
||||
| `generic_emails` | number | Generic emails count |
|
||||
| `results` | array | Array of companies matching the search criteria, each containing domain, name, headcount, technologies, and email_count |
|
||||
|
||||
### `hunter_domain_search`
|
||||
|
||||
@@ -96,15 +88,26 @@ Returns all the email addresses found using one given domain name, with sources.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `emails` | json | Email addresses found |
|
||||
| `email` | string | Found email address |
|
||||
| `score` | number | Confidence score |
|
||||
| `result` | string | Verification result |
|
||||
| `status` | string | Status message |
|
||||
| `total` | number | Total results count |
|
||||
| `personal_emails` | number | Personal emails count |
|
||||
| `generic_emails` | number | Generic emails count |
|
||||
| `domain` | string | The searched domain name |
|
||||
| `disposable` | boolean | Whether the domain accepts disposable email addresses |
|
||||
| `webmail` | boolean | Whether the domain is a webmail provider |
|
||||
| `accept_all` | boolean | Whether the domain accepts all email addresses |
|
||||
| `pattern` | string | The email pattern used by the organization |
|
||||
| `organization` | string | The organization name |
|
||||
| `description` | string | Description of the organization |
|
||||
| `industry` | string | Industry of the organization |
|
||||
| `twitter` | string | Twitter profile of the organization |
|
||||
| `facebook` | string | Facebook profile of the organization |
|
||||
| `linkedin` | string | LinkedIn profile of the organization |
|
||||
| `instagram` | string | Instagram profile of the organization |
|
||||
| `youtube` | string | YouTube channel of the organization |
|
||||
| `technologies` | array | Array of technologies used by the organization |
|
||||
| `country` | string | Country where the organization is located |
|
||||
| `state` | string | State where the organization is located |
|
||||
| `city` | string | City where the organization is located |
|
||||
| `postal_code` | string | Postal code of the organization |
|
||||
| `street` | string | Street address of the organization |
|
||||
| `emails` | array | Array of email addresses found for the domain, each containing value, type, confidence, sources, and person details |
|
||||
|
||||
### `hunter_email_finder`
|
||||
|
||||
@@ -115,8 +118,8 @@ Finds the most likely email address for a person given their name and company do
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `domain` | string | Yes | Company domain name |
|
||||
| `first_name` | string | Yes | Person |
|
||||
| `last_name` | string | Yes | Person |
|
||||
| `first_name` | string | Yes | Person's first name |
|
||||
| `last_name` | string | Yes | Person's last name |
|
||||
| `company` | string | No | Company name |
|
||||
| `apiKey` | string | Yes | Hunter.io API Key |
|
||||
|
||||
@@ -124,15 +127,10 @@ Finds the most likely email address for a person given their name and company do
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `emails` | json | Email addresses found |
|
||||
| `email` | string | Found email address |
|
||||
| `score` | number | Confidence score |
|
||||
| `result` | string | Verification result |
|
||||
| `status` | string | Status message |
|
||||
| `total` | number | Total results count |
|
||||
| `personal_emails` | number | Personal emails count |
|
||||
| `generic_emails` | number | Generic emails count |
|
||||
| `email` | string | The found email address |
|
||||
| `score` | number | Confidence score for the found email address |
|
||||
| `sources` | array | Array of sources where the email was found, each containing domain, uri, extracted_on, last_seen_on, and still_on_page |
|
||||
| `verification` | object | Verification information containing date and status |
|
||||
|
||||
### `hunter_email_verifier`
|
||||
|
||||
@@ -149,15 +147,20 @@ Verifies the deliverability of an email address and provides detailed verificati
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `emails` | json | Email addresses found |
|
||||
| `email` | string | Found email address |
|
||||
| `score` | number | Confidence score |
|
||||
| `result` | string | Verification result |
|
||||
| `status` | string | Status message |
|
||||
| `total` | number | Total results count |
|
||||
| `personal_emails` | number | Personal emails count |
|
||||
| `generic_emails` | number | Generic emails count |
|
||||
| `result` | string | Deliverability result: deliverable, undeliverable, or risky |
|
||||
| `score` | number | Confidence score for the verification result |
|
||||
| `email` | string | The verified email address |
|
||||
| `regexp` | boolean | Whether the email follows a valid regex pattern |
|
||||
| `gibberish` | boolean | Whether the email appears to be gibberish |
|
||||
| `disposable` | boolean | Whether the email is from a disposable email provider |
|
||||
| `webmail` | boolean | Whether the email is from a webmail provider |
|
||||
| `mx_records` | boolean | Whether MX records exist for the domain |
|
||||
| `smtp_server` | boolean | Whether the SMTP server is reachable |
|
||||
| `smtp_check` | boolean | Whether the SMTP check was successful |
|
||||
| `accept_all` | boolean | Whether the domain accepts all email addresses |
|
||||
| `block` | boolean | Whether the email is blocked |
|
||||
| `status` | string | Verification status: valid, invalid, accept_all, webmail, disposable, or unknown |
|
||||
| `sources` | array | Array of sources where the email was found |
|
||||
|
||||
### `hunter_companies_find`
|
||||
|
||||
@@ -174,15 +177,8 @@ Enriches company data using domain name.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `emails` | json | Email addresses found |
|
||||
| `email` | string | Found email address |
|
||||
| `score` | number | Confidence score |
|
||||
| `result` | string | Verification result |
|
||||
| `status` | string | Status message |
|
||||
| `total` | number | Total results count |
|
||||
| `personal_emails` | number | Personal emails count |
|
||||
| `generic_emails` | number | Generic emails count |
|
||||
| `person` | object | Person information \(undefined for companies_find tool\) |
|
||||
| `company` | object | Company information including name, domain, industry, size, country, linkedin, and twitter |
|
||||
|
||||
### `hunter_email_count`
|
||||
|
||||
@@ -201,15 +197,11 @@ Returns the total number of email addresses found for a domain or company.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `emails` | json | Email addresses found |
|
||||
| `email` | string | Found email address |
|
||||
| `score` | number | Confidence score |
|
||||
| `result` | string | Verification result |
|
||||
| `status` | string | Status message |
|
||||
| `total` | number | Total results count |
|
||||
| `personal_emails` | number | Personal emails count |
|
||||
| `generic_emails` | number | Generic emails count |
|
||||
| `total` | number | Total number of email addresses found |
|
||||
| `personal_emails` | number | Number of personal email addresses found |
|
||||
| `generic_emails` | number | Number of generic email addresses found |
|
||||
| `department` | object | Breakdown of email addresses by department \(executive, it, finance, management, sales, legal, support, hr, marketing, communication\) |
|
||||
| `seniority` | object | Breakdown of email addresses by seniority level \(junior, senior, executive\) |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,9 +73,8 @@ Generate images using OpenAI
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Generation response |
|
||||
| `image` | string | Generated image URL |
|
||||
| `metadata` | json | Generation metadata |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Generated image data |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ Extract and process web content into clean, LLM-friendly text using Jina AI Read
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Extracted content |
|
||||
| `content` | string | The extracted content from the URL, processed into clean, LLM-friendly text |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ Retrieve detailed information about a specific Jira issue
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Jira |
|
||||
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
|
||||
| `projectId` | string | No | Jira project ID to retrieve issues from. If not provided, all issues will be retrieved. |
|
||||
| `issueKey` | string | Yes | Jira issue key to retrieve \(e.g., PROJ-123\) |
|
||||
@@ -67,14 +66,8 @@ Retrieve detailed information about a specific Jira issue
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Timestamp |
|
||||
| `issueKey` | string | Issue key |
|
||||
| `summary` | string | Issue summary |
|
||||
| `description` | string | Issue description |
|
||||
| `created` | string | Creation date |
|
||||
| `updated` | string | Update date |
|
||||
| `success` | boolean | Operation success |
|
||||
| `url` | string | Issue URL |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Jira issue details with issue key, summary, description, created and updated timestamps |
|
||||
|
||||
### `jira_update`
|
||||
|
||||
@@ -84,7 +77,6 @@ Update a Jira issue
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Jira |
|
||||
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
|
||||
| `projectId` | string | No | Jira project ID to update issues in. If not provided, all issues will be retrieved. |
|
||||
| `issueKey` | string | Yes | Jira issue key to update |
|
||||
@@ -99,14 +91,8 @@ Update a Jira issue
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Timestamp |
|
||||
| `issueKey` | string | Issue key |
|
||||
| `summary` | string | Issue summary |
|
||||
| `description` | string | Issue description |
|
||||
| `created` | string | Creation date |
|
||||
| `updated` | string | Update date |
|
||||
| `success` | boolean | Operation success |
|
||||
| `url` | string | Issue URL |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Updated Jira issue details with timestamp, issue key, summary, and success status |
|
||||
|
||||
### `jira_write`
|
||||
|
||||
@@ -116,7 +102,6 @@ Write a Jira issue
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Jira |
|
||||
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
|
||||
| `projectId` | string | Yes | Project ID for the issue |
|
||||
| `summary` | string | Yes | Summary for the issue |
|
||||
@@ -130,14 +115,8 @@ Write a Jira issue
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Timestamp |
|
||||
| `issueKey` | string | Issue key |
|
||||
| `summary` | string | Issue summary |
|
||||
| `description` | string | Issue description |
|
||||
| `created` | string | Creation date |
|
||||
| `updated` | string | Update date |
|
||||
| `success` | boolean | Operation success |
|
||||
| `url` | string | Issue URL |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Created Jira issue details with timestamp, issue key, summary, success status, and URL |
|
||||
|
||||
### `jira_bulk_read`
|
||||
|
||||
@@ -147,7 +126,6 @@ Retrieve multiple Jira issues in bulk
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Jira |
|
||||
| `domain` | string | Yes | Your Jira domain \(e.g., yourcompany.atlassian.net\) |
|
||||
| `projectId` | string | Yes | Jira project ID |
|
||||
| `cloudId` | string | No | Jira cloud ID |
|
||||
@@ -156,14 +134,8 @@ Retrieve multiple Jira issues in bulk
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Timestamp |
|
||||
| `issueKey` | string | Issue key |
|
||||
| `summary` | string | Issue summary |
|
||||
| `description` | string | Issue description |
|
||||
| `created` | string | Creation date |
|
||||
| `updated` | string | Update date |
|
||||
| `success` | boolean | Operation success |
|
||||
| `url` | string | Issue URL |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | array | Array of Jira issues with summary, description, created and updated timestamps |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -72,9 +72,7 @@ Search for similar content in a knowledge base using vector similarity
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `query` | string | Query used |
|
||||
| `totalResults` | number | Total results count |
|
||||
| `results` | array | Array of search results from the knowledge base |
|
||||
|
||||
### `knowledge_upload_chunk`
|
||||
|
||||
@@ -92,9 +90,7 @@ Upload a new chunk to a document in a knowledge base
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `query` | string | Query used |
|
||||
| `totalResults` | number | Total results count |
|
||||
| `data` | object | Information about the uploaded chunk |
|
||||
|
||||
### `knowledge_create_document`
|
||||
|
||||
@@ -120,9 +116,7 @@ Create a new document in a knowledge base
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results |
|
||||
| `query` | string | Query used |
|
||||
| `totalResults` | number | Total results count |
|
||||
| `data` | object | Information about the created document |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,8 +63,7 @@ Fetch and filter issues from Linear
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `issues` | json | Issues list |
|
||||
| `issue` | json | Single issue data |
|
||||
| `issues` | array | Array of issues from the specified Linear team and project, each containing id, title, description, state, teamId, and projectId |
|
||||
|
||||
### `linear_create_issue`
|
||||
|
||||
@@ -83,8 +82,7 @@ Create a new issue in Linear
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `issues` | json | Issues list |
|
||||
| `issue` | json | Single issue data |
|
||||
| `issue` | object | The created issue containing id, title, description, state, teamId, and projectId |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -58,16 +58,16 @@ Search the web for information using Linkup
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `q` | string | Yes | The search query |
|
||||
| `depth` | string | Yes | Search depth \(has to either be |
|
||||
| `outputType` | string | Yes | Type of output to return \(has to either be |
|
||||
| `depth` | string | Yes | Search depth \(has to either be "standard" or "deep"\) |
|
||||
| `outputType` | string | Yes | Type of output to return \(has to either be "sourcedAnswer" or "searchResults"\) |
|
||||
| `apiKey` | string | Yes | Enter your Linkup API key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `answer` | string | Generated answer |
|
||||
| `sources` | json | Source references |
|
||||
| `answer` | string | The sourced answer to the search query |
|
||||
| `sources` | array | Array of sources used to compile the answer, each containing name, url, and snippet |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -66,9 +66,8 @@ Add memories to Mem0 for persistent storage and retrieval
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ids` | any | Memory identifiers |
|
||||
| `memories` | any | Memory data |
|
||||
| `searchResults` | any | Search results |
|
||||
| `ids` | array | Array of memory IDs that were created |
|
||||
| `memories` | array | Array of memory objects that were created |
|
||||
|
||||
### `mem0_search_memories`
|
||||
|
||||
@@ -87,9 +86,8 @@ Search for memories in Mem0 using semantic search
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ids` | any | Memory identifiers |
|
||||
| `memories` | any | Memory data |
|
||||
| `searchResults` | any | Search results |
|
||||
| `searchResults` | array | Array of search results with memory data, each containing id, data, and score |
|
||||
| `ids` | array | Array of memory IDs found in the search results |
|
||||
|
||||
### `mem0_get_memories`
|
||||
|
||||
@@ -110,9 +108,8 @@ Retrieve memories from Mem0 by ID or filter criteria
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ids` | any | Memory identifiers |
|
||||
| `memories` | any | Memory data |
|
||||
| `searchResults` | any | Search results |
|
||||
| `memories` | array | Array of retrieved memory objects |
|
||||
| `ids` | array | Array of memory IDs that were retrieved |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -57,8 +57,9 @@ Add a new memory to the database or append to existing memory with the same ID.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `memories` | any | Memory data |
|
||||
| `id` | string | Memory identifier |
|
||||
| `success` | boolean | Whether the memory was added successfully |
|
||||
| `memories` | array | Array of memory objects including the new or updated memory |
|
||||
| `error` | string | Error message if operation failed |
|
||||
|
||||
### `memory_get`
|
||||
|
||||
@@ -74,8 +75,10 @@ Retrieve a specific memory by its ID
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `memories` | any | Memory data |
|
||||
| `id` | string | Memory identifier |
|
||||
| `success` | boolean | Whether the memory was retrieved successfully |
|
||||
| `memories` | array | Array of memory data for the requested ID |
|
||||
| `message` | string | Success or error message |
|
||||
| `error` | string | Error message if operation failed |
|
||||
|
||||
### `memory_get_all`
|
||||
|
||||
@@ -90,8 +93,10 @@ Retrieve all memories from the database
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `memories` | any | Memory data |
|
||||
| `id` | string | Memory identifier |
|
||||
| `success` | boolean | Whether all memories were retrieved successfully |
|
||||
| `memories` | array | Array of all memory objects with keys, types, and data |
|
||||
| `message` | string | Success or error message |
|
||||
| `error` | string | Error message if operation failed |
|
||||
|
||||
### `memory_delete`
|
||||
|
||||
@@ -107,8 +112,9 @@ Delete a specific memory by its ID
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `memories` | any | Memory data |
|
||||
| `id` | string | Memory identifier |
|
||||
| `success` | boolean | Whether the memory was deleted successfully |
|
||||
| `message` | string | Success or error message |
|
||||
| `error` | string | Error message if operation failed |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,6 @@ Read data from a Microsoft Excel spreadsheet
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Excel API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to read from |
|
||||
| `range` | string | No | The range of cells to read from |
|
||||
|
||||
@@ -116,14 +115,8 @@ Read data from a Microsoft Excel spreadsheet
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `index` | number | Row index |
|
||||
| `values` | json | Table values |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Excel spreadsheet data and metadata |
|
||||
|
||||
### `microsoft_excel_write`
|
||||
|
||||
@@ -133,7 +126,6 @@ Write data to a Microsoft Excel spreadsheet
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Excel API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet to write to |
|
||||
| `range` | string | No | The range of cells to write to |
|
||||
| `values` | array | Yes | The data to write to the spreadsheet |
|
||||
@@ -144,14 +136,8 @@ Write data to a Microsoft Excel spreadsheet
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `index` | number | Row index |
|
||||
| `values` | json | Table values |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Write operation results and metadata |
|
||||
|
||||
### `microsoft_excel_table_add`
|
||||
|
||||
@@ -161,7 +147,6 @@ Add new rows to a Microsoft Excel table
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Excel API |
|
||||
| `spreadsheetId` | string | Yes | The ID of the spreadsheet containing the table |
|
||||
| `tableName` | string | Yes | The name of the table to add rows to |
|
||||
| `values` | array | Yes | The data to add to the table \(array of arrays or array of objects\) |
|
||||
@@ -170,14 +155,8 @@ Add new rows to a Microsoft Excel table
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Sheet data |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `updatedRange` | string | Updated range |
|
||||
| `updatedRows` | number | Updated rows count |
|
||||
| `updatedColumns` | number | Updated columns count |
|
||||
| `updatedCells` | number | Updated cells count |
|
||||
| `index` | number | Row index |
|
||||
| `values` | json | Table values |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Table add operation results and metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,6 @@ Read tasks from Microsoft Planner - get all user tasks or all tasks from a speci
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Planner API |
|
||||
| `planId` | string | No | The ID of the plan to get tasks from \(if not provided, gets all user tasks\) |
|
||||
| `taskId` | string | No | The ID of the task to get |
|
||||
|
||||
@@ -144,8 +143,9 @@ Read tasks from Microsoft Planner - get all user tasks or all tasks from a speci
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `task` | json | The Microsoft Planner task object, including details such as id, title, description, status, due date, and assignees. |
|
||||
| `metadata` | json | Additional metadata about the operation, such as timestamps, request status, or other relevant information. |
|
||||
| `success` | boolean | Whether tasks were retrieved successfully |
|
||||
| `tasks` | array | Array of task objects with filtered properties |
|
||||
| `metadata` | object | Metadata including planId, userId, and planUrl |
|
||||
|
||||
### `microsoft_planner_create_task`
|
||||
|
||||
@@ -155,7 +155,6 @@ Create a new task in Microsoft Planner
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Planner API |
|
||||
| `planId` | string | Yes | The ID of the plan where the task will be created |
|
||||
| `title` | string | Yes | The title of the task |
|
||||
| `description` | string | No | The description of the task |
|
||||
@@ -167,8 +166,9 @@ Create a new task in Microsoft Planner
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `task` | json | The Microsoft Planner task object, including details such as id, title, description, status, due date, and assignees. |
|
||||
| `metadata` | json | Additional metadata about the operation, such as timestamps, request status, or other relevant information. |
|
||||
| `success` | boolean | Whether the task was created successfully |
|
||||
| `task` | object | The created task object with all properties |
|
||||
| `metadata` | object | Metadata including planId, taskId, and taskUrl |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -112,16 +112,19 @@ Read content from a Microsoft Teams chat
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `chatId` | string | Yes | The ID of the chat to read from |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Message content |
|
||||
| `metadata` | json | Message metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `success` | boolean | Teams chat read operation success status |
|
||||
| `messageCount` | number | Number of messages retrieved from chat |
|
||||
| `chatId` | string | ID of the chat that was read from |
|
||||
| `messages` | array | Array of chat message objects |
|
||||
| `attachmentCount` | number | Total number of attachments found |
|
||||
| `attachmentTypes` | array | Types of attachments found |
|
||||
| `content` | string | Formatted content of chat messages |
|
||||
|
||||
### `microsoft_teams_write_chat`
|
||||
|
||||
@@ -131,7 +134,6 @@ Write or update content in a Microsoft Teams chat
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `chatId` | string | Yes | The ID of the chat to write to |
|
||||
| `content` | string | Yes | The content to write to the message |
|
||||
|
||||
@@ -139,9 +141,12 @@ Write or update content in a Microsoft Teams chat
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Message content |
|
||||
| `metadata` | json | Message metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `success` | boolean | Teams chat message send success status |
|
||||
| `messageId` | string | Unique identifier for the sent message |
|
||||
| `chatId` | string | ID of the chat where message was sent |
|
||||
| `createdTime` | string | Timestamp when message was created |
|
||||
| `url` | string | Web URL to the message |
|
||||
| `updatedContent` | boolean | Whether content was successfully updated |
|
||||
|
||||
### `microsoft_teams_read_channel`
|
||||
|
||||
@@ -151,7 +156,6 @@ Read content from a Microsoft Teams channel
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `teamId` | string | Yes | The ID of the team to read from |
|
||||
| `channelId` | string | Yes | The ID of the channel to read from |
|
||||
|
||||
@@ -159,9 +163,14 @@ Read content from a Microsoft Teams channel
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Message content |
|
||||
| `metadata` | json | Message metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `success` | boolean | Teams channel read operation success status |
|
||||
| `messageCount` | number | Number of messages retrieved from channel |
|
||||
| `teamId` | string | ID of the team that was read from |
|
||||
| `channelId` | string | ID of the channel that was read from |
|
||||
| `messages` | array | Array of channel message objects |
|
||||
| `attachmentCount` | number | Total number of attachments found |
|
||||
| `attachmentTypes` | array | Types of attachments found |
|
||||
| `content` | string | Formatted content of channel messages |
|
||||
|
||||
### `microsoft_teams_write_channel`
|
||||
|
||||
@@ -171,7 +180,6 @@ Write or send a message to a Microsoft Teams channel
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Microsoft Teams API |
|
||||
| `teamId` | string | Yes | The ID of the team to write to |
|
||||
| `channelId` | string | Yes | The ID of the channel to write to |
|
||||
| `content` | string | Yes | The content to write to the channel |
|
||||
@@ -180,9 +188,13 @@ Write or send a message to a Microsoft Teams channel
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Message content |
|
||||
| `metadata` | json | Message metadata |
|
||||
| `updatedContent` | boolean | Content update status |
|
||||
| `success` | boolean | Teams channel message send success status |
|
||||
| `messageId` | string | Unique identifier for the sent message |
|
||||
| `teamId` | string | ID of the team where message was sent |
|
||||
| `channelId` | string | ID of the channel where message was sent |
|
||||
| `createdTime` | string | Timestamp when message was created |
|
||||
| `url` | string | Web URL to the message |
|
||||
| `updatedContent` | boolean | Whether content was successfully updated |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -106,8 +106,9 @@ Parse PDF documents using Mistral OCR API
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Extracted content |
|
||||
| `metadata` | json | Processing metadata |
|
||||
| `success` | boolean | Whether the PDF was parsed successfully |
|
||||
| `content` | string | Extracted content in the requested format \(markdown, text, or JSON\) |
|
||||
| `metadata` | object | Processing metadata including jobId, fileType, pageCount, and usage info |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -59,15 +59,14 @@ Read content from a Notion page
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `pageId` | string | Yes | The ID of the Notion page to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Page content in markdown format with headers, paragraphs, lists, and todos |
|
||||
| `metadata` | object | Page metadata including title, URL, and timestamps |
|
||||
|
||||
### `notion_read_database`
|
||||
|
||||
@@ -77,15 +76,14 @@ Read database information and structure from Notion
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `databaseId` | string | Yes | The ID of the Notion database to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Database information including title, properties schema, and metadata |
|
||||
| `metadata` | object | Database metadata including title, ID, URL, timestamps, and properties schema |
|
||||
|
||||
### `notion_write`
|
||||
|
||||
@@ -95,7 +93,6 @@ Append content to a Notion page
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `pageId` | string | Yes | The ID of the Notion page to append content to |
|
||||
| `content` | string | Yes | The content to append to the page |
|
||||
|
||||
@@ -103,8 +100,7 @@ Append content to a Notion page
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Success message confirming content was appended to page |
|
||||
|
||||
### `notion_create_page`
|
||||
|
||||
@@ -114,7 +110,6 @@ Create a new page in Notion
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `parentId` | string | Yes | ID of the parent page |
|
||||
| `title` | string | No | Title of the new page |
|
||||
| `content` | string | No | Optional content to add to the page upon creation |
|
||||
@@ -123,8 +118,8 @@ Create a new page in Notion
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Success message confirming page creation |
|
||||
| `metadata` | object | Page metadata including title, page ID, URL, and timestamps |
|
||||
|
||||
### `notion_query_database`
|
||||
|
||||
@@ -134,7 +129,6 @@ Query and filter Notion database entries with advanced filtering
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `databaseId` | string | Yes | The ID of the database to query |
|
||||
| `filter` | string | No | Filter conditions as JSON \(optional\) |
|
||||
| `sorts` | string | No | Sort criteria as JSON array \(optional\) |
|
||||
@@ -144,8 +138,8 @@ Query and filter Notion database entries with advanced filtering
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Formatted list of database entries with their properties |
|
||||
| `metadata` | object | Query metadata including total results count, pagination info, and raw results array |
|
||||
|
||||
### `notion_search`
|
||||
|
||||
@@ -155,7 +149,6 @@ Search across all pages and databases in Notion workspace
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `query` | string | No | Search terms \(leave empty to get all pages\) |
|
||||
| `filterType` | string | No | Filter by object type: page, database, or leave empty for all |
|
||||
| `pageSize` | number | No | Number of results to return \(default: 100, max: 100\) |
|
||||
@@ -164,8 +157,8 @@ Search across all pages and databases in Notion workspace
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Formatted list of search results including pages and databases |
|
||||
| `metadata` | object | Search metadata including total results count, pagination info, and raw results array |
|
||||
|
||||
### `notion_create_database`
|
||||
|
||||
@@ -175,17 +168,16 @@ Create a new database in Notion with custom properties
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Notion OAuth access token |
|
||||
| `parentId` | string | Yes | ID of the parent page where the database will be created |
|
||||
| `title` | string | Yes | Title for the new database |
|
||||
| `properties` | string | No | Database properties as JSON object \(optional, will create a default |
|
||||
| `properties` | string | No | Database properties as JSON object \(optional, will create a default "Name" property if empty\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Page content |
|
||||
| `metadata` | any | Page metadata |
|
||||
| `content` | string | Success message with database details and properties list |
|
||||
| `metadata` | object | Database metadata including ID, title, URL, creation time, and properties schema |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ Upload a file to OneDrive
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the OneDrive API |
|
||||
| `fileName` | string | Yes | The name of the file to upload |
|
||||
| `content` | string | Yes | The content of the file to upload |
|
||||
| `folderSelector` | string | No | Select the folder to upload the file to |
|
||||
@@ -75,8 +74,8 @@ Upload a file to OneDrive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `file` | json | The OneDrive file object, including details such as id, name, size, and more. |
|
||||
| `files` | json | An array of OneDrive file objects, each containing details such as id, name, size, and more. |
|
||||
| `success` | boolean | Whether the file was uploaded successfully |
|
||||
| `file` | object | The uploaded file object with metadata including id, name, webViewLink, webContentLink, and timestamps |
|
||||
|
||||
### `onedrive_create_folder`
|
||||
|
||||
@@ -86,7 +85,6 @@ Create a new folder in OneDrive
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the OneDrive API |
|
||||
| `folderName` | string | Yes | Name of the folder to create |
|
||||
| `folderSelector` | string | No | Select the parent folder to create the folder in |
|
||||
| `folderId` | string | No | ID of the parent folder \(internal use\) |
|
||||
@@ -95,8 +93,8 @@ Create a new folder in OneDrive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `file` | json | The OneDrive file object, including details such as id, name, size, and more. |
|
||||
| `files` | json | An array of OneDrive file objects, each containing details such as id, name, size, and more. |
|
||||
| `success` | boolean | Whether the folder was created successfully |
|
||||
| `file` | object | The created folder object with metadata including id, name, webViewLink, and timestamps |
|
||||
|
||||
### `onedrive_list`
|
||||
|
||||
@@ -106,7 +104,6 @@ List files and folders in OneDrive
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the OneDrive API |
|
||||
| `folderSelector` | string | No | Select the folder to list files from |
|
||||
| `folderId` | string | No | The ID of the folder to list files from \(internal use\) |
|
||||
| `query` | string | No | A query to filter the files |
|
||||
@@ -116,8 +113,9 @@ List files and folders in OneDrive
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `file` | json | The OneDrive file object, including details such as id, name, size, and more. |
|
||||
| `files` | json | An array of OneDrive file objects, each containing details such as id, name, size, and more. |
|
||||
| `success` | boolean | Whether files were listed successfully |
|
||||
| `files` | array | Array of file and folder objects with metadata |
|
||||
| `nextPageToken` | string | Token for retrieving the next page of results \(optional\) |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -66,9 +66,8 @@ Generate embeddings from text using OpenAI
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `embeddings` | json | Generated embeddings |
|
||||
| `model` | string | Model used |
|
||||
| `usage` | json | Token usage |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Embeddings generation results |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -154,7 +154,6 @@ Send emails using Outlook
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Outlook API |
|
||||
| `to` | string | Yes | Recipient email address |
|
||||
| `subject` | string | Yes | Email subject |
|
||||
| `body` | string | Yes | Email body content |
|
||||
@@ -167,8 +166,10 @@ Send emails using Outlook
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Response message |
|
||||
| `results` | json | Email results |
|
||||
| `success` | boolean | Email send success status |
|
||||
| `status` | string | Delivery status of the email |
|
||||
| `timestamp` | string | Timestamp when email was sent |
|
||||
| `message` | string | Success or error message |
|
||||
|
||||
### `outlook_draft`
|
||||
|
||||
@@ -178,7 +179,6 @@ Draft emails using Outlook
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Outlook API |
|
||||
| `to` | string | Yes | Recipient email address |
|
||||
| `subject` | string | Yes | Email subject |
|
||||
| `body` | string | Yes | Email body content |
|
||||
@@ -187,8 +187,12 @@ Draft emails using Outlook
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Response message |
|
||||
| `results` | json | Email results |
|
||||
| `success` | boolean | Email draft creation success status |
|
||||
| `messageId` | string | Unique identifier for the drafted email |
|
||||
| `status` | string | Draft status of the email |
|
||||
| `subject` | string | Subject of the drafted email |
|
||||
| `timestamp` | string | Timestamp when draft was created |
|
||||
| `message` | string | Success or error message |
|
||||
|
||||
### `outlook_read`
|
||||
|
||||
@@ -198,7 +202,6 @@ Read emails from Outlook
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | OAuth access token for Outlook |
|
||||
| `folder` | string | No | Folder ID to read emails from \(default: Inbox\) |
|
||||
| `maxResults` | number | No | Maximum number of emails to retrieve \(default: 1, max: 10\) |
|
||||
|
||||
@@ -206,8 +209,10 @@ Read emails from Outlook
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Response message |
|
||||
| `results` | json | Email results |
|
||||
| `success` | boolean | Email read operation success status |
|
||||
| `messageCount` | number | Number of emails retrieved |
|
||||
| `messages` | array | Array of email message objects |
|
||||
| `message` | string | Success or status message |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -62,9 +62,8 @@ Generate completions using Perplexity AI chat models
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Generated response |
|
||||
| `model` | string | Model used |
|
||||
| `usage` | json | Token usage |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Chat completion results |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -67,12 +67,10 @@ Generate embeddings from text using Pinecone
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `model` | any | Model information |
|
||||
| `vector_type` | any | Vector type |
|
||||
| `usage` | any | Usage statistics |
|
||||
| `data` | array | Generated embeddings data with values and vector type |
|
||||
| `model` | string | Model used for generating embeddings |
|
||||
| `vector_type` | string | Type of vector generated \(dense/sparse\) |
|
||||
| `usage` | object | Usage statistics for embeddings generation |
|
||||
|
||||
### `pinecone_upsert_text`
|
||||
|
||||
@@ -91,12 +89,8 @@ Insert or update text records in a Pinecone index
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `model` | any | Model information |
|
||||
| `vector_type` | any | Vector type |
|
||||
| `usage` | any | Usage statistics |
|
||||
| `statusText` | string | Status of the upsert operation |
|
||||
| `upsertedCount` | number | Number of records successfully upserted |
|
||||
|
||||
### `pinecone_search_text`
|
||||
|
||||
@@ -119,12 +113,7 @@ Search for similar text in a Pinecone index
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `model` | any | Model information |
|
||||
| `vector_type` | any | Vector type |
|
||||
| `usage` | any | Usage statistics |
|
||||
| `matches` | array | Search results with ID, score, and metadata |
|
||||
|
||||
### `pinecone_search_vector`
|
||||
|
||||
@@ -147,12 +136,8 @@ Search for similar vectors in a Pinecone index
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `model` | any | Model information |
|
||||
| `vector_type` | any | Vector type |
|
||||
| `usage` | any | Usage statistics |
|
||||
| `matches` | array | Vector search results with ID, score, values, and metadata |
|
||||
| `namespace` | string | Namespace where the search was performed |
|
||||
|
||||
### `pinecone_fetch`
|
||||
|
||||
@@ -171,12 +156,7 @@ Fetch vectors by ID from a Pinecone index
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `model` | any | Model information |
|
||||
| `vector_type` | any | Vector type |
|
||||
| `usage` | any | Usage statistics |
|
||||
| `matches` | array | Fetched vectors with ID, values, metadata, and score |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -126,10 +126,8 @@ Insert or update points in a Qdrant collection
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `status` | any | Operation status |
|
||||
| `status` | string | Status of the upsert operation |
|
||||
| `data` | object | Result data from the upsert operation |
|
||||
|
||||
### `qdrant_search_vector`
|
||||
|
||||
@@ -152,10 +150,8 @@ Search for similar vectors in a Qdrant collection
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `status` | any | Operation status |
|
||||
| `data` | array | Vector search results with ID, score, payload, and optional vector data |
|
||||
| `status` | string | Status of the search operation |
|
||||
|
||||
### `qdrant_fetch_points`
|
||||
|
||||
@@ -176,10 +172,8 @@ Fetch points by ID from a Qdrant collection
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `matches` | any | Search matches |
|
||||
| `upsertedCount` | any | Upserted count |
|
||||
| `data` | any | Response data |
|
||||
| `status` | any | Operation status |
|
||||
| `data` | array | Fetched points with ID, payload, and optional vector data |
|
||||
| `status` | string | Status of the fetch operation |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -53,20 +53,17 @@ Fetch posts from a subreddit with different sorting options
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Reddit API |
|
||||
| `subreddit` | string | Yes | The name of the subreddit to fetch posts from \(without the r/ prefix\) |
|
||||
| `sort` | string | No | Sort method for posts: |
|
||||
| `sort` | string | No | Sort method for posts: "hot", "new", "top", or "rising" \(default: "hot"\) |
|
||||
| `limit` | number | No | Maximum number of posts to return \(default: 10, max: 100\) |
|
||||
| `time` | string | No | Time filter for |
|
||||
| `time` | string | No | Time filter for "top" sorted posts: "day", "week", "month", "year", or "all" \(default: "day"\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `subreddit` | string | Subreddit name |
|
||||
| `posts` | json | Posts data |
|
||||
| `post` | json | Single post data |
|
||||
| `comments` | json | Comments data |
|
||||
| `subreddit` | string | Name of the subreddit where posts were fetched from |
|
||||
| `posts` | array | Array of posts with title, author, URL, score, comments count, and metadata |
|
||||
|
||||
### `reddit_get_comments`
|
||||
|
||||
@@ -76,20 +73,16 @@ Fetch comments from a specific Reddit post
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | Access token for Reddit API |
|
||||
| `postId` | string | Yes | The ID of the Reddit post to fetch comments from |
|
||||
| `subreddit` | string | Yes | The subreddit where the post is located \(without the r/ prefix\) |
|
||||
| `sort` | string | No | Sort method for comments: |
|
||||
| `sort` | string | No | Sort method for comments: "confidence", "top", "new", "controversial", "old", "random", "qa" \(default: "confidence"\) |
|
||||
| `limit` | number | No | Maximum number of comments to return \(default: 50, max: 100\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `subreddit` | string | Subreddit name |
|
||||
| `posts` | json | Posts data |
|
||||
| `post` | json | Single post data |
|
||||
| `comments` | json | Comments data |
|
||||
| `post` | object | Post information including ID, title, author, content, and metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ Retrieve an object from an AWS S3 bucket
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `url` | string | Presigned URL |
|
||||
| `metadata` | json | Object metadata |
|
||||
| `url` | string | Pre-signed URL for downloading the S3 object |
|
||||
| `metadata` | object | File metadata including type, size, name, and last modified date |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ A powerful web search tool that provides access to Google search results through
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `searchResults` | json | Search results data |
|
||||
| `searchResults` | array | Search results with titles, links, snippets, and type-specific metadata \(date for news, rating for places, imageUrl for images\) |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@ Create a new page in a SharePoint site
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the SharePoint API |
|
||||
| `siteId` | string | No | The ID of the SharePoint site \(internal use\) |
|
||||
| `siteSelector` | string | No | Select the SharePoint site |
|
||||
| `pageName` | string | Yes | The name of the page to create |
|
||||
@@ -86,7 +85,7 @@ Create a new page in a SharePoint site
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `sites` | json | An array of SharePoint site objects, each containing details such as id, name, and more. |
|
||||
| `page` | object | Created SharePoint page information |
|
||||
|
||||
### `sharepoint_read_page`
|
||||
|
||||
@@ -96,7 +95,6 @@ Read a specific page from a SharePoint site
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the SharePoint API |
|
||||
| `siteSelector` | string | No | Select the SharePoint site |
|
||||
| `siteId` | string | No | The ID of the SharePoint site \(internal use\) |
|
||||
| `pageId` | string | No | The ID of the page to read |
|
||||
@@ -107,7 +105,7 @@ Read a specific page from a SharePoint site
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `sites` | json | An array of SharePoint site objects, each containing details such as id, name, and more. |
|
||||
| `page` | object | Information about the SharePoint page |
|
||||
|
||||
### `sharepoint_list_sites`
|
||||
|
||||
@@ -117,7 +115,6 @@ List details of all SharePoint sites
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the SharePoint API |
|
||||
| `siteSelector` | string | No | Select the SharePoint site |
|
||||
| `groupId` | string | No | The group ID for accessing a group team site |
|
||||
|
||||
@@ -125,7 +122,7 @@ List details of all SharePoint sites
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `sites` | json | An array of SharePoint site objects, each containing details such as id, name, and more. |
|
||||
| `site` | object | Information about the current SharePoint site |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Slack
|
||||
description: Send messages to Slack
|
||||
description: Send messages to Slack or trigger workflows from Slack events
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -64,7 +64,7 @@ This allows for powerful automation scenarios such as sending notifications, ale
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Comprehensive Slack integration with OAuth authentication. Send formatted messages using Slack's mrkdwn syntax.
|
||||
Comprehensive Slack integration with OAuth authentication. Send formatted messages using Slack's mrkdwn syntax or trigger workflows from Slack events like mentions and messages.
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,6 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `authMethod` | string | No | Authentication method: oauth or bot_token |
|
||||
| `botToken` | string | No | Bot token for Custom Bot |
|
||||
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
|
||||
| `channel` | string | Yes | Target Slack channel \(e.g., #general\) |
|
||||
| `text` | string | Yes | Message text to send \(supports Slack mrkdwn formatting\) |
|
||||
|
||||
@@ -89,10 +88,7 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Message timestamp |
|
||||
| `channel` | string | Channel identifier |
|
||||
| `canvas_id` | string | Canvas identifier |
|
||||
| `title` | string | Canvas title |
|
||||
| `messages` | json | Message data |
|
||||
| `channel` | string | Channel ID where message was sent |
|
||||
|
||||
### `slack_canvas`
|
||||
|
||||
@@ -104,7 +100,6 @@ Create and share Slack canvases in channels. Canvases are collaborative document
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `authMethod` | string | No | Authentication method: oauth or bot_token |
|
||||
| `botToken` | string | No | Bot token for Custom Bot |
|
||||
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
|
||||
| `channel` | string | Yes | Target Slack channel \(e.g., #general\) |
|
||||
| `title` | string | Yes | Title of the canvas |
|
||||
| `content` | string | Yes | Canvas content in markdown format |
|
||||
@@ -114,11 +109,9 @@ Create and share Slack canvases in channels. Canvases are collaborative document
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Message timestamp |
|
||||
| `channel` | string | Channel identifier |
|
||||
| `canvas_id` | string | Canvas identifier |
|
||||
| `title` | string | Canvas title |
|
||||
| `messages` | json | Message data |
|
||||
| `canvas_id` | string | ID of the created canvas |
|
||||
| `channel` | string | Channel where canvas was created |
|
||||
| `title` | string | Title of the canvas |
|
||||
|
||||
### `slack_message_reader`
|
||||
|
||||
@@ -130,7 +123,6 @@ Read the latest messages from Slack channels. Retrieve conversation history with
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `authMethod` | string | No | Authentication method: oauth or bot_token |
|
||||
| `botToken` | string | No | Bot token for Custom Bot |
|
||||
| `accessToken` | string | No | OAuth access token or bot token for Slack API |
|
||||
| `channel` | string | Yes | Slack channel to read messages from \(e.g., #general\) |
|
||||
| `limit` | number | No | Number of messages to retrieve \(default: 10, max: 100\) |
|
||||
| `oldest` | string | No | Start of time range \(timestamp\) |
|
||||
@@ -140,11 +132,7 @@ Read the latest messages from Slack channels. Retrieve conversation history with
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ts` | string | Message timestamp |
|
||||
| `channel` | string | Channel identifier |
|
||||
| `canvas_id` | string | Canvas identifier |
|
||||
| `title` | string | Canvas title |
|
||||
| `messages` | json | Message data |
|
||||
| `messages` | array | Array of message objects from the channel |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ Extract structured data from a webpage using Stagehand
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `data` | json | Extracted data |
|
||||
| `data` | object | Extracted structured data matching the provided schema |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -212,6 +212,7 @@ Run an autonomous web agent to complete tasks and extract structured data
|
||||
| `startUrl` | string | Yes | URL of the webpage to start the agent on |
|
||||
| `task` | string | Yes | The task to complete or goal to achieve on the website |
|
||||
| `variables` | json | No | Optional variables to substitute in the task \(format: \{key: value\}\). Reference in task using %key% |
|
||||
| `format` | string | No | No description |
|
||||
| `apiKey` | string | Yes | OpenAI API key for agent execution \(required by Stagehand\) |
|
||||
| `outputSchema` | json | No | Optional JSON schema defining the structure of data the agent should return |
|
||||
|
||||
@@ -219,8 +220,7 @@ Run an autonomous web agent to complete tasks and extract structured data
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `agentResult` | json | Agent execution result |
|
||||
| `structuredOutput` | any | Structured output data |
|
||||
| `agentResult` | object | Result from the Stagehand agent execution |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ Query data from a Supabase table
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to query |
|
||||
| `filter` | string | No | PostgREST filter \(e.g., |
|
||||
| `filter` | string | No | PostgREST filter \(e.g., "id=eq.123"\) |
|
||||
| `orderBy` | string | No | Column to order by \(add DESC for descending\) |
|
||||
| `limit` | number | No | Maximum number of rows to return |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
@@ -101,8 +101,8 @@ Query data from a Supabase table
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation message |
|
||||
| `results` | json | Query results |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Query operation results |
|
||||
|
||||
### `supabase_insert`
|
||||
|
||||
@@ -121,8 +121,8 @@ Insert data into a Supabase table
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation message |
|
||||
| `results` | json | Query results |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Insert operation results |
|
||||
|
||||
### `supabase_get_row`
|
||||
|
||||
@@ -134,15 +134,15 @@ Get a single row from a Supabase table based on filter criteria
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to query |
|
||||
| `filter` | string | Yes | PostgREST filter to find the specific row \(e.g., |
|
||||
| `filter` | string | Yes | PostgREST filter to find the specific row \(e.g., "id=eq.123"\) |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation message |
|
||||
| `results` | json | Query results |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Get row operation results |
|
||||
|
||||
### `supabase_update`
|
||||
|
||||
@@ -154,7 +154,7 @@ Update rows in a Supabase table based on filter criteria
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to update |
|
||||
| `filter` | string | Yes | PostgREST filter to identify rows to update \(e.g., |
|
||||
| `filter` | string | Yes | PostgREST filter to identify rows to update \(e.g., "id=eq.123"\) |
|
||||
| `data` | object | Yes | Data to update in the matching rows |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
@@ -162,8 +162,8 @@ Update rows in a Supabase table based on filter criteria
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation message |
|
||||
| `results` | json | Query results |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Update operation results |
|
||||
|
||||
### `supabase_delete`
|
||||
|
||||
@@ -175,15 +175,15 @@ Delete rows from a Supabase table based on filter criteria
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Yes | Your Supabase project ID \(e.g., jdrkgepadsdopsntdlom\) |
|
||||
| `table` | string | Yes | The name of the Supabase table to delete from |
|
||||
| `filter` | string | Yes | PostgREST filter to identify rows to delete \(e.g., |
|
||||
| `filter` | string | Yes | PostgREST filter to identify rows to delete \(e.g., "id=eq.123"\) |
|
||||
| `apiKey` | string | Yes | Your Supabase service role secret key |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Operation message |
|
||||
| `results` | json | Query results |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Delete operation results |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,12 +80,8 @@ Perform AI-powered web searches using Tavily
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results data |
|
||||
| `answer` | any | Search answer |
|
||||
| `query` | string | Query used |
|
||||
| `content` | string | Extracted content |
|
||||
| `title` | string | Page title |
|
||||
| `url` | string | Source URL |
|
||||
| `query` | string | The search query that was executed |
|
||||
| `results` | array | results output from the tool |
|
||||
|
||||
### `tavily_extract`
|
||||
|
||||
@@ -103,12 +99,7 @@ Extract raw content from multiple web pages simultaneously using Tavily
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `results` | json | Search results data |
|
||||
| `answer` | any | Search answer |
|
||||
| `query` | string | Query used |
|
||||
| `content` | string | Extracted content |
|
||||
| `title` | string | Page title |
|
||||
| `url` | string | Source URL |
|
||||
| `results` | array | The URL that was extracted |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Telegram
|
||||
description: Send a message through Telegram
|
||||
description: Send messages through Telegram or trigger workflows from Telegram events
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
@@ -67,7 +67,7 @@ In Sim, the Telegram integration enables your agents to leverage these powerful
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Send messages to any Telegram channel using your Bot API key. Integrate automated notifications and alerts into your workflow to keep your team informed.
|
||||
Send messages to any Telegram channel using your Bot API key or trigger workflows from Telegram bot messages. Integrate automated notifications and alerts into your workflow to keep your team informed.
|
||||
|
||||
|
||||
|
||||
@@ -89,8 +89,12 @@ Send messages to Telegram channels or users through the Telegram Bot API. Enable
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `ok` | boolean | Success status |
|
||||
| `result` | json | Message result |
|
||||
| `success` | boolean | Telegram message send success status |
|
||||
| `messageId` | number | Unique Telegram message identifier |
|
||||
| `chatId` | string | Target chat ID where message was sent |
|
||||
| `text` | string | Text content of the sent message |
|
||||
| `timestamp` | number | Unix timestamp when message was sent |
|
||||
| `from` | object | Information about the bot that sent the message |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ Processes a provided thought/instruction, making it available for subsequent ste
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `acknowledgedThought` | string | Acknowledged thought process |
|
||||
| `acknowledgedThought` | string | The thought that was processed and acknowledged |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ Convert text between languages while preserving meaning, nuance, and formatting.
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Translated text |
|
||||
| `model` | string | Model used |
|
||||
| `tokens` | any | Token usage |
|
||||
| `tokens` | json | Token usage |
|
||||
|
||||
### `anthropic_chat`
|
||||
|
||||
@@ -85,7 +85,7 @@ Convert text between languages while preserving meaning, nuance, and formatting.
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Translated text |
|
||||
| `model` | string | Model used |
|
||||
| `tokens` | any | Token usage |
|
||||
| `tokens` | json | Token usage |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -58,10 +58,11 @@ Send text messages to single or multiple recipients using the Twilio API.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Send success status |
|
||||
| `messageId` | any | Message identifier |
|
||||
| `status` | any | Delivery status |
|
||||
| `error` | any | Error information |
|
||||
| `success` | boolean | SMS send success status |
|
||||
| `messageId` | string | Unique Twilio message identifier \(SID\) |
|
||||
| `status` | string | Message delivery status from Twilio |
|
||||
| `fromNumber` | string | Phone number message was sent from |
|
||||
| `toNumber` | string | Phone number message was sent to |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,9 +95,9 @@ Download files uploaded in Typeform responses
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `total_items` | number | Total response count |
|
||||
| `page_count` | number | Total page count |
|
||||
| `items` | json | Response items |
|
||||
| `fileUrl` | string | Direct download URL for the uploaded file |
|
||||
| `contentType` | string | MIME type of the uploaded file |
|
||||
| `filename` | string | Original filename of the uploaded file |
|
||||
|
||||
### `typeform_insights`
|
||||
|
||||
@@ -114,9 +114,7 @@ Retrieve insights and analytics for Typeform forms
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `total_items` | number | Total response count |
|
||||
| `page_count` | number | Total page count |
|
||||
| `items` | json | Response items |
|
||||
| `fields` | array | Number of users who dropped off at this field |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -70,9 +70,10 @@ Process and analyze images using advanced vision models. Capable of understandin
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `content` | string | Analysis result |
|
||||
| `model` | any | Model used |
|
||||
| `tokens` | any | Token usage |
|
||||
| `content` | string | The analyzed content and description of the image |
|
||||
| `model` | string | The vision model that was used for analysis |
|
||||
| `tokens` | number | Total tokens used for the analysis |
|
||||
| `usage` | object | Detailed token usage breakdown |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -56,21 +56,14 @@ Read content from a Wealthbox note
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Wealthbox API |
|
||||
| `noteId` | string | No | The ID of the note to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `note` | any | Note data |
|
||||
| `notes` | any | Notes list |
|
||||
| `contact` | any | Contact data |
|
||||
| `contacts` | any | Contacts list |
|
||||
| `task` | any | Task data |
|
||||
| `tasks` | any | Tasks list |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `success` | any | Success status |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Note data and metadata |
|
||||
|
||||
### `wealthbox_write_note`
|
||||
|
||||
@@ -80,7 +73,6 @@ Create or update a Wealthbox note
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Wealthbox API |
|
||||
| `content` | string | Yes | The main body of the note |
|
||||
| `contactId` | string | No | ID of contact to link to this note |
|
||||
|
||||
@@ -88,14 +80,8 @@ Create or update a Wealthbox note
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `note` | any | Note data |
|
||||
| `notes` | any | Notes list |
|
||||
| `contact` | any | Contact data |
|
||||
| `contacts` | any | Contacts list |
|
||||
| `task` | any | Task data |
|
||||
| `tasks` | any | Tasks list |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `success` | any | Success status |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Created or updated note data and metadata |
|
||||
|
||||
### `wealthbox_read_contact`
|
||||
|
||||
@@ -105,21 +91,14 @@ Read content from a Wealthbox contact
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Wealthbox API |
|
||||
| `contactId` | string | No | The ID of the contact to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `note` | any | Note data |
|
||||
| `notes` | any | Notes list |
|
||||
| `contact` | any | Contact data |
|
||||
| `contacts` | any | Contacts list |
|
||||
| `task` | any | Task data |
|
||||
| `tasks` | any | Tasks list |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `success` | any | Success status |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Contact data and metadata |
|
||||
|
||||
### `wealthbox_write_contact`
|
||||
|
||||
@@ -129,7 +108,6 @@ Create a new Wealthbox contact
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Wealthbox API |
|
||||
| `firstName` | string | Yes | The first name of the contact |
|
||||
| `lastName` | string | Yes | The last name of the contact |
|
||||
| `emailAddress` | string | No | The email address of the contact |
|
||||
@@ -139,14 +117,8 @@ Create a new Wealthbox contact
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `note` | any | Note data |
|
||||
| `notes` | any | Notes list |
|
||||
| `contact` | any | Contact data |
|
||||
| `contacts` | any | Contacts list |
|
||||
| `task` | any | Task data |
|
||||
| `tasks` | any | Tasks list |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `success` | any | Success status |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Created or updated contact data and metadata |
|
||||
|
||||
### `wealthbox_read_task`
|
||||
|
||||
@@ -156,21 +128,14 @@ Read content from a Wealthbox task
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Wealthbox API |
|
||||
| `taskId` | string | No | The ID of the task to read |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `note` | any | Note data |
|
||||
| `notes` | any | Notes list |
|
||||
| `contact` | any | Contact data |
|
||||
| `contacts` | any | Contacts list |
|
||||
| `task` | any | Task data |
|
||||
| `tasks` | any | Tasks list |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `success` | any | Success status |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Task data and metadata |
|
||||
|
||||
### `wealthbox_write_task`
|
||||
|
||||
@@ -180,9 +145,8 @@ Create or update a Wealthbox task
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | The access token for the Wealthbox API |
|
||||
| `title` | string | Yes | The name/title of the task |
|
||||
| `dueDate` | string | Yes | The due date and time of the task \(format: |
|
||||
| `dueDate` | string | Yes | The due date and time of the task \(format: "YYYY-MM-DD HH:MM AM/PM -HHMM", e.g., "2015-05-24 11:00 AM -0400"\) |
|
||||
| `contactId` | string | No | ID of contact to link to this task |
|
||||
| `description` | string | No | Description or notes about the task |
|
||||
|
||||
@@ -190,14 +154,8 @@ Create or update a Wealthbox task
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `note` | any | Note data |
|
||||
| `notes` | any | Notes list |
|
||||
| `contact` | any | Contact data |
|
||||
| `contacts` | any | Contacts list |
|
||||
| `task` | any | Task data |
|
||||
| `tasks` | any | Tasks list |
|
||||
| `metadata` | json | Operation metadata |
|
||||
| `success` | any | Success status |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | object | Created or updated task data and metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -54,15 +54,16 @@ Send WhatsApp messages
|
||||
| `phoneNumber` | string | Yes | Recipient phone number with country code |
|
||||
| `message` | string | Yes | Message content to send |
|
||||
| `phoneNumberId` | string | Yes | WhatsApp Business Phone Number ID |
|
||||
| `accessToken` | string | Yes | WhatsApp Business API Access Token |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Send success status |
|
||||
| `messageId` | any | Message identifier |
|
||||
| `error` | any | Error information |
|
||||
| `success` | boolean | WhatsApp message send success status |
|
||||
| `messageId` | string | Unique WhatsApp message identifier |
|
||||
| `phoneNumber` | string | Recipient phone number |
|
||||
| `status` | string | Message delivery status |
|
||||
| `timestamp` | string | Message send timestamp |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -74,11 +74,7 @@ Get a summary and metadata for a specific Wikipedia page.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `summary` | json | Page summary data |
|
||||
| `searchResults` | json | Search results data |
|
||||
| `totalHits` | number | Total search hits |
|
||||
| `content` | json | Page content data |
|
||||
| `randomPage` | json | Random page data |
|
||||
| `summary` | object | Wikipedia page summary and metadata |
|
||||
|
||||
### `wikipedia_search`
|
||||
|
||||
@@ -95,11 +91,7 @@ Search for Wikipedia pages by title or content.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `summary` | json | Page summary data |
|
||||
| `searchResults` | json | Search results data |
|
||||
| `totalHits` | number | Total search hits |
|
||||
| `content` | json | Page content data |
|
||||
| `randomPage` | json | Random page data |
|
||||
| `searchResults` | array | Array of matching Wikipedia pages |
|
||||
|
||||
### `wikipedia_content`
|
||||
|
||||
@@ -115,11 +107,7 @@ Get the full HTML content of a Wikipedia page.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `summary` | json | Page summary data |
|
||||
| `searchResults` | json | Search results data |
|
||||
| `totalHits` | number | Total search hits |
|
||||
| `content` | json | Page content data |
|
||||
| `randomPage` | json | Random page data |
|
||||
| `content` | object | Full HTML content and metadata of the Wikipedia page |
|
||||
|
||||
### `wikipedia_random`
|
||||
|
||||
@@ -134,11 +122,7 @@ Get a random Wikipedia page.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `summary` | json | Page summary data |
|
||||
| `searchResults` | json | Search results data |
|
||||
| `totalHits` | number | Total search hits |
|
||||
| `content` | json | Page content data |
|
||||
| `randomPage` | json | Random page data |
|
||||
| `randomPage` | object | Random Wikipedia page data |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,7 +50,6 @@ Post new tweets, reply to tweets, or create polls on X (Twitter)
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | X OAuth access token |
|
||||
| `text` | string | Yes | The text content of your tweet |
|
||||
| `replyTo` | string | No | ID of the tweet to reply to |
|
||||
| `mediaIds` | array | No | Array of media IDs to attach to the tweet |
|
||||
@@ -60,14 +59,7 @@ Post new tweets, reply to tweets, or create polls on X (Twitter)
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `tweet` | json | Tweet data |
|
||||
| `replies` | any | Tweet replies |
|
||||
| `context` | any | Tweet context |
|
||||
| `tweets` | json | Tweets data |
|
||||
| `includes` | any | Additional data |
|
||||
| `meta` | json | Response metadata |
|
||||
| `user` | json | User profile data |
|
||||
| `recentTweets` | any | Recent tweets data |
|
||||
| `tweet` | object | The newly created tweet data |
|
||||
|
||||
### `x_read`
|
||||
|
||||
@@ -77,7 +69,6 @@ Read tweet details, including replies and conversation context
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | X OAuth access token |
|
||||
| `tweetId` | string | Yes | ID of the tweet to read |
|
||||
| `includeReplies` | boolean | No | Whether to include replies to the tweet |
|
||||
|
||||
@@ -85,14 +76,7 @@ Read tweet details, including replies and conversation context
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `tweet` | json | Tweet data |
|
||||
| `replies` | any | Tweet replies |
|
||||
| `context` | any | Tweet context |
|
||||
| `tweets` | json | Tweets data |
|
||||
| `includes` | any | Additional data |
|
||||
| `meta` | json | Response metadata |
|
||||
| `user` | json | User profile data |
|
||||
| `recentTweets` | any | Recent tweets data |
|
||||
| `tweet` | object | The main tweet data |
|
||||
|
||||
### `x_search`
|
||||
|
||||
@@ -102,7 +86,6 @@ Search for tweets using keywords, hashtags, or advanced queries
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | X OAuth access token |
|
||||
| `query` | string | Yes | Search query \(supports X search operators\) |
|
||||
| `maxResults` | number | No | Maximum number of results to return \(default: 10, max: 100\) |
|
||||
| `startTime` | string | No | Start time for search \(ISO 8601 format\) |
|
||||
@@ -113,14 +96,7 @@ Search for tweets using keywords, hashtags, or advanced queries
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `tweet` | json | Tweet data |
|
||||
| `replies` | any | Tweet replies |
|
||||
| `context` | any | Tweet context |
|
||||
| `tweets` | json | Tweets data |
|
||||
| `includes` | any | Additional data |
|
||||
| `meta` | json | Response metadata |
|
||||
| `user` | json | User profile data |
|
||||
| `recentTweets` | any | Recent tweets data |
|
||||
| `tweets` | array | Array of tweets matching the search query |
|
||||
|
||||
### `x_user`
|
||||
|
||||
@@ -130,21 +106,13 @@ Get user profile information
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `accessToken` | string | Yes | X OAuth access token |
|
||||
| `username` | string | Yes | Username to look up \(without @ symbol\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `tweet` | json | Tweet data |
|
||||
| `replies` | any | Tweet replies |
|
||||
| `context` | any | Tweet context |
|
||||
| `tweets` | json | Tweets data |
|
||||
| `includes` | any | Additional data |
|
||||
| `meta` | json | Response metadata |
|
||||
| `user` | json | User profile data |
|
||||
| `recentTweets` | any | Recent tweets data |
|
||||
| `user` | object | X user profile information |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -62,8 +62,7 @@ Search for videos on YouTube using the YouTube Data API.
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | The items returned by the YouTube search |
|
||||
| `totalResults` | number | The total number of results returned by the YouTube search |
|
||||
| `items` | array | Array of YouTube videos matching the search query |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -99,6 +99,7 @@ export const sampleWorkflowState = {
|
||||
horizontalHandles: true,
|
||||
isWide: false,
|
||||
advancedMode: false,
|
||||
triggerMode: false,
|
||||
height: 95,
|
||||
},
|
||||
'agent-id': {
|
||||
@@ -127,6 +128,7 @@ export const sampleWorkflowState = {
|
||||
horizontalHandles: true,
|
||||
isWide: false,
|
||||
advancedMode: false,
|
||||
triggerMode: false,
|
||||
height: 680,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -87,7 +87,7 @@ export async function POST(request: NextRequest) {
|
||||
const { workflowId, path, provider, providerConfig, blockId } = body
|
||||
|
||||
// Validate input
|
||||
if (!workflowId || !path) {
|
||||
if (!workflowId) {
|
||||
logger.warn(`[${requestId}] Missing required fields for webhook creation`, {
|
||||
hasWorkflowId: !!workflowId,
|
||||
hasPath: !!path,
|
||||
@@ -95,6 +95,26 @@ export async function POST(request: NextRequest) {
|
||||
return NextResponse.json({ error: 'Missing required fields' }, { status: 400 })
|
||||
}
|
||||
|
||||
// For credential-based providers (those that use polling instead of webhooks),
|
||||
// generate a dummy path if none provided since they don't use actual webhook URLs
|
||||
// but still need database entries for the polling services to find them
|
||||
let finalPath = path
|
||||
if (!path || path.trim() === '') {
|
||||
// List of providers that use credential-based polling instead of webhooks
|
||||
const credentialBasedProviders = ['gmail', 'outlook']
|
||||
|
||||
if (credentialBasedProviders.includes(provider)) {
|
||||
finalPath = `${provider}-${crypto.randomUUID()}`
|
||||
logger.info(`[${requestId}] Generated dummy path for ${provider} trigger: ${finalPath}`)
|
||||
} else {
|
||||
logger.warn(`[${requestId}] Missing path for webhook creation`, {
|
||||
hasWorkflowId: !!workflowId,
|
||||
hasPath: !!path,
|
||||
})
|
||||
return NextResponse.json({ error: 'Missing required path' }, { status: 400 })
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the workflow exists and user has permission to modify it
|
||||
const workflowData = await db
|
||||
.select({
|
||||
@@ -144,29 +164,32 @@ export async function POST(request: NextRequest) {
|
||||
const existingWebhooks = await db
|
||||
.select({ id: webhook.id, workflowId: webhook.workflowId })
|
||||
.from(webhook)
|
||||
.where(eq(webhook.path, path))
|
||||
.where(eq(webhook.path, finalPath))
|
||||
.limit(1)
|
||||
|
||||
let savedWebhook: any = null // Variable to hold the result of save/update
|
||||
|
||||
// If a webhook with the same path exists but belongs to a different workflow, return an error
|
||||
if (existingWebhooks.length > 0 && existingWebhooks[0].workflowId !== workflowId) {
|
||||
logger.warn(`[${requestId}] Webhook path conflict: ${path}`)
|
||||
logger.warn(`[${requestId}] Webhook path conflict: ${finalPath}`)
|
||||
return NextResponse.json(
|
||||
{ error: 'Webhook path already exists.', code: 'PATH_EXISTS' },
|
||||
{ status: 409 }
|
||||
)
|
||||
}
|
||||
|
||||
// Use the original provider config - Gmail/Outlook configuration functions will inject userId automatically
|
||||
const finalProviderConfig = providerConfig
|
||||
|
||||
// If a webhook with the same path and workflowId exists, update it
|
||||
if (existingWebhooks.length > 0 && existingWebhooks[0].workflowId === workflowId) {
|
||||
logger.info(`[${requestId}] Updating existing webhook for path: ${path}`)
|
||||
logger.info(`[${requestId}] Updating existing webhook for path: ${finalPath}`)
|
||||
const updatedResult = await db
|
||||
.update(webhook)
|
||||
.set({
|
||||
blockId,
|
||||
provider,
|
||||
providerConfig,
|
||||
providerConfig: finalProviderConfig,
|
||||
isActive: true,
|
||||
updatedAt: new Date(),
|
||||
})
|
||||
@@ -183,9 +206,9 @@ export async function POST(request: NextRequest) {
|
||||
id: webhookId,
|
||||
workflowId,
|
||||
blockId,
|
||||
path,
|
||||
path: finalPath,
|
||||
provider,
|
||||
providerConfig,
|
||||
providerConfig: finalProviderConfig,
|
||||
isActive: true,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
|
||||
@@ -51,6 +51,7 @@ const BlockStateSchema = z.object({
|
||||
isWide: z.boolean().optional(),
|
||||
height: z.number().optional(),
|
||||
advancedMode: z.boolean().optional(),
|
||||
triggerMode: z.boolean().optional(),
|
||||
data: BlockDataSchema.optional(),
|
||||
})
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ export async function POST(req: NextRequest) {
|
||||
horizontalHandles: true,
|
||||
isWide: false,
|
||||
advancedMode: false,
|
||||
triggerMode: false,
|
||||
height: 95,
|
||||
},
|
||||
},
|
||||
@@ -178,6 +179,7 @@ export async function POST(req: NextRequest) {
|
||||
horizontalHandles: true,
|
||||
isWide: false,
|
||||
advancedMode: false,
|
||||
triggerMode: false,
|
||||
height: '95',
|
||||
subBlocks: {
|
||||
startWorkflow: {
|
||||
|
||||
@@ -23,4 +23,5 @@ export { Switch } from './switch'
|
||||
export { Table } from './table'
|
||||
export { TimeInput } from './time-input'
|
||||
export { ToolInput } from './tool-input/tool-input'
|
||||
export { TriggerConfig } from './trigger-config/trigger-config'
|
||||
export { WebhookConfig } from './webhook/webhook'
|
||||
|
||||
@@ -0,0 +1,360 @@
|
||||
import { useState } from 'react'
|
||||
import { Check, ChevronDown, Copy, Eye, EyeOff, Info } from 'lucide-react'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import {
|
||||
Command,
|
||||
CommandEmpty,
|
||||
CommandGroup,
|
||||
CommandInput,
|
||||
CommandItem,
|
||||
CommandList,
|
||||
} from '@/components/ui/command'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover'
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
SelectItem,
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from '@/components/ui/select'
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { cn } from '@/lib/utils'
|
||||
import type { TriggerConfig } from '@/triggers/types'
|
||||
|
||||
interface TriggerConfigSectionProps {
|
||||
triggerDef: TriggerConfig
|
||||
config: Record<string, any>
|
||||
onChange: (fieldId: string, value: any) => void
|
||||
webhookUrl: string
|
||||
dynamicOptions?: Record<string, Array<{ id: string; name: string }> | string[]>
|
||||
}
|
||||
|
||||
export function TriggerConfigSection({
|
||||
triggerDef,
|
||||
config,
|
||||
onChange,
|
||||
webhookUrl,
|
||||
dynamicOptions = {},
|
||||
}: TriggerConfigSectionProps) {
|
||||
const [showSecrets, setShowSecrets] = useState<Record<string, boolean>>({})
|
||||
const [copied, setCopied] = useState<string | null>(null)
|
||||
|
||||
const copyToClipboard = (text: string, type: string) => {
|
||||
navigator.clipboard.writeText(text)
|
||||
setCopied(type)
|
||||
setTimeout(() => setCopied(null), 2000)
|
||||
}
|
||||
|
||||
const toggleSecretVisibility = (fieldId: string) => {
|
||||
setShowSecrets((prev) => ({
|
||||
...prev,
|
||||
[fieldId]: !prev[fieldId],
|
||||
}))
|
||||
}
|
||||
|
||||
const renderField = (fieldId: string, fieldDef: any) => {
|
||||
const value = config[fieldId] ?? fieldDef.defaultValue ?? ''
|
||||
const isSecret = fieldDef.isSecret
|
||||
const showSecret = showSecrets[fieldId]
|
||||
|
||||
switch (fieldDef.type) {
|
||||
case 'boolean':
|
||||
return (
|
||||
<div className='flex items-center space-x-2'>
|
||||
<Switch
|
||||
id={fieldId}
|
||||
checked={value}
|
||||
onCheckedChange={(checked) => onChange(fieldId, checked)}
|
||||
/>
|
||||
<Label htmlFor={fieldId}>{fieldDef.label}</Label>
|
||||
</div>
|
||||
)
|
||||
|
||||
case 'select':
|
||||
return (
|
||||
<div className='space-y-2'>
|
||||
<Label htmlFor={fieldId}>
|
||||
{fieldDef.label}
|
||||
{fieldDef.required && <span className='ml-1 text-red-500'>*</span>}
|
||||
</Label>
|
||||
<Select value={value} onValueChange={(value) => onChange(fieldId, value)}>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder={fieldDef.placeholder} />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{fieldDef.options?.map((option: string) => (
|
||||
<SelectItem key={option} value={option}>
|
||||
{option}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
{fieldDef.description && (
|
||||
<p className='text-muted-foreground text-sm'>{fieldDef.description}</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
case 'multiselect': {
|
||||
const selectedValues = Array.isArray(value) ? value : []
|
||||
const rawOptions = dynamicOptions[fieldId] || fieldDef.options || []
|
||||
|
||||
// Handle both string[] and {id, name}[] formats
|
||||
const availableOptions = rawOptions.map((option: any) => {
|
||||
if (typeof option === 'string') {
|
||||
return { id: option, name: option }
|
||||
}
|
||||
return option
|
||||
})
|
||||
|
||||
// Create a map for quick lookup of display names
|
||||
const optionMap = new Map(availableOptions.map((opt: any) => [opt.id, opt.name]))
|
||||
|
||||
return (
|
||||
<div className='space-y-2'>
|
||||
<Label htmlFor={fieldId}>
|
||||
{fieldDef.label}
|
||||
{fieldDef.required && <span className='ml-1 text-red-500'>*</span>}
|
||||
</Label>
|
||||
<Popover>
|
||||
<PopoverTrigger asChild>
|
||||
<Button
|
||||
variant='outline'
|
||||
role='combobox'
|
||||
className='h-10 w-full justify-between text-left font-normal'
|
||||
>
|
||||
<div className='flex w-full items-center justify-between'>
|
||||
{selectedValues.length > 0 ? (
|
||||
<div className='flex flex-wrap gap-1'>
|
||||
{selectedValues.slice(0, 2).map((selectedValue: string) => (
|
||||
<Badge key={selectedValue} variant='secondary' className='text-xs'>
|
||||
{optionMap.get(selectedValue) || selectedValue}
|
||||
</Badge>
|
||||
))}
|
||||
{selectedValues.length > 2 && (
|
||||
<Badge variant='secondary' className='text-xs'>
|
||||
+{selectedValues.length - 2} more
|
||||
</Badge>
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<span className='text-muted-foreground'>{fieldDef.placeholder}</span>
|
||||
)}
|
||||
<ChevronDown className='h-4 w-4 opacity-50' />
|
||||
</div>
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent className='w-[400px] p-0' align='start'>
|
||||
<Command>
|
||||
<CommandInput placeholder={`Search ${fieldDef.label.toLowerCase()}...`} />
|
||||
<CommandList className='max-h-[200px] overflow-y-auto'>
|
||||
<CommandEmpty>
|
||||
{availableOptions.length === 0
|
||||
? 'No options available. Please select credentials first.'
|
||||
: 'No options found.'}
|
||||
</CommandEmpty>
|
||||
<CommandGroup>
|
||||
{availableOptions.map((option: any) => (
|
||||
<CommandItem
|
||||
key={option.id}
|
||||
value={option.id}
|
||||
onSelect={() => {
|
||||
const newValues = selectedValues.includes(option.id)
|
||||
? selectedValues.filter((v: string) => v !== option.id)
|
||||
: [...selectedValues, option.id]
|
||||
onChange(fieldId, newValues)
|
||||
}}
|
||||
>
|
||||
<Check
|
||||
className={cn(
|
||||
'mr-2 h-4 w-4',
|
||||
selectedValues.includes(option.id) ? 'opacity-100' : 'opacity-0'
|
||||
)}
|
||||
/>
|
||||
{option.name}
|
||||
</CommandItem>
|
||||
))}
|
||||
</CommandGroup>
|
||||
</CommandList>
|
||||
</Command>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
{fieldDef.description && (
|
||||
<p className='text-muted-foreground text-sm'>{fieldDef.description}</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
case 'number':
|
||||
return (
|
||||
<div className='space-y-2'>
|
||||
<Label htmlFor={fieldId}>
|
||||
{fieldDef.label}
|
||||
{fieldDef.required && <span className='ml-1 text-red-500'>*</span>}
|
||||
</Label>
|
||||
<Input
|
||||
id={fieldId}
|
||||
type='number'
|
||||
placeholder={fieldDef.placeholder}
|
||||
value={value}
|
||||
onChange={(e) => onChange(fieldId, Number(e.target.value))}
|
||||
/>
|
||||
{fieldDef.description && (
|
||||
<p className='text-muted-foreground text-sm'>{fieldDef.description}</p>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
|
||||
default: // string
|
||||
return (
|
||||
<div className='mb-4 space-y-1'>
|
||||
<div className='flex items-center gap-2'>
|
||||
<Label htmlFor={fieldId} className='font-medium text-sm'>
|
||||
{fieldDef.label}
|
||||
{fieldDef.required && <span className='ml-1 text-red-500'>*</span>}
|
||||
</Label>
|
||||
{fieldDef.description && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant='ghost'
|
||||
size='sm'
|
||||
className='h-6 w-6 p-1 text-gray-500'
|
||||
aria-label={`Learn more about ${fieldDef.label}`}
|
||||
>
|
||||
<Info className='h-4 w-4' />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
side='right'
|
||||
align='center'
|
||||
className='z-[100] max-w-[300px] p-3'
|
||||
role='tooltip'
|
||||
>
|
||||
<p className='text-sm'>{fieldDef.description}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
<div className='flex'>
|
||||
<div className='relative flex-1'>
|
||||
<Input
|
||||
id={fieldId}
|
||||
type={isSecret && !showSecret ? 'password' : 'text'}
|
||||
placeholder={fieldDef.placeholder}
|
||||
value={value}
|
||||
onChange={(e) => onChange(fieldId, e.target.value)}
|
||||
className={cn(
|
||||
'h-10 flex-1',
|
||||
isSecret ? 'pr-10' : '',
|
||||
'focus-visible:ring-2 focus-visible:ring-primary/20'
|
||||
)}
|
||||
/>
|
||||
{isSecret && (
|
||||
<Button
|
||||
type='button'
|
||||
variant='ghost'
|
||||
size='icon'
|
||||
className={cn(
|
||||
'-translate-y-1/2 absolute top-1/2 right-1 h-6 w-6 text-muted-foreground',
|
||||
'transition-colors hover:bg-transparent hover:text-foreground'
|
||||
)}
|
||||
onClick={() => toggleSecretVisibility(fieldId)}
|
||||
aria-label={showSecret ? 'Hide secret' : 'Show secret'}
|
||||
>
|
||||
{showSecret ? <EyeOff className='h-4 w-4' /> : <Eye className='h-4 w-4' />}
|
||||
<span className='sr-only'>{showSecret ? 'Hide secret' : 'Show secret'}</span>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
{isSecret && (
|
||||
<Button
|
||||
type='button'
|
||||
size='icon'
|
||||
variant='outline'
|
||||
className={cn('ml-2 h-10 w-10', 'hover:bg-primary/5', 'transition-colors')}
|
||||
onClick={() => copyToClipboard(value, fieldId)}
|
||||
disabled={!value}
|
||||
>
|
||||
{copied === fieldId ? (
|
||||
<Check className='h-4 w-4 text-green-500' />
|
||||
) : (
|
||||
<Copy className='h-4 w-4' />
|
||||
)}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='space-y-4 rounded-md border border-border bg-card p-4 shadow-sm'>
|
||||
{webhookUrl && (
|
||||
<div className='mb-4 space-y-1'>
|
||||
<div className='flex items-center gap-2'>
|
||||
<Label className='font-medium text-sm'>Webhook URL</Label>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant='ghost'
|
||||
size='sm'
|
||||
className='h-6 w-6 p-1 text-gray-500'
|
||||
aria-label='Learn more about Webhook URL'
|
||||
>
|
||||
<Info className='h-4 w-4' />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent
|
||||
side='right'
|
||||
align='center'
|
||||
className='z-[100] max-w-[300px] p-3'
|
||||
role='tooltip'
|
||||
>
|
||||
<p className='text-sm'>This is the URL that will receive webhook requests</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</div>
|
||||
<div className='flex'>
|
||||
<div className='relative flex-1'>
|
||||
<Input
|
||||
value={webhookUrl}
|
||||
readOnly
|
||||
className={cn(
|
||||
'h-10 flex-1 cursor-text font-mono text-xs',
|
||||
'focus-visible:ring-2 focus-visible:ring-primary/20'
|
||||
)}
|
||||
onClick={(e) => (e.target as HTMLInputElement).select()}
|
||||
/>
|
||||
</div>
|
||||
<Button
|
||||
type='button'
|
||||
size='icon'
|
||||
variant='outline'
|
||||
className={cn('ml-2 h-10 w-10', 'hover:bg-primary/5', 'transition-colors')}
|
||||
onClick={() => copyToClipboard(webhookUrl, 'url')}
|
||||
>
|
||||
{copied === 'url' ? (
|
||||
<Check className='h-4 w-4 text-green-500' />
|
||||
) : (
|
||||
<Copy className='h-4 w-4' />
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{Object.entries(triggerDef.configFields).map(([fieldId, fieldDef]) => (
|
||||
<div key={fieldId}>{renderField(fieldId, fieldDef)}</div>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
import { Notice } from '@/components/ui'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { JSONView } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/console/components'
|
||||
import type { TriggerConfig } from '@/triggers/types'
|
||||
|
||||
interface TriggerInstructionsProps {
|
||||
instructions: string[]
|
||||
webhookUrl: string
|
||||
samplePayload: any
|
||||
triggerDef: TriggerConfig
|
||||
}
|
||||
|
||||
export function TriggerInstructions({
|
||||
instructions,
|
||||
webhookUrl,
|
||||
samplePayload,
|
||||
triggerDef,
|
||||
}: TriggerInstructionsProps) {
|
||||
return (
|
||||
<div className='space-y-4'>
|
||||
<div className={cn('mt-4 rounded-md border border-border bg-card/50 p-4 shadow-sm')}>
|
||||
<h4 className='mb-3 font-medium text-base'>Setup Instructions</h4>
|
||||
<div className='space-y-1 text-muted-foreground text-sm [&_a]:text-primary [&_a]:underline [&_a]:hover:text-primary/80 [&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-xs'>
|
||||
<ol className='list-inside list-decimal space-y-2'>
|
||||
{instructions.map((instruction, index) => (
|
||||
<li key={index} dangerouslySetInnerHTML={{ __html: instruction }} />
|
||||
))}
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Notice
|
||||
variant='default'
|
||||
className='border-slate-200 bg-white dark:border-border dark:bg-background'
|
||||
icon={
|
||||
triggerDef.icon ? (
|
||||
<triggerDef.icon className='mt-0.5 mr-3.5 h-5 w-5 flex-shrink-0 text-[#611f69] dark:text-[#e01e5a]' />
|
||||
) : null
|
||||
}
|
||||
title={`${triggerDef.provider.charAt(0).toUpperCase() + triggerDef.provider.slice(1)} Event Payload Example`}
|
||||
>
|
||||
Your workflow will receive a payload similar to this when a subscribed event occurs.
|
||||
<div className='overflow-wrap-anywhere mt-2 whitespace-normal break-normal font-mono text-sm'>
|
||||
<JSONView data={samplePayload} />
|
||||
</div>
|
||||
</Notice>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,355 @@
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import { Trash2 } from 'lucide-react'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog'
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useSubBlockStore } from '@/stores/workflows/subblock/store'
|
||||
import type { TriggerConfig } from '@/triggers/types'
|
||||
import { CredentialSelector } from '../../credential-selector/credential-selector'
|
||||
import { TriggerConfigSection } from './trigger-config-section'
|
||||
import { TriggerInstructions } from './trigger-instructions'
|
||||
|
||||
const logger = createLogger('TriggerModal')
|
||||
|
||||
interface TriggerModalProps {
|
||||
isOpen: boolean
|
||||
onClose: () => void
|
||||
triggerPath: string
|
||||
triggerDef: TriggerConfig
|
||||
triggerConfig: Record<string, any>
|
||||
onSave?: (path: string, config: Record<string, any>) => Promise<boolean>
|
||||
onDelete?: () => Promise<boolean>
|
||||
triggerId?: string
|
||||
blockId: string
|
||||
}
|
||||
|
||||
export function TriggerModal({
|
||||
isOpen,
|
||||
onClose,
|
||||
triggerPath,
|
||||
triggerDef,
|
||||
triggerConfig: initialConfig,
|
||||
onSave,
|
||||
onDelete,
|
||||
triggerId,
|
||||
blockId,
|
||||
}: TriggerModalProps) {
|
||||
const [config, setConfig] = useState<Record<string, any>>(initialConfig)
|
||||
const [isSaving, setIsSaving] = useState(false)
|
||||
|
||||
// Track if config has changed from initial values
|
||||
const hasConfigChanged = useMemo(() => {
|
||||
return JSON.stringify(config) !== JSON.stringify(initialConfig)
|
||||
}, [config, initialConfig])
|
||||
const [isDeleting, setIsDeleting] = useState(false)
|
||||
const [webhookUrl, setWebhookUrl] = useState('')
|
||||
const [generatedPath, setGeneratedPath] = useState('')
|
||||
const [hasCredentials, setHasCredentials] = useState(false)
|
||||
const [selectedCredentialId, setSelectedCredentialId] = useState<string | null>(null)
|
||||
const [dynamicOptions, setDynamicOptions] = useState<
|
||||
Record<string, Array<{ id: string; name: string }>>
|
||||
>({})
|
||||
|
||||
// Initialize config with default values from trigger definition
|
||||
useEffect(() => {
|
||||
const defaultConfig: Record<string, any> = {}
|
||||
|
||||
// Apply default values from trigger definition
|
||||
Object.entries(triggerDef.configFields).forEach(([fieldId, field]) => {
|
||||
if (field.defaultValue !== undefined && !(fieldId in initialConfig)) {
|
||||
defaultConfig[fieldId] = field.defaultValue
|
||||
}
|
||||
})
|
||||
|
||||
// Merge with initial config, prioritizing initial config values
|
||||
const mergedConfig = { ...defaultConfig, ...initialConfig }
|
||||
|
||||
// Only update if there are actually default values to apply
|
||||
if (Object.keys(defaultConfig).length > 0) {
|
||||
setConfig(mergedConfig)
|
||||
}
|
||||
}, [triggerDef.configFields, initialConfig])
|
||||
|
||||
// Monitor credential selection
|
||||
useEffect(() => {
|
||||
if (triggerDef.requiresCredentials && triggerDef.credentialProvider) {
|
||||
// Check if credentials are selected by monitoring the sub-block store
|
||||
const checkCredentials = () => {
|
||||
const subBlockStore = useSubBlockStore.getState()
|
||||
const credentialValue = subBlockStore.getValue(blockId, 'triggerCredentials')
|
||||
const hasCredential = Boolean(credentialValue)
|
||||
setHasCredentials(hasCredential)
|
||||
|
||||
// If credential changed and it's a Gmail trigger, load labels
|
||||
if (hasCredential && credentialValue !== selectedCredentialId) {
|
||||
setSelectedCredentialId(credentialValue)
|
||||
if (triggerDef.provider === 'gmail') {
|
||||
loadGmailLabels(credentialValue)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
checkCredentials()
|
||||
|
||||
// Set up a subscription to monitor changes
|
||||
const unsubscribe = useSubBlockStore.subscribe(checkCredentials)
|
||||
|
||||
return unsubscribe
|
||||
}
|
||||
// If credentials aren't required, set to true
|
||||
setHasCredentials(true)
|
||||
}, [
|
||||
blockId,
|
||||
triggerDef.requiresCredentials,
|
||||
triggerDef.credentialProvider,
|
||||
selectedCredentialId,
|
||||
triggerDef.provider,
|
||||
])
|
||||
|
||||
// Load Gmail labels for the selected credential
|
||||
const loadGmailLabels = async (credentialId: string) => {
|
||||
try {
|
||||
const response = await fetch(`/api/tools/gmail/labels?credentialId=${credentialId}`)
|
||||
if (response.ok) {
|
||||
const data = await response.json()
|
||||
if (data.labels && Array.isArray(data.labels)) {
|
||||
const labelOptions = data.labels.map((label: any) => ({
|
||||
id: label.id,
|
||||
name: label.name,
|
||||
}))
|
||||
setDynamicOptions((prev) => ({
|
||||
...prev,
|
||||
labelIds: labelOptions,
|
||||
}))
|
||||
}
|
||||
} else {
|
||||
logger.error('Failed to load Gmail labels:', response.statusText)
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error('Error loading Gmail labels:', error)
|
||||
}
|
||||
}
|
||||
|
||||
// Generate webhook path and URL
|
||||
useEffect(() => {
|
||||
// For triggers that don't use webhooks (like Gmail polling), skip URL generation
|
||||
if (triggerDef.requiresCredentials && !triggerDef.webhook) {
|
||||
setWebhookUrl('')
|
||||
setGeneratedPath('')
|
||||
return
|
||||
}
|
||||
|
||||
let finalPath = triggerPath
|
||||
|
||||
// If no path exists, generate one automatically
|
||||
if (!finalPath) {
|
||||
const timestamp = Date.now()
|
||||
const randomId = Math.random().toString(36).substring(2, 8)
|
||||
finalPath = `/${triggerDef.provider}/${timestamp}-${randomId}`
|
||||
setGeneratedPath(finalPath)
|
||||
}
|
||||
|
||||
if (finalPath) {
|
||||
const baseUrl = window.location.origin
|
||||
setWebhookUrl(`${baseUrl}/api/webhooks/trigger${finalPath}`)
|
||||
}
|
||||
}, [triggerPath, triggerDef.provider, triggerDef.requiresCredentials, triggerDef.webhook])
|
||||
|
||||
const handleConfigChange = (fieldId: string, value: any) => {
|
||||
setConfig((prev) => ({
|
||||
...prev,
|
||||
[fieldId]: value,
|
||||
}))
|
||||
}
|
||||
|
||||
const handleSave = async () => {
|
||||
if (!onSave) return
|
||||
|
||||
setIsSaving(true)
|
||||
try {
|
||||
// Use the existing trigger path or the generated one
|
||||
const path = triggerPath || generatedPath
|
||||
|
||||
// For credential-based triggers that don't use webhooks (like Gmail), path is optional
|
||||
const requiresPath = triggerDef.webhook !== undefined
|
||||
|
||||
if (requiresPath && !path) {
|
||||
logger.error('No webhook path available for saving trigger')
|
||||
return
|
||||
}
|
||||
|
||||
const success = await onSave(path || '', config)
|
||||
if (success) {
|
||||
onClose()
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error('Error saving trigger:', error)
|
||||
} finally {
|
||||
setIsSaving(false)
|
||||
}
|
||||
}
|
||||
|
||||
const handleDelete = async () => {
|
||||
if (!onDelete) return
|
||||
|
||||
setIsDeleting(true)
|
||||
try {
|
||||
const success = await onDelete()
|
||||
if (success) {
|
||||
onClose()
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error('Error deleting trigger:', error)
|
||||
} finally {
|
||||
setIsDeleting(false)
|
||||
}
|
||||
}
|
||||
|
||||
const isConfigValid = () => {
|
||||
// Check if credentials are required and available
|
||||
if (triggerDef.requiresCredentials && !hasCredentials) {
|
||||
return false
|
||||
}
|
||||
|
||||
// Check required fields
|
||||
for (const [fieldId, fieldDef] of Object.entries(triggerDef.configFields)) {
|
||||
if (fieldDef.required && !config[fieldId]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
return (
|
||||
<Dialog open={isOpen} onOpenChange={onClose}>
|
||||
<DialogContent
|
||||
className='flex max-h-[90vh] flex-col gap-0 overflow-hidden p-0 sm:max-w-[600px]'
|
||||
hideCloseButton
|
||||
onOpenAutoFocus={(e) => e.preventDefault()}
|
||||
>
|
||||
<DialogHeader className='border-b px-6 py-4'>
|
||||
<div className='flex items-center justify-between'>
|
||||
<div className='flex items-center gap-3'>
|
||||
<DialogTitle className='font-medium text-lg'>
|
||||
{triggerDef.name} Configuration
|
||||
</DialogTitle>
|
||||
{triggerId && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Badge
|
||||
variant='outline'
|
||||
className='flex items-center gap-1 border-green-200 bg-green-50 font-normal text-green-600 text-xs hover:bg-green-50 dark:bg-green-900/20 dark:text-green-400'
|
||||
>
|
||||
<div className='relative mr-0.5 flex items-center justify-center'>
|
||||
<div className='absolute h-3 w-3 rounded-full bg-green-500/20' />
|
||||
<div className='relative h-2 w-2 rounded-full bg-green-500' />
|
||||
</div>
|
||||
Active Trigger
|
||||
</Badge>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side='bottom' className='max-w-[300px] p-4'>
|
||||
<p className='text-sm'>{triggerDef.name}</p>
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</DialogHeader>
|
||||
|
||||
<div className='flex-1 overflow-y-auto px-6 py-6'>
|
||||
<div className='space-y-6'>
|
||||
{triggerDef.requiresCredentials && triggerDef.credentialProvider && (
|
||||
<div className='space-y-2 rounded-md border border-border bg-card p-4 shadow-sm'>
|
||||
<h3 className='font-medium text-sm'>Credentials</h3>
|
||||
<p className='text-muted-foreground text-sm'>
|
||||
This trigger requires {triggerDef.credentialProvider.replace('-', ' ')}{' '}
|
||||
credentials to access your account.
|
||||
</p>
|
||||
<CredentialSelector
|
||||
blockId={blockId}
|
||||
subBlock={{
|
||||
id: 'triggerCredentials',
|
||||
type: 'oauth-input' as const,
|
||||
placeholder: `Select ${triggerDef.credentialProvider.replace('-', ' ')} credential`,
|
||||
provider: triggerDef.credentialProvider as any,
|
||||
requiredScopes: [],
|
||||
}}
|
||||
previewValue={null}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<TriggerConfigSection
|
||||
triggerDef={triggerDef}
|
||||
config={config}
|
||||
onChange={handleConfigChange}
|
||||
webhookUrl={webhookUrl}
|
||||
dynamicOptions={dynamicOptions}
|
||||
/>
|
||||
|
||||
<TriggerInstructions
|
||||
instructions={triggerDef.instructions}
|
||||
webhookUrl={webhookUrl}
|
||||
samplePayload={triggerDef.samplePayload}
|
||||
triggerDef={triggerDef}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<DialogFooter className='border-t px-6 py-4'>
|
||||
<div className='flex w-full justify-between'>
|
||||
<div>
|
||||
{triggerId && (
|
||||
<Button
|
||||
type='button'
|
||||
variant='destructive'
|
||||
onClick={handleDelete}
|
||||
disabled={isDeleting || isSaving}
|
||||
size='default'
|
||||
className='h-10'
|
||||
>
|
||||
{isDeleting ? (
|
||||
<div className='mr-2 h-4 w-4 animate-spin rounded-full border-[1.5px] border-current border-t-transparent' />
|
||||
) : (
|
||||
<Trash2 className='mr-2 h-4 w-4' />
|
||||
)}
|
||||
{isDeleting ? 'Deleting...' : 'Delete'}
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
<div className='flex gap-2'>
|
||||
<Button variant='outline' onClick={onClose} size='default' className='h-10'>
|
||||
Cancel
|
||||
</Button>
|
||||
<Button
|
||||
onClick={handleSave}
|
||||
disabled={isSaving || !isConfigValid() || !hasConfigChanged}
|
||||
className={cn(
|
||||
'h-10',
|
||||
isConfigValid() && hasConfigChanged ? 'bg-primary hover:bg-primary/90' : '',
|
||||
isSaving &&
|
||||
'relative after:absolute after:inset-0 after:animate-pulse after:bg-white/20'
|
||||
)}
|
||||
size='default'
|
||||
>
|
||||
{isSaving && (
|
||||
<div className='mr-2 h-4 w-4 animate-spin rounded-full border-[1.5px] border-current border-t-transparent' />
|
||||
)}
|
||||
{isSaving ? 'Saving...' : 'Save Changes'}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</DialogFooter>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,403 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { ExternalLink } from 'lucide-react'
|
||||
import { useParams } from 'next/navigation'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { createLogger } from '@/lib/logs/console/logger'
|
||||
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/hooks/use-sub-block-value'
|
||||
import { useSubBlockStore } from '@/stores/workflows/subblock/store'
|
||||
import { getTrigger } from '@/triggers'
|
||||
import { TriggerModal } from './components/trigger-modal'
|
||||
|
||||
const logger = createLogger('TriggerConfig')
|
||||
|
||||
interface TriggerConfigProps {
|
||||
blockId: string
|
||||
isConnecting: boolean
|
||||
isPreview?: boolean
|
||||
value?: {
|
||||
triggerId?: string
|
||||
triggerPath?: string
|
||||
triggerConfig?: Record<string, any>
|
||||
}
|
||||
disabled?: boolean
|
||||
availableTriggers?: string[]
|
||||
}
|
||||
|
||||
export function TriggerConfig({
|
||||
blockId,
|
||||
isConnecting,
|
||||
isPreview = false,
|
||||
value: propValue,
|
||||
disabled = false,
|
||||
availableTriggers = [],
|
||||
}: TriggerConfigProps) {
|
||||
const [isModalOpen, setIsModalOpen] = useState(false)
|
||||
const [isSaving, setIsSaving] = useState(false)
|
||||
const [isDeleting, setIsDeleting] = useState(false)
|
||||
const [error, setError] = useState<string | null>(null)
|
||||
const [triggerId, setTriggerId] = useState<string | null>(null)
|
||||
const params = useParams()
|
||||
const workflowId = params.workflowId as string
|
||||
const [isLoading, setIsLoading] = useState(false)
|
||||
|
||||
// Get trigger configuration from the block state
|
||||
const [storeTriggerProvider, setTriggerProvider] = useSubBlockValue(blockId, 'triggerProvider')
|
||||
const [storeTriggerPath, setTriggerPath] = useSubBlockValue(blockId, 'triggerPath')
|
||||
const [storeTriggerConfig, setTriggerConfig] = useSubBlockValue(blockId, 'triggerConfig')
|
||||
const [storeTriggerId, setStoredTriggerId] = useSubBlockValue(blockId, 'triggerId')
|
||||
|
||||
// Use prop values when available (preview mode), otherwise use store values
|
||||
const selectedTriggerId = propValue?.triggerId ?? storeTriggerId ?? (availableTriggers[0] || null)
|
||||
const triggerPath = propValue?.triggerPath ?? storeTriggerPath
|
||||
const triggerConfig = propValue?.triggerConfig ?? storeTriggerConfig
|
||||
|
||||
// Consolidate trigger ID logic
|
||||
const effectiveTriggerId = selectedTriggerId || availableTriggers[0]
|
||||
const triggerDef = effectiveTriggerId ? getTrigger(effectiveTriggerId) : null
|
||||
|
||||
// Set the trigger ID to the first available one if none is set
|
||||
useEffect(() => {
|
||||
if (!selectedTriggerId && availableTriggers[0] && !isPreview) {
|
||||
setStoredTriggerId(availableTriggers[0])
|
||||
}
|
||||
}, [availableTriggers, selectedTriggerId, setStoredTriggerId, isPreview])
|
||||
|
||||
// Store the actual trigger from the database
|
||||
const [actualTriggerId, setActualTriggerId] = useState<string | null>(null)
|
||||
|
||||
// Check if webhook exists in the database (using existing webhook API)
|
||||
useEffect(() => {
|
||||
// Skip API calls in preview mode
|
||||
if (isPreview) {
|
||||
setIsLoading(false)
|
||||
return
|
||||
}
|
||||
|
||||
const checkWebhook = async () => {
|
||||
setIsLoading(true)
|
||||
try {
|
||||
// Check if there's a webhook for this specific block
|
||||
const response = await fetch(`/api/webhooks?workflowId=${workflowId}&blockId=${blockId}`)
|
||||
if (response.ok) {
|
||||
const data = await response.json()
|
||||
if (data.webhooks && data.webhooks.length > 0) {
|
||||
const webhook = data.webhooks[0].webhook
|
||||
setTriggerId(webhook.id)
|
||||
setActualTriggerId(webhook.provider)
|
||||
|
||||
// Update the path in the block state if it's different
|
||||
if (webhook.path && webhook.path !== triggerPath) {
|
||||
setTriggerPath(webhook.path)
|
||||
}
|
||||
|
||||
// Update trigger config (from webhook providerConfig)
|
||||
if (webhook.providerConfig) {
|
||||
setTriggerConfig(webhook.providerConfig)
|
||||
}
|
||||
} else {
|
||||
setTriggerId(null)
|
||||
setActualTriggerId(null)
|
||||
|
||||
// Clear stale trigger data from store when no webhook found in database
|
||||
if (triggerPath) {
|
||||
setTriggerPath('')
|
||||
logger.info('Cleared stale trigger path on page refresh - no webhook in database', {
|
||||
blockId,
|
||||
clearedPath: triggerPath,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
logger.error('Error checking webhook:', { error })
|
||||
} finally {
|
||||
setIsLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
if (effectiveTriggerId) {
|
||||
checkWebhook()
|
||||
}
|
||||
}, [workflowId, blockId, isPreview, effectiveTriggerId])
|
||||
|
||||
const handleOpenModal = () => {
|
||||
if (isPreview || disabled) return
|
||||
setIsModalOpen(true)
|
||||
setError(null)
|
||||
}
|
||||
|
||||
const handleCloseModal = () => {
|
||||
setIsModalOpen(false)
|
||||
}
|
||||
|
||||
const handleSaveTrigger = async (path: string, config: Record<string, any>) => {
|
||||
if (isPreview || disabled || !effectiveTriggerId) return false
|
||||
|
||||
try {
|
||||
setIsSaving(true)
|
||||
setError(null)
|
||||
|
||||
// Get trigger definition to check if it requires webhooks
|
||||
const triggerDef = getTrigger(effectiveTriggerId)
|
||||
if (!triggerDef) {
|
||||
throw new Error('Trigger definition not found')
|
||||
}
|
||||
|
||||
// Set the trigger path and config in the block state
|
||||
if (path && path !== triggerPath) {
|
||||
setTriggerPath(path)
|
||||
}
|
||||
setTriggerConfig(config)
|
||||
setStoredTriggerId(effectiveTriggerId)
|
||||
|
||||
// Map trigger ID to webhook provider name
|
||||
const webhookProvider = effectiveTriggerId.replace(/_webhook|_poller$/, '') // e.g., 'slack_webhook' -> 'slack', 'gmail_poller' -> 'gmail'
|
||||
|
||||
// For credential-based triggers (like Gmail), create webhook entry for polling service but no webhook URL
|
||||
if (triggerDef.requiresCredentials && !triggerDef.webhook) {
|
||||
// Gmail polling service requires a webhook database entry to find the configuration
|
||||
const response = await fetch('/api/webhooks', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
workflowId,
|
||||
blockId,
|
||||
path: '', // Empty path - API will generate dummy path for Gmail
|
||||
provider: webhookProvider,
|
||||
providerConfig: config,
|
||||
}),
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json()
|
||||
throw new Error(
|
||||
typeof errorData.error === 'object'
|
||||
? errorData.error.message || JSON.stringify(errorData.error)
|
||||
: errorData.error || 'Failed to save credential-based trigger'
|
||||
)
|
||||
}
|
||||
|
||||
const data = await response.json()
|
||||
const savedWebhookId = data.webhook.id
|
||||
setTriggerId(savedWebhookId)
|
||||
|
||||
logger.info('Credential-based trigger saved successfully', {
|
||||
webhookId: savedWebhookId,
|
||||
triggerDefId: effectiveTriggerId,
|
||||
provider: webhookProvider,
|
||||
blockId,
|
||||
})
|
||||
|
||||
// Update the actual trigger after saving
|
||||
setActualTriggerId(webhookProvider)
|
||||
return true
|
||||
}
|
||||
|
||||
// Save as webhook using existing webhook API (for webhook-based triggers)
|
||||
const response = await fetch('/api/webhooks', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
workflowId,
|
||||
blockId,
|
||||
path,
|
||||
provider: webhookProvider,
|
||||
providerConfig: config,
|
||||
}),
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json()
|
||||
throw new Error(
|
||||
typeof errorData.error === 'object'
|
||||
? errorData.error.message || JSON.stringify(errorData.error)
|
||||
: errorData.error || 'Failed to save trigger'
|
||||
)
|
||||
}
|
||||
|
||||
const data = await response.json()
|
||||
const savedWebhookId = data.webhook.id
|
||||
setTriggerId(savedWebhookId)
|
||||
|
||||
logger.info('Trigger saved successfully as webhook', {
|
||||
webhookId: savedWebhookId,
|
||||
triggerDefId: effectiveTriggerId,
|
||||
provider: webhookProvider,
|
||||
path,
|
||||
blockId,
|
||||
})
|
||||
|
||||
// Update the actual trigger after saving
|
||||
setActualTriggerId(webhookProvider)
|
||||
|
||||
return true
|
||||
} catch (error: any) {
|
||||
logger.error('Error saving trigger:', { error })
|
||||
setError(error.message || 'Failed to save trigger configuration')
|
||||
return false
|
||||
} finally {
|
||||
setIsSaving(false)
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeleteTrigger = async () => {
|
||||
if (isPreview || disabled || !triggerId) return false
|
||||
|
||||
try {
|
||||
setIsDeleting(true)
|
||||
setError(null)
|
||||
|
||||
// Delete webhook using existing webhook API (works for both webhook and credential-based triggers)
|
||||
const response = await fetch(`/api/webhooks/${triggerId}`, {
|
||||
method: 'DELETE',
|
||||
})
|
||||
|
||||
if (!response.ok) {
|
||||
const errorData = await response.json()
|
||||
throw new Error(errorData.error || 'Failed to delete trigger')
|
||||
}
|
||||
|
||||
// Remove trigger-specific fields from the block state
|
||||
const store = useSubBlockStore.getState()
|
||||
const workflowValues = store.workflowValues[workflowId] || {}
|
||||
const blockValues = { ...workflowValues[blockId] }
|
||||
|
||||
// Remove trigger-related fields
|
||||
blockValues.triggerId = undefined
|
||||
blockValues.triggerConfig = undefined
|
||||
blockValues.triggerPath = undefined
|
||||
|
||||
// Update the store with the cleaned block values
|
||||
useSubBlockStore.setState({
|
||||
workflowValues: {
|
||||
...workflowValues,
|
||||
[workflowId]: {
|
||||
...workflowValues,
|
||||
[blockId]: blockValues,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
// Clear component state
|
||||
setTriggerId(null)
|
||||
setActualTriggerId(null)
|
||||
|
||||
// Also clear store values using the setters to ensure UI updates
|
||||
setTriggerPath('')
|
||||
setTriggerConfig({})
|
||||
setStoredTriggerId('')
|
||||
|
||||
logger.info('Trigger deleted successfully', {
|
||||
blockId,
|
||||
triggerType:
|
||||
triggerDef?.requiresCredentials && !triggerDef.webhook
|
||||
? 'credential-based'
|
||||
: 'webhook-based',
|
||||
hadWebhookId: Boolean(triggerId),
|
||||
})
|
||||
|
||||
handleCloseModal()
|
||||
|
||||
return true
|
||||
} catch (error: any) {
|
||||
logger.error('Error deleting trigger:', { error })
|
||||
setError(error.message || 'Failed to delete trigger')
|
||||
return false
|
||||
} finally {
|
||||
setIsDeleting(false)
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the trigger is connected
|
||||
// Both webhook and credential-based triggers now have webhook database entries
|
||||
const isTriggerConnected = Boolean(triggerId && actualTriggerId)
|
||||
|
||||
// Debug logging to help with troubleshooting
|
||||
useEffect(() => {
|
||||
logger.info('Trigger connection status:', {
|
||||
triggerId,
|
||||
actualTriggerId,
|
||||
triggerPath,
|
||||
isTriggerConnected,
|
||||
effectiveTriggerId,
|
||||
triggerConfig,
|
||||
triggerConfigKeys: triggerConfig ? Object.keys(triggerConfig) : [],
|
||||
isCredentialBased: triggerDef?.requiresCredentials && !triggerDef.webhook,
|
||||
storeValues: {
|
||||
storeTriggerId,
|
||||
storeTriggerPath,
|
||||
storeTriggerConfig,
|
||||
},
|
||||
})
|
||||
}, [
|
||||
triggerId,
|
||||
actualTriggerId,
|
||||
triggerPath,
|
||||
isTriggerConnected,
|
||||
effectiveTriggerId,
|
||||
triggerConfig,
|
||||
triggerDef,
|
||||
storeTriggerId,
|
||||
storeTriggerPath,
|
||||
storeTriggerConfig,
|
||||
])
|
||||
|
||||
return (
|
||||
<div className='w-full'>
|
||||
{error && <div className='mb-2 text-red-500 text-sm dark:text-red-400'>{error}</div>}
|
||||
|
||||
{isTriggerConnected ? (
|
||||
<div className='flex flex-col space-y-2'>
|
||||
<div
|
||||
className='flex h-10 cursor-pointer items-center justify-center rounded border border-border bg-background px-3 py-2 transition-colors duration-200 hover:bg-accent hover:text-accent-foreground'
|
||||
onClick={handleOpenModal}
|
||||
>
|
||||
<div className='flex items-center gap-2'>
|
||||
<div className='flex items-center'>
|
||||
{triggerDef?.icon && (
|
||||
<triggerDef.icon className='mr-2 h-4 w-4 text-[#611f69] dark:text-[#e01e5a]' />
|
||||
)}
|
||||
<span className='font-normal text-sm'>{triggerDef?.name || 'Active Trigger'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<Button
|
||||
variant='outline'
|
||||
size='sm'
|
||||
className='flex h-10 w-full items-center bg-background font-normal text-sm'
|
||||
onClick={handleOpenModal}
|
||||
disabled={
|
||||
isConnecting || isSaving || isDeleting || isPreview || disabled || !effectiveTriggerId
|
||||
}
|
||||
>
|
||||
{isLoading ? (
|
||||
<div className='mr-2 h-4 w-4 animate-spin rounded-full border-[1.5px] border-current border-t-transparent' />
|
||||
) : (
|
||||
<ExternalLink className='mr-2 h-4 w-4' />
|
||||
)}
|
||||
Configure Trigger
|
||||
</Button>
|
||||
)}
|
||||
|
||||
{isModalOpen && triggerDef && (
|
||||
<TriggerModal
|
||||
isOpen={isModalOpen}
|
||||
onClose={handleCloseModal}
|
||||
triggerPath={triggerPath || ''}
|
||||
triggerDef={triggerDef}
|
||||
triggerConfig={triggerConfig || {}}
|
||||
onSave={handleSaveTrigger}
|
||||
onDelete={handleDeleteTrigger}
|
||||
triggerId={triggerId || undefined}
|
||||
blockId={blockId}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
Table,
|
||||
TimeInput,
|
||||
ToolInput,
|
||||
TriggerConfig,
|
||||
WebhookConfig,
|
||||
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components'
|
||||
import type { SubBlockConfig } from '@/blocks/types'
|
||||
@@ -304,6 +305,27 @@ export function SubBlock({
|
||||
/>
|
||||
)
|
||||
}
|
||||
case 'trigger-config': {
|
||||
// For trigger config, we need to construct the value from multiple subblock values
|
||||
const triggerValue =
|
||||
isPreview && subBlockValues
|
||||
? {
|
||||
triggerId: subBlockValues.triggerId?.value,
|
||||
triggerPath: subBlockValues.triggerPath?.value,
|
||||
triggerConfig: subBlockValues.triggerConfig?.value,
|
||||
}
|
||||
: previewValue
|
||||
return (
|
||||
<TriggerConfig
|
||||
blockId={blockId}
|
||||
isConnecting={isConnecting}
|
||||
isPreview={isPreview}
|
||||
value={triggerValue}
|
||||
disabled={isDisabled}
|
||||
availableTriggers={config.availableTriggers}
|
||||
/>
|
||||
)
|
||||
}
|
||||
case 'schedule-config':
|
||||
return (
|
||||
<ScheduleConfig
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
import { BookOpen, Code, Info, RectangleHorizontal, RectangleVertical } from 'lucide-react'
|
||||
import { BookOpen, Code, Info, RectangleHorizontal, RectangleVertical, Zap } from 'lucide-react'
|
||||
import { useParams } from 'next/navigation'
|
||||
import { Handle, type NodeProps, Position, useUpdateNodeInternals } from 'reactflow'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
@@ -9,7 +9,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip
|
||||
import { parseCronToHumanReadable } from '@/lib/schedules/utils'
|
||||
import { cn, validateName } from '@/lib/utils'
|
||||
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
|
||||
import type { BlockConfig, SubBlockConfig } from '@/blocks/types'
|
||||
import type { BlockConfig, SubBlockConfig, SubBlockType } from '@/blocks/types'
|
||||
import { useCollaborativeWorkflow } from '@/hooks/use-collaborative-workflow'
|
||||
import { useExecutionStore } from '@/stores/execution/store'
|
||||
import { useWorkflowDiffStore } from '@/stores/workflow-diff'
|
||||
@@ -149,12 +149,14 @@ export function WorkflowBlock({ id, data }: NodeProps<WorkflowBlockProps>) {
|
||||
const blockWebhookStatus = !!(hasWebhookProvider && hasWebhookPath)
|
||||
|
||||
const blockAdvancedMode = useWorkflowStore((state) => state.blocks[id]?.advancedMode ?? false)
|
||||
const blockTriggerMode = useWorkflowStore((state) => state.blocks[id]?.triggerMode ?? false)
|
||||
|
||||
// Collaborative workflow actions
|
||||
const {
|
||||
collaborativeUpdateBlockName,
|
||||
collaborativeToggleBlockWide,
|
||||
collaborativeToggleBlockAdvancedMode,
|
||||
collaborativeToggleBlockTriggerMode,
|
||||
} = useCollaborativeWorkflow()
|
||||
|
||||
// Workflow store actions
|
||||
@@ -394,11 +396,24 @@ export function WorkflowBlock({ id, data }: NodeProps<WorkflowBlockProps>) {
|
||||
}
|
||||
|
||||
const isAdvancedMode = useWorkflowStore.getState().blocks[blockId]?.advancedMode ?? false
|
||||
const isTriggerMode = useWorkflowStore.getState().blocks[blockId]?.triggerMode ?? false
|
||||
|
||||
// Filter visible blocks and those that meet their conditions
|
||||
const visibleSubBlocks = subBlocks.filter((block) => {
|
||||
if (block.hidden) return false
|
||||
|
||||
// Special handling for trigger mode
|
||||
if (block.type === ('trigger-config' as SubBlockType)) {
|
||||
// Show trigger-config blocks when in trigger mode OR for pure trigger blocks
|
||||
const isPureTriggerBlock = config?.triggers?.enabled && config.category === 'triggers'
|
||||
return isTriggerMode || isPureTriggerBlock
|
||||
}
|
||||
|
||||
if (isTriggerMode && block.type !== ('trigger-config' as SubBlockType)) {
|
||||
// In trigger mode, hide all non-trigger-config blocks
|
||||
return false
|
||||
}
|
||||
|
||||
// Filter by mode if specified
|
||||
if (block.mode) {
|
||||
if (block.mode === 'basic' && isAdvancedMode) return false
|
||||
@@ -550,8 +565,8 @@ export function WorkflowBlock({ id, data }: NodeProps<WorkflowBlockProps>) {
|
||||
)}
|
||||
|
||||
<ActionBar blockId={id} blockType={type} disabled={!userPermissions.canEdit} />
|
||||
{/* Connection Blocks - Don't show for trigger blocks or starter blocks */}
|
||||
{config.category !== 'triggers' && type !== 'starter' && (
|
||||
{/* Connection Blocks - Don't show for trigger blocks, starter blocks, or blocks in trigger mode */}
|
||||
{config.category !== 'triggers' && type !== 'starter' && !blockTriggerMode && (
|
||||
<ConnectionBlocks
|
||||
blockId={id}
|
||||
setIsConnecting={setIsConnecting}
|
||||
@@ -560,8 +575,8 @@ export function WorkflowBlock({ id, data }: NodeProps<WorkflowBlockProps>) {
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Input Handle - Don't show for trigger blocks or starter blocks */}
|
||||
{config.category !== 'triggers' && type !== 'starter' && (
|
||||
{/* Input Handle - Don't show for trigger blocks, starter blocks, or blocks in trigger mode */}
|
||||
{config.category !== 'triggers' && type !== 'starter' && !blockTriggerMode && (
|
||||
<Handle
|
||||
type='target'
|
||||
position={horizontalHandles ? Position.Left : Position.Top}
|
||||
@@ -751,6 +766,40 @@ export function WorkflowBlock({ id, data }: NodeProps<WorkflowBlockProps>) {
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
{/* Trigger Mode Button - Show for hybrid blocks that support triggers (not pure trigger blocks) */}
|
||||
{config.triggers?.enabled && config.category !== 'triggers' && (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<Button
|
||||
variant='ghost'
|
||||
size='sm'
|
||||
onClick={() => {
|
||||
if (userPermissions.canEdit) {
|
||||
// Toggle trigger mode using collaborative function
|
||||
collaborativeToggleBlockTriggerMode(id)
|
||||
}
|
||||
}}
|
||||
className={cn(
|
||||
'h-7 p-1 text-gray-500',
|
||||
blockTriggerMode && 'text-[#22C55E]',
|
||||
!userPermissions.canEdit && 'cursor-not-allowed opacity-50'
|
||||
)}
|
||||
disabled={!userPermissions.canEdit}
|
||||
>
|
||||
<Zap className='h-5 w-5' />
|
||||
</Button>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent side='top'>
|
||||
{!userPermissions.canEdit
|
||||
? userPermissions.isOfflineMode
|
||||
? 'Connection lost - please refresh'
|
||||
: 'Read-only mode'
|
||||
: blockTriggerMode
|
||||
? 'Switch to Action Mode'
|
||||
: 'Switch to Trigger Mode'}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
)}
|
||||
{config.docsLink ? (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
@@ -925,8 +974,8 @@ export function WorkflowBlock({ id, data }: NodeProps<WorkflowBlockProps>) {
|
||||
isValidConnection={(connection) => connection.target !== id}
|
||||
/>
|
||||
|
||||
{/* Error Handle - Don't show for trigger blocks or starter blocks */}
|
||||
{config.category !== 'triggers' && type !== 'starter' && (
|
||||
{/* Error Handle - Don't show for trigger blocks, starter blocks, or blocks in trigger mode */}
|
||||
{config.category !== 'triggers' && type !== 'starter' && !blockTriggerMode && (
|
||||
<Handle
|
||||
type='source'
|
||||
position={horizontalHandles ? Position.Right : Position.Bottom}
|
||||
|
||||
@@ -98,6 +98,15 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
|
||||
condition: { field: 'operation', value: 'update' },
|
||||
required: true,
|
||||
},
|
||||
// TRIGGER MODE: Trigger configuration (only shown when trigger mode is active)
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Trigger Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'airtable',
|
||||
availableTriggers: ['airtable_webhook'],
|
||||
},
|
||||
],
|
||||
tools: {
|
||||
access: [
|
||||
@@ -176,5 +185,21 @@ export const AirtableBlock: BlockConfig<AirtableResponse> = {
|
||||
records: { type: 'json', description: 'Retrieved record data' }, // Optional: for list, create, updateMultiple
|
||||
record: { type: 'json', description: 'Single record data' }, // Optional: for get, update single
|
||||
metadata: { type: 'json', description: 'Operation metadata' }, // Required: present in all responses
|
||||
// Trigger outputs
|
||||
event_type: { type: 'string', description: 'Type of Airtable event' },
|
||||
base_id: { type: 'string', description: 'Airtable base identifier' },
|
||||
table_id: { type: 'string', description: 'Airtable table identifier' },
|
||||
record_id: { type: 'string', description: 'Record identifier that was modified' },
|
||||
record_data: {
|
||||
type: 'string',
|
||||
description: 'Complete record data (when Include Full Record Data is enabled)',
|
||||
},
|
||||
changed_fields: { type: 'string', description: 'Fields that were changed in the record' },
|
||||
webhook_id: { type: 'string', description: 'Unique webhook identifier' },
|
||||
timestamp: { type: 'string', description: 'Event timestamp' },
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['airtable_webhook'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -94,8 +94,8 @@ Example:
|
||||
params: { type: 'json', description: 'URL query parameters' },
|
||||
},
|
||||
outputs: {
|
||||
data: { type: 'any', description: 'Response data' },
|
||||
status: { type: 'number', description: 'HTTP status code' },
|
||||
headers: { type: 'json', description: 'Response headers' },
|
||||
data: { type: 'json', description: 'API response data (JSON, text, or other formats)' },
|
||||
status: { type: 'number', description: 'HTTP status code (200, 404, 500, etc.)' },
|
||||
headers: { type: 'json', description: 'HTTP response headers as key-value pairs' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export const BrowserUseBlock: BlockConfig<BrowserUseResponse> = {
|
||||
outputs: {
|
||||
id: { type: 'string', description: 'Task execution identifier' },
|
||||
success: { type: 'boolean', description: 'Task completion status' },
|
||||
output: { type: 'any', description: 'Task output data' },
|
||||
output: { type: 'json', description: 'Task output data' },
|
||||
steps: { type: 'json', description: 'Execution steps taken' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -53,6 +53,6 @@ Plain Text: Best for populating a table in free-form style.
|
||||
data: { type: 'json', description: 'Data to populate' },
|
||||
},
|
||||
outputs: {
|
||||
data: { type: 'any', description: 'Response data' },
|
||||
data: { type: 'json', description: 'Response data' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -212,6 +212,20 @@ export const DiscordBlock: BlockConfig<DiscordResponse> = {
|
||||
},
|
||||
outputs: {
|
||||
message: { type: 'string', description: 'Message content' },
|
||||
data: { type: 'any', description: 'Response data' },
|
||||
data: { type: 'json', description: 'Response data' },
|
||||
// Trigger outputs
|
||||
content: { type: 'string', description: 'Message content from Discord webhook' },
|
||||
username: { type: 'string', description: 'Username of the sender (if provided)' },
|
||||
avatar_url: { type: 'string', description: 'Avatar URL of the sender (if provided)' },
|
||||
timestamp: { type: 'string', description: 'Timestamp when the webhook was triggered' },
|
||||
webhook_id: { type: 'string', description: 'Discord webhook identifier' },
|
||||
webhook_token: { type: 'string', description: 'Discord webhook token' },
|
||||
guild_id: { type: 'string', description: 'Discord server/guild ID' },
|
||||
channel_id: { type: 'string', description: 'Discord channel ID where the event occurred' },
|
||||
embeds: { type: 'string', description: 'Embedded content data (if any)' },
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['discord_webhook'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ export const EvaluatorBlock: BlockConfig<EvaluatorResponse> = {
|
||||
outputs: {
|
||||
content: { type: 'string', description: 'Evaluation results' },
|
||||
model: { type: 'string', description: 'Model used' },
|
||||
tokens: { type: 'any', description: 'Token usage' },
|
||||
cost: { type: 'any', description: 'Cost information' },
|
||||
tokens: { type: 'json', description: 'Token usage' },
|
||||
cost: { type: 'json', description: 'Cost information' },
|
||||
} as any,
|
||||
}
|
||||
|
||||
@@ -111,7 +111,13 @@ export const FileBlock: BlockConfig<FileParserOutput> = {
|
||||
file: { type: 'json', description: 'Uploaded file data' },
|
||||
},
|
||||
outputs: {
|
||||
files: { type: 'json', description: 'Parsed file data' },
|
||||
combinedContent: { type: 'string', description: 'Combined file content' },
|
||||
files: {
|
||||
type: 'json',
|
||||
description: 'Array of parsed file objects with content, metadata, and file properties',
|
||||
},
|
||||
combinedContent: {
|
||||
type: 'string',
|
||||
description: 'All file contents merged into a single text string',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -121,11 +121,11 @@ export const FirecrawlBlock: BlockConfig<FirecrawlResponse> = {
|
||||
outputs: {
|
||||
// Scrape output
|
||||
markdown: { type: 'string', description: 'Page content markdown' },
|
||||
html: { type: 'any', description: 'Raw HTML content' },
|
||||
html: { type: 'string', description: 'Raw HTML content' },
|
||||
metadata: { type: 'json', description: 'Page metadata' },
|
||||
// Search output
|
||||
data: { type: 'json', description: 'Search results data' },
|
||||
warning: { type: 'any', description: 'Warning messages' },
|
||||
warning: { type: 'string', description: 'Warning messages' },
|
||||
// Crawl output
|
||||
pages: { type: 'json', description: 'Crawled pages data' },
|
||||
total: { type: 'number', description: 'Total pages found' },
|
||||
|
||||
@@ -80,7 +80,10 @@ try {
|
||||
timeout: { type: 'number', description: 'Execution timeout' },
|
||||
},
|
||||
outputs: {
|
||||
result: { type: 'any', description: 'Execution result' },
|
||||
stdout: { type: 'string', description: 'Console output' },
|
||||
result: { type: 'json', description: 'Return value from the executed JavaScript function' },
|
||||
stdout: {
|
||||
type: 'string',
|
||||
description: 'Console log output and debug messages from function execution',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
47
apps/sim/blocks/blocks/generic_webhook.ts
Normal file
47
apps/sim/blocks/blocks/generic_webhook.ts
Normal file
@@ -0,0 +1,47 @@
|
||||
import { WebhookIcon } from '@/components/icons'
|
||||
import type { BlockConfig } from '@/blocks/types'
|
||||
|
||||
export const GenericWebhookBlock: BlockConfig = {
|
||||
type: 'generic_webhook',
|
||||
name: 'Webhook',
|
||||
description: 'Receive webhooks from any service',
|
||||
category: 'triggers',
|
||||
icon: WebhookIcon,
|
||||
bgColor: '#10B981', // Green color for triggers
|
||||
|
||||
subBlocks: [
|
||||
// Generic webhook configuration - always visible
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Webhook Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'generic',
|
||||
availableTriggers: ['generic_webhook'],
|
||||
},
|
||||
],
|
||||
|
||||
tools: {
|
||||
access: [], // No external tools needed for triggers
|
||||
},
|
||||
|
||||
inputs: {}, // No inputs - webhook triggers receive data externally
|
||||
|
||||
outputs: {
|
||||
// Generic webhook outputs that can be used with any webhook payload
|
||||
payload: { type: 'json', description: 'Complete webhook payload' },
|
||||
headers: { type: 'json', description: 'Request headers' },
|
||||
method: { type: 'string', description: 'HTTP method' },
|
||||
url: { type: 'string', description: 'Request URL' },
|
||||
timestamp: { type: 'string', description: 'Webhook received timestamp' },
|
||||
// Common webhook fields that services often use
|
||||
event: { type: 'string', description: 'Event type from payload' },
|
||||
id: { type: 'string', description: 'Event ID from payload' },
|
||||
data: { type: 'json', description: 'Event data from payload' },
|
||||
},
|
||||
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['generic_webhook'],
|
||||
},
|
||||
}
|
||||
@@ -5,9 +5,9 @@ import type { GitHubResponse } from '@/tools/github/types'
|
||||
export const GitHubBlock: BlockConfig<GitHubResponse> = {
|
||||
type: 'github',
|
||||
name: 'GitHub',
|
||||
description: 'Interact with GitHub',
|
||||
description: 'Interact with GitHub or trigger workflows from GitHub events',
|
||||
longDescription:
|
||||
'Access GitHub repositories, pull requests, and comments through the GitHub API. Automate code reviews, PR management, and repository interactions within your workflow.',
|
||||
'Access GitHub repositories, pull requests, and comments through the GitHub API. Automate code reviews, PR management, and repository interactions within your workflow. Trigger workflows from GitHub events like push, pull requests, and issues.',
|
||||
docsLink: 'https://docs.sim.ai/tools/github',
|
||||
category: 'tools',
|
||||
bgColor: '#181C1E',
|
||||
@@ -86,6 +86,15 @@ export const GitHubBlock: BlockConfig<GitHubResponse> = {
|
||||
password: true,
|
||||
required: true,
|
||||
},
|
||||
// TRIGGER MODE: Trigger configuration (only shown when trigger mode is active)
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Trigger Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'github',
|
||||
availableTriggers: ['github_webhook'],
|
||||
},
|
||||
{
|
||||
id: 'commentType',
|
||||
title: 'Comment Type',
|
||||
@@ -164,5 +173,27 @@ export const GitHubBlock: BlockConfig<GitHubResponse> = {
|
||||
outputs: {
|
||||
content: { type: 'string', description: 'Response content' },
|
||||
metadata: { type: 'json', description: 'Response metadata' },
|
||||
// Trigger outputs
|
||||
action: { type: 'string', description: 'The action that was performed' },
|
||||
event_type: { type: 'string', description: 'Type of GitHub event' },
|
||||
repository: { type: 'string', description: 'Repository full name' },
|
||||
repository_name: { type: 'string', description: 'Repository name only' },
|
||||
repository_owner: { type: 'string', description: 'Repository owner username' },
|
||||
sender: { type: 'string', description: 'Username of the user who triggered the event' },
|
||||
sender_id: { type: 'string', description: 'User ID of the sender' },
|
||||
ref: { type: 'string', description: 'Git reference (for push events)' },
|
||||
before: { type: 'string', description: 'SHA of the commit before the push' },
|
||||
after: { type: 'string', description: 'SHA of the commit after the push' },
|
||||
commits: { type: 'string', description: 'Array of commit objects (for push events)' },
|
||||
pull_request: { type: 'string', description: 'Pull request object (for pull_request events)' },
|
||||
issue: { type: 'string', description: 'Issue object (for issues events)' },
|
||||
comment: { type: 'string', description: 'Comment object (for comment events)' },
|
||||
branch: { type: 'string', description: 'Branch name extracted from ref' },
|
||||
commit_message: { type: 'string', description: 'Latest commit message' },
|
||||
commit_author: { type: 'string', description: 'Author of the latest commit' },
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['github_webhook'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { GmailToolResponse } from '@/tools/gmail/types'
|
||||
export const GmailBlock: BlockConfig<GmailToolResponse> = {
|
||||
type: 'gmail',
|
||||
name: 'Gmail',
|
||||
description: 'Send Gmail',
|
||||
description: 'Send Gmail or trigger workflows from Gmail events',
|
||||
longDescription:
|
||||
'Integrate Gmail functionality to send email messages within your workflow. Automate email communications and process email content using OAuth authentication.',
|
||||
'Comprehensive Gmail integration with OAuth authentication. Send email messages, read email content, and trigger workflows from Gmail events like new emails and label changes.',
|
||||
docsLink: 'https://docs.sim.ai/tools/gmail',
|
||||
category: 'tools',
|
||||
bgColor: '#E0E0E0',
|
||||
@@ -145,6 +145,15 @@ export const GmailBlock: BlockConfig<GmailToolResponse> = {
|
||||
placeholder: 'Maximum number of results (default: 10)',
|
||||
condition: { field: 'operation', value: ['search_gmail', 'read_gmail'] },
|
||||
},
|
||||
// TRIGGER MODE: Trigger configuration (only shown when trigger mode is active)
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Trigger Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'gmail',
|
||||
availableTriggers: ['gmail_poller'],
|
||||
},
|
||||
],
|
||||
tools: {
|
||||
access: ['gmail_send', 'gmail_draft', 'gmail_read', 'gmail_search'],
|
||||
@@ -200,11 +209,27 @@ export const GmailBlock: BlockConfig<GmailToolResponse> = {
|
||||
maxResults: { type: 'number', description: 'Maximum results' },
|
||||
},
|
||||
outputs: {
|
||||
// Tool outputs
|
||||
content: { type: 'string', description: 'Response content' },
|
||||
metadata: { type: 'json', description: 'Email metadata' },
|
||||
attachments: {
|
||||
type: 'json',
|
||||
description: 'Email attachments (when includeAttachments is enabled)',
|
||||
},
|
||||
attachments: { type: 'json', description: 'Email attachments array' },
|
||||
// Trigger outputs
|
||||
email_id: { type: 'string', description: 'Gmail message ID' },
|
||||
thread_id: { type: 'string', description: 'Gmail thread ID' },
|
||||
subject: { type: 'string', description: 'Email subject line' },
|
||||
from: { type: 'string', description: 'Sender email address' },
|
||||
to: { type: 'string', description: 'Recipient email address' },
|
||||
cc: { type: 'string', description: 'CC recipients (comma-separated)' },
|
||||
date: { type: 'string', description: 'Email date in ISO format' },
|
||||
body_text: { type: 'string', description: 'Plain text email body' },
|
||||
body_html: { type: 'string', description: 'HTML email body' },
|
||||
labels: { type: 'string', description: 'Email labels (comma-separated)' },
|
||||
has_attachments: { type: 'boolean', description: 'Whether email has attachments' },
|
||||
raw_email: { type: 'json', description: 'Complete raw email data from Gmail API (if enabled)' },
|
||||
timestamp: { type: 'string', description: 'Event timestamp' },
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['gmail_poller'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -240,13 +240,24 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
|
||||
issueType: { type: 'string', description: 'Issue type' },
|
||||
},
|
||||
outputs: {
|
||||
ts: { type: 'string', description: 'Timestamp' },
|
||||
issueKey: { type: 'string', description: 'Issue key' },
|
||||
summary: { type: 'string', description: 'Issue summary' },
|
||||
description: { type: 'string', description: 'Issue description' },
|
||||
created: { type: 'string', description: 'Creation date' },
|
||||
updated: { type: 'string', description: 'Update date' },
|
||||
success: { type: 'boolean', description: 'Operation success' },
|
||||
url: { type: 'string', description: 'Issue URL' },
|
||||
// Common outputs across all Jira operations
|
||||
ts: { type: 'string', description: 'Timestamp of the operation' },
|
||||
|
||||
// jira_retrieve (read) outputs
|
||||
issueKey: { type: 'string', description: 'Issue key (e.g., PROJ-123)' },
|
||||
summary: { type: 'string', description: 'Issue summary/title' },
|
||||
description: { type: 'string', description: 'Issue description content' },
|
||||
created: { type: 'string', description: 'Issue creation date' },
|
||||
updated: { type: 'string', description: 'Issue last update date' },
|
||||
|
||||
// jira_update outputs
|
||||
success: { type: 'boolean', description: 'Whether the update operation was successful' },
|
||||
|
||||
// jira_write (create) outputs
|
||||
url: { type: 'string', description: 'URL to the created/accessed issue' },
|
||||
|
||||
// jira_bulk_read outputs (array of issues)
|
||||
// Note: bulk_read returns an array in the output field, each item contains:
|
||||
// ts, summary, description, created, updated
|
||||
},
|
||||
}
|
||||
|
||||
@@ -295,8 +295,8 @@ export const Mem0Block: BlockConfig<Mem0Response> = {
|
||||
limit: { type: 'number', description: 'Result limit' },
|
||||
},
|
||||
outputs: {
|
||||
ids: { type: 'any', description: 'Memory identifiers' },
|
||||
memories: { type: 'any', description: 'Memory data' },
|
||||
searchResults: { type: 'any', description: 'Search results' },
|
||||
ids: { type: 'json', description: 'Memory identifiers' },
|
||||
memories: { type: 'json', description: 'Memory data' },
|
||||
searchResults: { type: 'json', description: 'Search results' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ export const MemoryBlock: BlockConfig = {
|
||||
content: { type: 'string', description: 'Memory content' },
|
||||
},
|
||||
outputs: {
|
||||
memories: { type: 'any', description: 'Memory data' },
|
||||
memories: { type: 'json', description: 'Memory data' },
|
||||
id: { type: 'string', description: 'Memory identifier' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -197,13 +197,19 @@ export const MicrosoftExcelBlock: BlockConfig<MicrosoftExcelResponse> = {
|
||||
valueInputOption: { type: 'string', description: 'Value input option' },
|
||||
},
|
||||
outputs: {
|
||||
data: { type: 'json', description: 'Sheet data' },
|
||||
metadata: { type: 'json', description: 'Operation metadata' },
|
||||
updatedRange: { type: 'string', description: 'Updated range' },
|
||||
updatedRows: { type: 'number', description: 'Updated rows count' },
|
||||
updatedColumns: { type: 'number', description: 'Updated columns count' },
|
||||
updatedCells: { type: 'number', description: 'Updated cells count' },
|
||||
index: { type: 'number', description: 'Row index' },
|
||||
values: { type: 'json', description: 'Table values' },
|
||||
data: { type: 'json', description: 'Excel range data with sheet information and cell values' },
|
||||
metadata: {
|
||||
type: 'json',
|
||||
description: 'Spreadsheet metadata including ID, URL, and sheet details',
|
||||
},
|
||||
updatedRange: { type: 'string', description: 'The range that was updated (write operations)' },
|
||||
updatedRows: { type: 'number', description: 'Number of rows updated (write operations)' },
|
||||
updatedColumns: { type: 'number', description: 'Number of columns updated (write operations)' },
|
||||
updatedCells: {
|
||||
type: 'number',
|
||||
description: 'Total number of cells updated (write operations)',
|
||||
},
|
||||
index: { type: 'number', description: 'Row index for table add operations' },
|
||||
values: { type: 'json', description: 'Cell values array for table add operations' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -221,8 +221,42 @@ export const MicrosoftTeamsBlock: BlockConfig<MicrosoftTeamsResponse> = {
|
||||
content: { type: 'string', description: 'Message content' },
|
||||
},
|
||||
outputs: {
|
||||
content: { type: 'string', description: 'Message content' },
|
||||
metadata: { type: 'json', description: 'Message metadata' },
|
||||
updatedContent: { type: 'boolean', description: 'Content update status' },
|
||||
// Read operation outputs
|
||||
content: { type: 'string', description: 'Formatted message content from chat/channel' },
|
||||
metadata: { type: 'json', description: 'Message metadata with full details' },
|
||||
messageCount: { type: 'number', description: 'Number of messages retrieved' },
|
||||
messages: { type: 'json', description: 'Array of message objects' },
|
||||
totalAttachments: { type: 'number', description: 'Total number of attachments' },
|
||||
attachmentTypes: { type: 'json', description: 'Array of attachment content types' },
|
||||
// Write operation outputs
|
||||
updatedContent: {
|
||||
type: 'boolean',
|
||||
description: 'Whether content was successfully updated/sent',
|
||||
},
|
||||
messageId: { type: 'string', description: 'ID of the created/sent message' },
|
||||
createdTime: { type: 'string', description: 'Timestamp when message was created' },
|
||||
url: { type: 'string', description: 'Web URL to the message' },
|
||||
// Individual message fields (from read operations)
|
||||
sender: { type: 'string', description: 'Message sender display name' },
|
||||
messageTimestamp: { type: 'string', description: 'Individual message timestamp' },
|
||||
messageType: {
|
||||
type: 'string',
|
||||
description: 'Type of message (message, systemEventMessage, etc.)',
|
||||
},
|
||||
// Trigger outputs
|
||||
type: { type: 'string', description: 'Type of Teams message' },
|
||||
id: { type: 'string', description: 'Unique message identifier' },
|
||||
timestamp: { type: 'string', description: 'Message timestamp' },
|
||||
localTimestamp: { type: 'string', description: 'Local timestamp of the message' },
|
||||
serviceUrl: { type: 'string', description: 'Microsoft Teams service URL' },
|
||||
channelId: { type: 'string', description: 'Teams channel ID where the event occurred' },
|
||||
from_id: { type: 'string', description: 'User ID who sent the message' },
|
||||
from_name: { type: 'string', description: 'Username who sent the message' },
|
||||
conversation_id: { type: 'string', description: 'Conversation/thread ID' },
|
||||
text: { type: 'string', description: 'Message text content' },
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['microsoftteams_webhook'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -308,7 +308,17 @@ export const NotionBlock: BlockConfig<NotionResponse> = {
|
||||
filterType: { type: 'string', description: 'Filter type' },
|
||||
},
|
||||
outputs: {
|
||||
content: { type: 'string', description: 'Page content' },
|
||||
metadata: { type: 'any', description: 'Page metadata' },
|
||||
// Common outputs across all Notion operations
|
||||
content: {
|
||||
type: 'string',
|
||||
description: 'Page content, search results, or confirmation messages',
|
||||
},
|
||||
|
||||
// Metadata object containing operation-specific information
|
||||
metadata: {
|
||||
type: 'json',
|
||||
description:
|
||||
'Metadata containing operation-specific details including page/database info, results, and pagination data',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -145,6 +145,15 @@ export const OutlookBlock: BlockConfig<OutlookResponse> = {
|
||||
placeholder: 'Number of emails to retrieve (default: 1, max: 10)',
|
||||
condition: { field: 'operation', value: 'read_outlook' },
|
||||
},
|
||||
// TRIGGER MODE: Trigger configuration (only shown when trigger mode is active)
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Trigger Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'outlook',
|
||||
availableTriggers: ['outlook_poller'],
|
||||
},
|
||||
],
|
||||
tools: {
|
||||
access: ['outlook_send', 'outlook_draft', 'outlook_read'],
|
||||
@@ -193,7 +202,36 @@ export const OutlookBlock: BlockConfig<OutlookResponse> = {
|
||||
maxResults: { type: 'number', description: 'Maximum emails' },
|
||||
},
|
||||
outputs: {
|
||||
// Common outputs
|
||||
message: { type: 'string', description: 'Response message' },
|
||||
results: { type: 'json', description: 'Email results' },
|
||||
results: { type: 'json', description: 'Operation results' },
|
||||
// Send operation specific outputs
|
||||
status: { type: 'string', description: 'Email send status (sent)' },
|
||||
timestamp: { type: 'string', description: 'Operation timestamp' },
|
||||
// Draft operation specific outputs
|
||||
messageId: { type: 'string', description: 'Draft message ID' },
|
||||
subject: { type: 'string', description: 'Draft email subject' },
|
||||
// Read operation specific outputs
|
||||
emailCount: { type: 'number', description: 'Number of emails retrieved' },
|
||||
emails: { type: 'json', description: 'Array of email objects' },
|
||||
emailId: { type: 'string', description: 'Individual email ID' },
|
||||
emailSubject: { type: 'string', description: 'Individual email subject' },
|
||||
bodyPreview: { type: 'string', description: 'Email body preview' },
|
||||
bodyContent: { type: 'string', description: 'Full email body content' },
|
||||
sender: { type: 'json', description: 'Email sender information' },
|
||||
from: { type: 'json', description: 'Email from information' },
|
||||
recipients: { type: 'json', description: 'Email recipients' },
|
||||
receivedDateTime: { type: 'string', description: 'Email received timestamp' },
|
||||
sentDateTime: { type: 'string', description: 'Email sent timestamp' },
|
||||
hasAttachments: { type: 'boolean', description: 'Whether email has attachments' },
|
||||
isRead: { type: 'boolean', description: 'Whether email is read' },
|
||||
importance: { type: 'string', description: 'Email importance level' },
|
||||
// Trigger outputs
|
||||
email: { type: 'json', description: 'Email data from trigger' },
|
||||
rawEmail: { type: 'json', description: 'Complete raw email data from Microsoft Graph API' },
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['outlook_poller'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -283,11 +283,11 @@ export const PineconeBlock: BlockConfig<PineconeResponse> = {
|
||||
},
|
||||
|
||||
outputs: {
|
||||
matches: { type: 'any', description: 'Search matches' },
|
||||
upsertedCount: { type: 'any', description: 'Upserted count' },
|
||||
data: { type: 'any', description: 'Response data' },
|
||||
model: { type: 'any', description: 'Model information' },
|
||||
vector_type: { type: 'any', description: 'Vector type' },
|
||||
usage: { type: 'any', description: 'Usage statistics' },
|
||||
matches: { type: 'json', description: 'Search matches' },
|
||||
upsertedCount: { type: 'number', description: 'Upserted count' },
|
||||
data: { type: 'json', description: 'Response data' },
|
||||
model: { type: 'string', description: 'Model information' },
|
||||
vector_type: { type: 'string', description: 'Vector type' },
|
||||
usage: { type: 'json', description: 'Usage statistics' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -198,9 +198,9 @@ export const QdrantBlock: BlockConfig<QdrantResponse> = {
|
||||
},
|
||||
|
||||
outputs: {
|
||||
matches: { type: 'any', description: 'Search matches' },
|
||||
upsertedCount: { type: 'any', description: 'Upserted count' },
|
||||
data: { type: 'any', description: 'Response data' },
|
||||
status: { type: 'any', description: 'Operation status' },
|
||||
matches: { type: 'json', description: 'Search matches' },
|
||||
upsertedCount: { type: 'number', description: 'Upserted count' },
|
||||
data: { type: 'json', description: 'Response data' },
|
||||
status: { type: 'string', description: 'Operation status' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -188,8 +188,8 @@ export const RouterBlock: BlockConfig<RouterResponse> = {
|
||||
outputs: {
|
||||
content: { type: 'string', description: 'Routing response content' },
|
||||
model: { type: 'string', description: 'Model used' },
|
||||
tokens: { type: 'any', description: 'Token usage' },
|
||||
cost: { type: 'any', description: 'Cost information' },
|
||||
tokens: { type: 'json', description: 'Token usage' },
|
||||
cost: { type: 'json', description: 'Cost information' },
|
||||
selectedPath: { type: 'json', description: 'Selected routing path' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { SlackResponse } from '@/tools/slack/types'
|
||||
export const SlackBlock: BlockConfig<SlackResponse> = {
|
||||
type: 'slack',
|
||||
name: 'Slack',
|
||||
description: 'Send messages to Slack',
|
||||
description: 'Send messages to Slack or trigger workflows from Slack events',
|
||||
longDescription:
|
||||
"Comprehensive Slack integration with OAuth authentication. Send formatted messages using Slack's mrkdwn syntax.",
|
||||
"Comprehensive Slack integration with OAuth authentication. Send formatted messages using Slack's mrkdwn syntax or trigger workflows from Slack events like mentions and messages.",
|
||||
docsLink: 'https://docs.sim.ai/tools/slack',
|
||||
category: 'tools',
|
||||
bgColor: '#611f69',
|
||||
@@ -151,6 +151,15 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
|
||||
value: 'read',
|
||||
},
|
||||
},
|
||||
// TRIGGER MODE: Trigger configuration (only shown when trigger mode is active)
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Trigger Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'slack',
|
||||
availableTriggers: ['slack_webhook'],
|
||||
},
|
||||
],
|
||||
tools: {
|
||||
access: ['slack_message', 'slack_canvas', 'slack_message_reader'],
|
||||
@@ -257,10 +266,30 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
|
||||
oldest: { type: 'string', description: 'Oldest timestamp' },
|
||||
},
|
||||
outputs: {
|
||||
ts: { type: 'string', description: 'Message timestamp' },
|
||||
channel: { type: 'string', description: 'Channel identifier' },
|
||||
canvas_id: { type: 'string', description: 'Canvas identifier' },
|
||||
// slack_message outputs
|
||||
ts: { type: 'string', description: 'Message timestamp returned by Slack API' },
|
||||
channel: { type: 'string', description: 'Channel identifier where message was sent' },
|
||||
|
||||
// slack_canvas outputs
|
||||
canvas_id: { type: 'string', description: 'Canvas identifier for created canvases' },
|
||||
title: { type: 'string', description: 'Canvas title' },
|
||||
messages: { type: 'json', description: 'Message data' },
|
||||
|
||||
// slack_message_reader outputs
|
||||
messages: {
|
||||
type: 'json',
|
||||
description: 'Array of message objects',
|
||||
},
|
||||
|
||||
// Trigger outputs (when used as webhook trigger)
|
||||
event_type: { type: 'string', description: 'Type of Slack event that triggered the workflow' },
|
||||
channel_name: { type: 'string', description: 'Human-readable channel name' },
|
||||
user_name: { type: 'string', description: 'Username who triggered the event' },
|
||||
team_id: { type: 'string', description: 'Slack workspace/team ID' },
|
||||
event_id: { type: 'string', description: 'Unique event identifier for the trigger' },
|
||||
},
|
||||
// New: Trigger capabilities
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['slack_webhook'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -71,6 +71,6 @@ export const StagehandAgentBlock: BlockConfig<StagehandAgentResponse> = {
|
||||
},
|
||||
outputs: {
|
||||
agentResult: { type: 'json', description: 'Agent execution result' },
|
||||
structuredOutput: { type: 'any', description: 'Structured output data' },
|
||||
structuredOutput: { type: 'json', description: 'Structured output data' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -206,7 +206,13 @@ export const SupabaseBlock: BlockConfig<SupabaseResponse> = {
|
||||
limit: { type: 'number', description: 'Result limit' },
|
||||
},
|
||||
outputs: {
|
||||
message: { type: 'string', description: 'Operation message' },
|
||||
results: { type: 'json', description: 'Query results' },
|
||||
message: {
|
||||
type: 'string',
|
||||
description: 'Success or error message describing the operation outcome',
|
||||
},
|
||||
results: {
|
||||
type: 'json',
|
||||
description: 'Database records returned from query, insert, update, or delete operations',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export const TavilyBlock: BlockConfig<TavilyResponse> = {
|
||||
},
|
||||
outputs: {
|
||||
results: { type: 'json', description: 'Search results data' },
|
||||
answer: { type: 'any', description: 'Search answer' },
|
||||
answer: { type: 'string', description: 'Search answer' },
|
||||
query: { type: 'string', description: 'Query used' },
|
||||
content: { type: 'string', description: 'Extracted content' },
|
||||
title: { type: 'string', description: 'Page title' },
|
||||
|
||||
@@ -5,9 +5,9 @@ import type { TelegramMessageResponse } from '@/tools/telegram/types'
|
||||
export const TelegramBlock: BlockConfig<TelegramMessageResponse> = {
|
||||
type: 'telegram',
|
||||
name: 'Telegram',
|
||||
description: 'Send a message through Telegram',
|
||||
description: 'Send messages through Telegram or trigger workflows from Telegram events',
|
||||
longDescription:
|
||||
'Send messages to any Telegram channel using your Bot API key. Integrate automated notifications and alerts into your workflow to keep your team informed.',
|
||||
'Send messages to any Telegram channel using your Bot API key or trigger workflows from Telegram bot messages. Integrate automated notifications and alerts into your workflow to keep your team informed.',
|
||||
docsLink: 'https://docs.sim.ai/tools/telegram',
|
||||
category: 'tools',
|
||||
bgColor: '#E0E0E0',
|
||||
@@ -48,6 +48,15 @@ export const TelegramBlock: BlockConfig<TelegramMessageResponse> = {
|
||||
placeholder: 'Enter the message to send',
|
||||
required: true,
|
||||
},
|
||||
// TRIGGER MODE: Trigger configuration (only shown when trigger mode is active)
|
||||
{
|
||||
id: 'triggerConfig',
|
||||
title: 'Trigger Configuration',
|
||||
type: 'trigger-config',
|
||||
layout: 'full',
|
||||
triggerProvider: 'telegram',
|
||||
availableTriggers: ['telegram_webhook'],
|
||||
},
|
||||
],
|
||||
tools: {
|
||||
access: ['telegram_message'],
|
||||
@@ -58,7 +67,38 @@ export const TelegramBlock: BlockConfig<TelegramMessageResponse> = {
|
||||
text: { type: 'string', description: 'Message text' },
|
||||
},
|
||||
outputs: {
|
||||
ok: { type: 'boolean', description: 'Success status' },
|
||||
result: { type: 'json', description: 'Message result' },
|
||||
// Send message operation outputs
|
||||
ok: { type: 'boolean', description: 'API response success status' },
|
||||
result: { type: 'json', description: 'Complete message result object from Telegram API' },
|
||||
// Specific result fields
|
||||
messageId: { type: 'number', description: 'Sent message ID' },
|
||||
chatId: { type: 'number', description: 'Chat ID where message was sent' },
|
||||
chatType: { type: 'string', description: 'Type of chat (private, group, supergroup, channel)' },
|
||||
username: { type: 'string', description: 'Chat username (if available)' },
|
||||
messageDate: { type: 'number', description: 'Unix timestamp of sent message' },
|
||||
messageText: { type: 'string', description: 'Text content of sent message' },
|
||||
// Webhook trigger outputs (incoming messages)
|
||||
update_id: { type: 'number', description: 'Unique identifier for the update' },
|
||||
message_id: { type: 'number', description: 'Unique message identifier from webhook' },
|
||||
from_id: { type: 'number', description: 'User ID who sent the message' },
|
||||
from_username: { type: 'string', description: 'Username of the sender' },
|
||||
from_first_name: { type: 'string', description: 'First name of the sender' },
|
||||
from_last_name: { type: 'string', description: 'Last name of the sender' },
|
||||
chat_id: { type: 'number', description: 'Unique identifier for the chat' },
|
||||
chat_type: {
|
||||
type: 'string',
|
||||
description: 'Type of chat (private, group, supergroup, channel)',
|
||||
},
|
||||
chat_title: { type: 'string', description: 'Title of the chat (for groups and channels)' },
|
||||
text: { type: 'string', description: 'Message text content from webhook' },
|
||||
date: { type: 'number', description: 'Date the message was sent (Unix timestamp)' },
|
||||
entities: {
|
||||
type: 'json',
|
||||
description: 'Special entities in the message (mentions, hashtags, etc.)',
|
||||
},
|
||||
},
|
||||
triggers: {
|
||||
enabled: true,
|
||||
available: ['telegram_webhook'],
|
||||
},
|
||||
}
|
||||
|
||||
@@ -99,6 +99,6 @@ export const TranslateBlock: BlockConfig = {
|
||||
outputs: {
|
||||
content: { type: 'string', description: 'Translated text' },
|
||||
model: { type: 'string', description: 'Model used' },
|
||||
tokens: { type: 'any', description: 'Token usage' },
|
||||
tokens: { type: 'json', description: 'Token usage' },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -68,8 +68,8 @@ export const TwilioSMSBlock: BlockConfig<TwilioSMSBlockOutput> = {
|
||||
},
|
||||
outputs: {
|
||||
success: { type: 'boolean', description: 'Send success status' },
|
||||
messageId: { type: 'any', description: 'Message identifier' },
|
||||
status: { type: 'any', description: 'Delivery status' },
|
||||
error: { type: 'any', description: 'Error information' },
|
||||
messageId: { type: 'string', description: 'Twilio message SID' },
|
||||
status: { type: 'string', description: 'SMS delivery status (queued, sent, delivered, etc.)' },
|
||||
error: { type: 'string', description: 'Error information if sending fails' },
|
||||
},
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user