diff --git a/pages/home/glossary.mdx b/pages/home/glossary.mdx index 0f6a5ba0..0478f717 100644 --- a/pages/home/glossary.mdx +++ b/pages/home/glossary.mdx @@ -30,6 +30,16 @@ Tools are commonly referred to by a qualified name that includes their toolkit. *Learn more about [tools](/home/build-tools/create-a-toolkit).* +#### LLM-native tools + +[LLM-native tools](/home/use-tools/types-of-tools#llm-native-tools) are designed from scratch to provide the best performance for LLMs in terms of speed, reliability, accuracy, and cost-effectiveness. + +#### API wrapper tools + +[API wrapper tools](/home/use-tools/types-of-tools#api-wrapper-tools) are designed to mirror the original API design of the third-party service. They are not optimized for LLM usage and are not subject to evaluation suites. We recommend thoroughly evaluating each API wrapper tool with your Agents or chatbots before using it in production. + +Understand why [LLMs usually perform poorly](/home/use-tools/types-of-tools#why-llms-perform-poorly-when-calling-http-apis) when calling HTTP APIs. + ### Tool Context 'Tool context' is an object that is passed to a tool as a parameter when the tool is executed. It contains information about the tool call, the user for which the tool is being called, and any secrets the tool requires to run. diff --git a/pages/home/use-tools/_meta.ts b/pages/home/use-tools/_meta.ts index a4c3d622..359904c0 100644 --- a/pages/home/use-tools/_meta.ts +++ b/pages/home/use-tools/_meta.ts @@ -1,4 +1,5 @@ export default { "tools-overview": "Introduction", "get-tool-definitions": "Tool formats", + "types-of-tools": "Types of tools", }; diff --git a/pages/home/use-tools/types-of-tools.mdx b/pages/home/use-tools/types-of-tools.mdx new file mode 100644 index 00000000..7c71e741 --- /dev/null +++ b/pages/home/use-tools/types-of-tools.mdx @@ -0,0 +1,65 @@ +--- +title: "Types of Tools" +description: "Learn about LLM-native and API wrapper tools" +--- + +# Types of Tools + +Arcade offers two types of tools: + +- API wrapper tools +- LLM-native tools + +The distinction is merely a matter of how they are designed. Both types of tools can be used seamlessly in the same way. There is no difference in their interfaces, the way they are called, or how you interact with them through the Arcade [Dashboard](https://api.arcade.dev/dashboard/) or the Arcade [SDK clients](/home/arcade-clients). + +Before we understand the two types, let's first understand the background for why we need to differentiate between them. + + +## Why LLMs perform poorly when calling HTTP APIs + +Traditionally, the HTTP APIs offered by upstream services such as GitHub, Google, Slack, etc., were designed to be consumed by human software engineers. When we expose such interfaces for LLMs to call as tools, they usually do not perform very well. + +One of the main reasons is that the data model of the HTTP API rarely matches the data model of an AI-powered chat interface. + +For instance, consider the following user prompt: + +> "Send a DM to John asking about a project update" + +The data model mismatches are: + +| Item | Chat interface | Slack HTTP API | +| --- | --- | --- | +| Action | Send message to a user | Send message to a channel | +| Argument | `username = "John"` | `channel_id = ???` | + + +In order to bridge the gap in the data models, the LLM has to make multiple API calls: + +1. Retrieve the current user's Slack ID +2. Browse the list of users to find John's ID +3. Open a direct message between the user and John, and get the channel ID +4. Send the message to the channel + +Even the most powerful LLMs usually perform poorly when they need to reason such complex workflows on the fly, not to mention the increased cost and risk of hallucinations. As a result, AI Agents and chatbots that rely on HTTP APIs often end up being unreliable. + +## LLM-native tools + +Arcade's LLM-native toolkits are designed to match the typical data models expected in AI-powered chat interfaces and are subject to evaluation suites to ensure LLMs can safely use them. + +Following the example above, our Slack toolkit offers the [`Slack.SendMessage`](/toolkits/social-communication/slack#slacksendmessage) tool, which accepts a `username` as argument, matching exactly both the action and argument value expected to be present in the LLM context window. + +When a user says "Send a DM to John asking about a project update", the LLM can directly call the `Slack.SendMessage` tool with the `username` argument, and the tool will take care of the rest. + +LLM-native tools dramatically improve the speed, reliability and cost-effectiveness of AI Agents and chatbots. + +Since they require careful design and evaluation, LLM-native tools take time and effort to build. We understand that your Agent or chatbot project might need capabilities not yet covered by our LLM-native toolkits. For this reason, we also offer low-level API wrapper toolkits. + +## API wrapper tools + +To provide your Agent or chatbot with more freedom to interact with the upstream services, we offer API wrapper toolkits. + +API wrapper tools are heavily influenced by the original API design. Each tool mirrors one HTTP endpoint. + +Although we redesign the tool name and argument descriptions to make them more suitable for LLMs, API wrapper tools are still not optimized for LLM usage. Also, they are not subject to evaluation suites like LLM-native tools. For those reasons, we recommend thoroughly evaluating each API wrapper tool with your Agents or chatbots before using it in production. + +When your Agent's needs are covered by an LLM-native tool, we recommend using it instead of an API wrapper. Use API wrappers as a complement. Carefully engineer your prompts to ensure your Agent can call them safely. diff --git a/pages/toolkits/social-communication/slack_api.mdx b/pages/toolkits/social-communication/slack_api.mdx new file mode 100644 index 00000000..24bf10cb --- /dev/null +++ b/pages/toolkits/social-communication/slack_api.mdx @@ -0,0 +1,1941 @@ +# SlackApi + +import ApiWrapperInfo from "@/components/ApiWrapperInfo"; +import ToolInfo from "@/components/ToolInfo"; +import Badges from "@/components/Badges"; +import TabbedCodeBlock from "@/components/TabbedCodeBlock"; +import TableOfContents from "@/components/TableOfContents"; +import ToolFooter from "@/components/ToolFooter"; + + + + + + + + +The SlackApi toolkit offers a comprehensive set of pre-built tools for interacting with Slack. These tools make it easy to build agents and AI apps that can: + +- Send, schedule, edit, delete, and retrieve messages (including ephemeral messages and thread messages). +- Search and manage files and remote files (search, get metadata, upload URLs, share remote files, enable public sharing). +- Manage conversations and channels (create/join/open/resume conversations, list accessible conversations and channels, invite users, fetch members, set read cursor). +- Manage user and team data (find users by email, get user profiles/presence/identity, list workspace users/owners, fetch team and workspace info and preferences, workspace name/description updates). +- Manage user groups and memberships (create, update, enable/disable user groups, update group users, list channels for usergroup). +- Handle calls and participants (register calls, add/remove participants, get call info). +- Manage bookmarks, pins, and pinned items (list, add, edit, remove). +- Manage reactions and emojis (add/remove reactions, list/rename/add emoji aliases, list enterprise emojis). +- Admin and invite workflows (list/approve/deny/shared invites, accept Slack Connect invites, list approved/denied/pending workspace invite requests). +- Retrieve logs, audit, and org-level info (integration logs, billable users, teams in enterprise, enterprise emoji lists). +- Token and API utilities (revoke tokens, verify API calling code, custom URL unfurls, get message permalinks). + +These tools cover messaging automation, user and group administration, file and emoji management, call coordination, and enterprise/admin operations within Slack. + + +## Available Tools + + + + + If you need to perform an action that's not listed here, you can [get in touch + with us](mailto:contact@arcade.dev) to request a new tool, or [create your + own tools](/home/build-tools/create-a-toolkit). + + +## SlackApi.GetSlackRemoteFilesInfo + +
+ + +Retrieve information about remote files added to Slack. + +**Parameters** + +- **filter_by_channel_id** (`string`, optional) Filter remote files to only include those appearing in the specified Slack channel, indicated by its channel ID. +- **pagination_cursor** (`string`, optional) A cursor for paginating through data. Use the `next_cursor` from a prior request to fetch the next set of results. Defaults to the first page if not set. +- **maximum_items_to_return** (`integer`, optional) Specify the maximum number of remote file records to retrieve from Slack. +- **filter_files_from_timestamp** (`string`, optional) Filter files created after this inclusive timestamp. Use a Unix timestamp format. (default: '0') +- **timestamp_filter_end** (`string`, optional) Filter files created before this timestamp (inclusive) in Unix epoch time format. (default: 'now') + + +## SlackApi.GetSlackThreadMessages + +
+ + +Retrieve messages from a Slack conversation thread. + +**Parameters** + +- **conversation_id** (`string`, required) The ID of the Slack conversation from which to fetch the message thread. +- **thread_message_timestamp** (`string`, required) Unique identifier of a parent message or a thread message (timestamp). Fetches the thread or the single message. +- **pagination_cursor** (`string`, optional) Cursor for pagination. Use the `next_cursor` from a previous response to fetch the next page of data. +- **latest_message_timestamp** (`string`, optional) Only include messages posted before this Unix timestamp in the results. (default: 'now') +- **maximum_items_to_return** (`integer`, optional) Specify the maximum number of messages to fetch. The default and maximum are 15 for certain apps, with possible rate limits. (default: '1000') +- **start_time_unix_timestamp** (`string`, optional) Only include messages after this Unix timestamp in results. (default: '0') +- **include_all_message_metadata** (`boolean`, optional) Set to true to return all metadata associated with this message. +- **include_boundary_timestamps** (`boolean`, optional) Include messages with 'oldest' or 'latest' timestamps. Ignored unless either timestamp is specified. + + +## SlackApi.SearchSlackMessages + +
+ + +Search Slack messages based on a query. + +**Parameters** + +- **search_query** (`string`, required) The text to search for in Slack messages. Use keywords or phrases to narrow down results. +- **results_per_page** (`integer`, optional) The number of search results to return per page, with a maximum limit of 100. (default: '20') +- **page_number** (`integer`, optional) The page number of search results to retrieve, maximum value of 100. (default: '1') +- **pagination_cursor** (`string`, optional) Use '*' for the first call to start pagination or provide the 'next_cursor' value from previous results to continue. +- **sort_results_by** (`string`, optional) Specify the criterion for sorting the search results, either by 'score' for relevance or 'timestamp' for chronological order. (default: 'score') +- **sort_direction** (`string`, optional) Specify the order for sorting results: use 'asc' for ascending or 'desc' for descending. (default: 'desc') +- **team_id** (`string`, optional) The encoded team ID to search within. Required only if an organization-level token is used. Ignored for workspace-level tokens. +- **enable_query_highlighting** (`boolean`, optional) Set to true to enable query highlight markers, marking matching terms in the results. + + +## SlackApi.AddSlackReaction + +
+ + +Add a reaction to a Slack item. + +**Parameters** + +- **slack_channel_id** (`string`, required) ID of the channel where the message is posted. Use to specify the location for adding a reaction. +- **reaction_emoji_name** (`string`, required) The name of the emoji to be used as a reaction. Include skin tone modifiers if applicable (e.g., 'thumbsup::skin-tone-2'). +- **message_timestamp** (`string`, required) The timestamp of the message to which the reaction will be added. Ensure the format matches the Slack API requirements. + + +## SlackApi.SendSlackMessage + +
+ + +Sends a message to a Slack channel. + +**Parameters** + +- **target_channel_id_or_name** (`string`, required) The encoded ID or name of the channel, private group, or IM where the message will be sent. Retrieve using Slack's conversations.list API. +- **message_attachments** (`array[string]`, optional) A JSON array of structured attachment objects for the message, provided as a URL-encoded string. Example: `[{"pretext": "pre-hello", "text": "text-world"}]`. +- **structured_blocks** (`array[string]`, optional) A JSON-based array of structured blocks for constructing messages using Block Kit. Provide as a URL-encoded string. Include fallback text if necessary. +- **emoji_icon_for_message** (`string`, optional) Emoji to display as the icon for the Slack message. Overrides any image URL icon. +- **message_icon_url** (`string`, optional) URL to an image to use as the icon for the message. Overrides any specified icon emoji. +- **message_markdown** (`string`, optional) The message text formatted using markdown, up to 12,000 characters. Cannot be used with `blocks` or `text`. +- **message_metadata** (`string`, optional) A JSON object with 'event_type' and 'event_payload' fields, URL-encoded, providing additional metadata for the message. +- **parse_mode** (`string`, optional) Specifies how the message content should be treated. Options are 'none' to remove hyperlinks or 'full' to ignore markdown formatting. +- **message_text** (`string`, optional) The main text of the message. Acts as the primary message or a fallback for notifications when using blocks. Supports plain text or markdown. +- **thread_timestamp** (`string`, optional) Timestamp of the parent message to which this message will be a reply. Use the parent's `ts` value, not a reply's. +- **bot_username** (`string`, optional) The display name to use for the bot when sending the message to Slack. +- **post_as_authenticated_user** (`boolean`, optional) Set to true to post the message as the authenticated user instead of as a bot. Only applicable for classic apps. +- **link_user_groups** (`boolean`, optional) Enable linking of user groups in the message. Individual user linking is not supported. +- **enable_slack_markup_parsing** (`boolean`, optional) Set to true to enable Slack markup parsing in the message. Default is enabled. +- **broadcast_reply_to_channel** (`boolean`, optional) Set to true to make the reply visible to everyone in the channel when responding to a thread. Use with 'thread_ts'. Default is false. +- **enable_unfurling_text_content** (`boolean`, optional) Set to true to enable unfurling of primarily text-based content in Slack messages. +- **disable_media_unfurling** (`boolean`, optional) Set to false to enable media unfurling and true to disable it. (default: 'false') + + +## SlackApi.SetWorkspaceDescription + +
+ + +Update the description of a Slack workspace. + +**Parameters** + +- **workspace_id** (`string`, required) The unique identifier for the Slack workspace where the description will be updated. +- **workspace_description** (`string`, required) The new description to set for the Slack workspace. Provide a clear and concise text. + + +## SlackApi.FindSlackUserByEmail + +
+ + +Find a Slack user using their email address. + +**Parameters** + +- **user_email_address** (`string`, required) The email address of the user in the Slack workspace to search for. + + +## SlackApi.GetIntegrationLogs + +
+ + +Retrieve integration logs for the current Slack team. + +**Parameters** + +- **filter_by_app_id** (`string`, optional) Filter integration logs to a specific Slack app. If not provided, logs for all apps are retrieved. +- **filter_by_change_type** (`string`, optional) Specify the change type to filter logs. Options: 'added', 'removed', 'enabled', 'disabled', 'updated'. Defaults to all logs. +- **result_count** (`string`, optional) The number of log entries to retrieve. Specify the maximum number of logs to return in a single request. (default: '100') +- **result_page_number** (`string`, optional) The specific page number of the integration logs to retrieve. Used for pagination. (default: '1') +- **filter_by_service_id** (`string`, optional) Specify the service ID to filter integration logs related to a specific service. If not provided, logs for all services will be retrieved. +- **encoded_team_id** (`string`, optional) The encoded team ID to get logs from, required if using an org-level token. Ignored if using a workspace-level token. +- **filter_by_user** (`string`, optional) Filter logs generated by a specific user's actions. Defaults to all logs if not specified. + + +## SlackApi.CheckSlackDiscoverability + +
+ + +Check if an email is discoverable on Slack. + +**Parameters** + +- **email_to_check** (`string`, required) The email address to verify if it is associated with a discoverable Slack user. + + +## SlackApi.PinItemToSlackChannel + +
+ + +Pin an item to a Slack channel. + +**Parameters** + +- **channel_id** (`string`, required) The ID of the Slack channel where the message will be pinned. A `timestamp` must also be provided. +- **message_timestamp** (`string`, optional) The timestamp (`ts`) of the message to pin in the Slack channel. Ensure the channel is also specified. + + +## SlackApi.ShareRemoteFileInChannel + +
+ + +Share a remote file into a Slack channel. + +**Parameters** + +- **target_channel_ids** (`string`, required) Comma-separated list of Slack channel IDs where the remote file will be shared. Ensure IDs are valid and the user has permission to share files in these channels. +- **file_external_identifier** (`string`, optional) The globally unique identifier (GUID) for the file set by the app when registering with Slack. Required if 'file' is not provided. +- **file_id** (`string`, optional) The ID of a file registered with Slack to be shared. Required if `external_id` is not provided. + + +## SlackApi.DisableUserGroup + +
+ + +Disable an existing Slack User Group. + +**Parameters** + +- **user_group_id** (`string`, required) The encoded ID of the User Group to be disabled. +- **team_id** (`string`, optional) Encoded target team ID where the user group exists. Required only if using an org-level token; ignored for workspace-level tokens. +- **include_user_count** (`boolean`, optional) Include the number of users in the User Group. Set to true to include the count. + + +## SlackApi.SetSlackWorkspaceName + +
+ + +Update the name of a Slack workspace. + +**Parameters** + +- **workspace_id** (`string`, required) Unique identifier for the Slack workspace whose name you want to update. +- **new_workspace_name** (`string`, required) The desired new name for the Slack workspace. This replaces the existing name. + + +## SlackApi.AcceptSlackInvite + +
+ + +Accept invitations to a Slack Connect channel. + +**Parameters** + +- **channel_name** (`string`, required) Provide the desired name for the Slack Connect channel. If the channel doesn't exist in your workspace, this name will be assigned to it. +- **invite_id** (`string`, optional) ID of the invitation you want to accept. Must provide either this or channel_id. +- **slack_channel_id_to_accept** (`string`, optional) The ID of the channel you would like to accept the invitation for. Either this or `invite_id` is required. +- **workspace_id** (`string`, optional) The ID of the workspace where the channel should be accepted. Required if using an org-level token. +- **is_channel_private** (`boolean`, optional) True to make the channel private; false to make it public. +- **use_free_trial** (`boolean`, optional) Set to 'True' to use your workspace's free trial to start using Slack Connect. + + +## SlackApi.GetSlackTeamPreferences + +
+ + +Retrieve a list of a workspace's team preferences. + +**Parameters** + +This tool does not take any parameters. + +## SlackApi.ListSlackTeamUsers + +
+ + +Fetches a list of all users in a Slack team. + +**Parameters** + +- **pagination_cursor** (`string`, optional) Cursor for paginating through data. Use the `next_cursor` from a previous response to continue. +- **maximum_items_to_return** (`integer`, optional) Maximum number of users to return (recommended max is 200 for pagination). +- **slack_team_id** (`string`, optional) The encoded team ID to list users from, necessary if an organization-level token is used. Ignored if a workspace-level token is provided. +- **include_user_locale** (`boolean`, optional) Set to true to receive locale information for each user. Default is false. + + +## SlackApi.EnableSlackUserGroup + +
+ + +Enable a user group in Slack. + +**Parameters** + +- **user_group_id** (`string`, required) The encoded ID of the User Group to be enabled in Slack. +- **team_id** (`string`, optional) Provide the encoded team ID where the user group is located. Only required if using an org-level token. Ignored with workspace-level tokens. +- **include_user_count** (`boolean`, optional) Set to true to include the number of users in the User Group. + + +## SlackApi.ScheduleSlackMessage + +
+ + +Schedule a message to be sent later in Slack. + +**Parameters** + +- **slack_channel_id_or_name** (`string`, required) Specify the target Slack channel, private group, or DM. Use an encoded ID or the channel name. Retrieve channel ID via `conversations.list`. +- **schedule_time_unix_timestamp** (`integer`, required) Unix timestamp for when the message should be posted to Slack. Must be within 120 days and not exceed 30 messages per 5-minute window. +- **attachments_json** (`string[string]`, optional) A JSON array of structured attachments as a URL-encoded string for the Slack message. +- **structured_blocks_json** (`string[string]`, optional) A URL-encoded string of a JSON-based array containing structured blocks for message formatting. +- **message_markdown** (`string`, optional) Message text in markdown format. Avoid using with 'blocks' or 'text'. Maximum 12,000 characters. +- **message_parsing_mode** (`string`, optional) Specifies how the message content should be parsed and interpreted when sending to Slack. For more details, refer to chat.postMessage documentation. +- **message_text** (`string`, optional) The main body of the Slack message or a fallback text when using blocks. Can be plain text or formatted with mrkdwn. +- **parent_message_timestamp** (`string`, optional) Timestamp of the parent message to which this message is a reply. Use the original message's timestamp, not a reply's timestamp. +- **metadata_json** (`string`, optional) JSON object containing 'event_type' and 'event_payload' fields. Must be URL-encoded. Note: using this will prevent scheduled messages from posting. +- **enable_group_linking** (`boolean`, optional) Set to true to link user groups in the message. Linking individual users is not supported; use mention syntax instead. +- **make_reply_visible_to_everyone** (`boolean`, optional) Set to true to make the reply visible to everyone in the channel or conversation. Use with `thread_ts`. Defaults to false. +- **enable_link_unfurling** (`boolean`, optional) Pass true to enable unfurling of primarily text-based content. +- **disable_unfurling_of_media_content** (`boolean`, optional) Set to true to disable unfurling of media content. Defaults to false. + + +## SlackApi.CustomUnfurlSlackUrls + +
+ + +Provide custom unfurl behavior for user-posted URLs on Slack. + +**Parameters** + +- **channel_id** (`string`, required) ID of the Slack channel where the message is posted. Required with 'ts' for custom unfurl or with 'unfurl_id' and 'source'. +- **message_timestamp** (`string`, required) Timestamp of the message to which unfurl behavior will be added. Ensure it corresponds to a message in the specified channel containing a fully-qualified URL registered with your Slack app. +- **unfurl_url_map** (`string`, required) A URL-encoded JSON map with URLs as keys and their corresponding unfurl data as values. Each URL should point to a single attachment, like message buttons. +- **authentication_invitation_message** (`string`, optional) A simple formatted string sent as an ephemeral message inviting the user to authenticate for full unfurl behavior. Supports Slack's *bold*, _italics_, and linking formatting. If provided, this takes precedence over `authentication_invitation_url`. +- **custom_authentication_url** (`string`, optional) A URL to redirect users for app authentication to enable full URL unfurling, requires URL encoding. +- **user_authentication_blocks** (`array[string]`, optional) A URL-encoded JSON array of structured blocks to send as an ephemeral message for user authentication invitation. +- **unfurl_link_id** (`string`, optional) The ID of the link to unfurl. Must be used with 'source'. +- **link_source** (`string`, optional) Specify the source of the link to unfurl as either 'composer' for links inside the message composer or 'conversations_history' for links posted to a conversation. Must be used with 'unfurl_id', or alternatively with 'channel' and 'ts'. +- **require_user_authentication** (`boolean`, optional) Set to true if the user must install your Slack app to trigger unfurls for this domain. + + +## SlackApi.ListSlackEnterpriseEmojis + +
+ + +Retrieve emojis for a Slack Enterprise organization. + +**Parameters** + +- **pagination_cursor** (`string`, optional) Cursor for fetching the next page of emojis. Use 'next_cursor' from the previous response. +- **max_items_to_return** (`integer`, optional) The maximum number of emojis to return, between 1 and 1000 inclusive. (default: '100') + + +## SlackApi.RevokeSlackToken + +
+ + +Revoke a Slack authentication token. + +**Parameters** + +- **trigger_testing_mode** (`boolean`, optional) Set to true to trigger testing mode where the token will not be revoked. Useful for testing. + + +## SlackApi.ListWorkspaceUsers + +
+ + +Retrieve a list of users from a Slack workspace. + +**Parameters** + +- **workspace_team_id** (`string`, optional) The ID of the Slack workspace (e.g., T1234) to filter users from. Only users from this workspace will be listed. +- **pagination_cursor** (`string`, optional) Use this to navigate through paginated results by setting it to the `next_cursor` from a previous response. +- **user_retrieval_limit** (`integer`, optional) Maximum number of users to retrieve per page from the Slack workspace. (default: '100') +- **return_only_active_users** (`boolean`, optional) Return only active users if true; return only deactivated users if false. Default is true. +- **include_deactivated_user_workspaces** (`boolean`, optional) Include workspaces for users even if they are deactivated. Only applies with org token and no team_id. Default is false. +- **return_only_guest_users** (`boolean`, optional) If true, returns only guests and their expiration dates that belong to the specified team_id. + + +## SlackApi.CreateSlackConversation + +
+ + +Create a new public or private Slack conversation. + +**Parameters** + +- **channel_name** (`string`, required) The name of the new Slack channel to create. It must contain only lowercase letters, numbers, hyphens, and underscores, and be 80 characters or less. +- **encoded_team_id** (`string`, optional) The encoded team ID where the channel will be created. Required when using an organization-level token. Ignored if using a workspace-level token. +- **create_private_channel** (`boolean`, optional) Set to true to create a private channel instead of a public one. + + +## SlackApi.ApproveSlackChannelInvitation + +
+ + +Approve an invitation to a Slack Connect channel. + +**Parameters** + +- **shared_channel_invite_id** (`string`, required) The ID of the shared channel invitation you want to approve. It is required to specifically identify which invitation is being approved for the Slack Connect channel. +- **other_party_team_id** (`string`, optional) The team or enterprise ID of the other party involved in the Slack Connect invitation you are approving. + + +## SlackApi.RemoveReactionFromItem + +
+ + +Remove a reaction from a Slack item. + +**Parameters** + +- **reaction_emoji_name** (`string`, required) The name of the emoji reaction to be removed, such as 'smile' or 'thumbsup'. +- **target_file_id** (`string`, optional) The identifier of the file from which to remove the reaction. Specify either this, `target_file_comment_id`, or both `target_channel_id` and `target_message_timestamp`. +- **file_comment_id** (`string`, optional) The ID of the file comment from which you want to remove the reaction. Provide this if the reaction is on a file comment. +- **message_channel_id** (`string`, optional) Channel ID where the message to remove the reaction from was posted. Required if removing a reaction from a message. Use in combination with 'message_timestamp'. +- **message_timestamp** (`string`, optional) The exact timestamp of the message from which to remove the reaction. Specify when targeting a message. + + +## SlackApi.RemoveSlackBookmark + +
+ + +Remove a bookmark from a Slack channel. + +**Parameters** + +- **slack_channel_id_to_remove_bookmark** (`string`, required) The ID of the Slack channel from which the bookmark should be removed. This ID specifies the target channel and is required to locate and delete the bookmark. +- **bookmark_id_to_remove** (`string`, required) The ID of the bookmark to be removed from a Slack channel. Ensure it is specified correctly to delete the correct bookmark. +- **quip_section_id** (`string`, optional) The ID of the Quip section to unbookmark. This is required to specify which section's bookmark should be removed. + + +## SlackApi.SendEphemeralMessageSlack + +
+ + +Send an ephemeral message to a user in a Slack channel. + +**Parameters** + +- **target_channel** (`string`, required) The channel, private group, or IM channel where the ephemeral message will be sent. Accepts an encoded ID or the channel's name. +- **recipient_user_id** (`string`, required) The ID of the user who will receive the ephemeral message. Must be in the specified channel. +- **structured_attachments** (`array[string]`, optional) A JSON-encoded array of structured attachments for the message. Presented as a URL-encoded string. +- **structured_blocks** (`array[string]`, optional) A URL-encoded JSON array of structured Slack block elements. Use for rich message formatting. +- **message_icon_emoji** (`string`, optional) Emoji to display as the message icon, overriding icon_url. Specify using the emoji name like :smile:. +- **message_icon_url** (`string`, optional) URL for the image to be used as the icon for the message. It overrides the icon_emoji if provided. +- **message_markdown_text** (`string`, optional) The main text formatted in markdown to be sent as an ephemeral message. Do not use with `blocks` or `text`. Character limit: 12,000. +- **message_parse_mode** (`string`, optional) Specifies how the message text is interpreted. Options are: 'none', 'full', 'mrkdwn', or 'false'. Defaults to 'none'. (default: 'none') +- **ephemeral_message_text** (`string`, optional) The main text of the ephemeral message for Slack. It acts as a fallback when using blocks; can be formatted as plain text or markdown. Limit to a few thousand bytes. +- **parent_message_timestamp** (`string`, optional) The timestamp of the parent message to post this ephemeral message in its thread. Ensure there is already an active thread. +- **bot_username** (`string`, optional) The username for the bot sending the ephemeral message. This sets the display name in the Slack message. +- **link_names_auto_link** (`boolean`, optional) Set to true to automatically find and link channel names and usernames. + + +## SlackApi.GetRemoteFileInfoSlack + +
+ + +Retrieve details about a remote file from Slack. + +**Parameters** + +- **file_external_identifier** (`string`, optional) The GUID defined by the creator for the remote file to retrieve its information. +- **file_id** (`string`, optional) The unique identifier of the file to retrieve information about. Use this to specify the file in Slack. + + +## SlackApi.UpdateSlackUserGroup + +
+ + +Update an existing User Group in Slack. + +**Parameters** + +- **user_group_id** (`string`, required) The encoded ID of the User Group to update in Slack. +- **default_channel_ids** (`array[string]`, optional) A comma-separated list of channel IDs where the User Group is set as default. Use encoded channel IDs. +- **additional_channel_ids** (`array[string]`, optional) Comma separated encoded channel IDs for custom additions to user group members. +- **user_group_description** (`string`, optional) A short description of the User Group to update in Slack. This should clearly define the group's purpose or role. +- **user_group_handle** (`string`, optional) Unique mention handle for the User Group, distinct from all channels, users, and other User Groups. +- **user_group_name** (`string`, optional) A unique name for the User Group to update. Ensure it does not duplicate any existing User Group names. +- **team_id_for_org_token** (`string`, optional) Encoded team ID where the user group exists, required for org-level tokens. Ignored if using a workspace-level token. +- **include_user_count** (`boolean`, optional) Set to true to include the number of users in the User Group. +- **enable_sidebar_section** (`boolean`, optional) Set to true to configure the user group to appear as a sidebar section for all group members. Only relevant if the group has 1 or more default channels. + + +## SlackApi.AddSlackEmojiAlias + +
+ + +Add an emoji alias in a Slack Enterprise organization. + +**Parameters** + +- **emoji_alias_name** (`string`, required) The new alias for the specified emoji. Whitespace or colons will be automatically trimmed. +- **target_emoji_name** (`string`, required) The name of the existing emoji to which the new alias is being added. Remove any surrounding whitespace or colons. + + +## SlackApi.CheckApiCallingCode + +
+ + +Verify the correctness of API calling code for Slack. + +**Parameters** + +- **simulate_error_response** (`string`, optional) Specify an error code to simulate an error response for testing API calls. Useful for testing error handling. + + +## SlackApi.RenameSlackEmoji + +
+ + +Rename an emoji in a Slack Enterprise organization. + +**Parameters** + +- **current_emoji_name** (`string`, required) The current name of the emoji to be renamed. Colons (:myemoji:) around the value are optional. +- **new_emoji_name** (`string`, required) The new name to assign to the emoji in the Slack Enterprise organization. + + +## SlackApi.ListApprovedWorkspaceInviteRequests + +
+ + +Retrieve all approved workspace invite requests from Slack. + +**Parameters** + +- **workspace_id** (`string`, optional) ID for the Slack workspace where the invite requests were made. Required if the Enterprise org has more than one workspace. +- **pagination_cursor** (`string`, optional) Value of the `next_cursor` from the previous API response for paginating results. +- **result_limit** (`integer`, optional) Specify the number of results to return, between 1 and 1000 inclusive. (default: '100') + + +## SlackApi.ListSlackUserGroups + +
+ + +Retrieve all user groups for a Slack team. + +**Parameters** + +- **team_id_for_org_token** (`string`, optional) Encoded team ID required when using an org-level token. Ignored if using a workspace-level token. +- **include_user_count** (`boolean`, optional) Set to true to include the number of users in each User Group. +- **include_disabled_groups** (`boolean`, optional) Set to true to include disabled user groups in the results. +- **include_users_in_group** (`boolean`, optional) Include the list of users for each User Group in the response. + + +## SlackApi.GetSlackMessagePermalink + +
+ + +Retrieve a permalink URL for a specific Slack message. + +**Parameters** + +- **channel_id** (`string`, required) The unique identifier of the Slack conversation or channel containing the message. +- **message_timestamp** (`string`, required) The unique timestamp of the message to retrieve the permalink for. It identifies the message within the Slack channel. + + +## SlackApi.RegisterSlackCall + +
+ + +Registers a new call on Slack. + +**Parameters** + +- **unique_call_id** (`string`, required) A unique ID for the Call, provided by the 3rd-party Call provider. Ensure it is unique across all calls from your service. +- **call_join_url** (`string`, required) The URL required for a client to join the Call on Slack. +- **optional_human_readable_display_id** (`string`, optional) An optional, human-readable ID for the call, supplied by the third-party provider. This ID will be displayed in the Call object if given. +- **desktop_app_join_url** (`string`, optional) The URL used to directly launch the 3rd-party Call from Slack clients, if provided. +- **call_start_timestamp** (`integer`, optional) Unix timestamp indicating when the call is scheduled to start. +- **call_title** (`string`, optional) The name of the Call to be registered on Slack. This title will be used to identify the Call within Slack. +- **call_creator_user_id** (`string`, optional) The valid Slack user ID of the creator of this call. Optional if using a user token, which defaults to the authed user. +- **participants_info** (`array[string]`, optional) A list of participants to register for the call, including 'slack_id', 'external_id', 'display_name', and 'avatar_url' for each user. + + +## SlackApi.JoinSlackConversation + +
+ + +Join an existing conversation in Slack. + +**Parameters** + +- **conversation_id** (`string`, required) The ID of the conversation or channel you want to join in Slack. + + +## SlackApi.GetTeamBillableUsersInfo + +
+ + +Retrieves billable users info for the current Slack team. + +**Parameters** + +- **pagination_cursor** (`string`, optional) Cursor for pagination. Use the `next_cursor` from the previous response to fetch the next page of users. (default: 'fetches the first page') +- **maximum_items_to_return** (`integer`, optional) Specifies the maximum number of billable user entries to be retrieved. +- **specific_user_id** (`string`, optional) The ID of a specific user to retrieve billable information for. Leave empty to retrieve info for all users. +- **encoded_team_id** (`string`, optional) Encoded team ID for retrieving billable info, required if using an org token. Ignored with workspace-level tokens. + + +## SlackApi.UpdateSlackUsergroupUsers + +
+ + +Update the list of users in a Slack user group. + +**Parameters** + +- **user_group_id** (`string`, required) The encoded ID of the Slack user group to update. +- **user_ids_list** (`array[string]`, required) A comma separated string of encoded Slack user IDs representing the complete user list for the group. This replaces all current members. +- **team_id_for_org_token** (`string`, optional) Encoded team ID where the user group exists. Required if using an organization token; ignored with workspace-level token. +- **update_additional_channels** (`array[string]`, optional) Encoded channel IDs to add user group members to, separated by commas. These represent additional channels for custom user group member additions. +- **include_user_count** (`boolean`, optional) Set to true to include the number of users in the user group in the response. +- **is_shared_section** (`boolean`, optional) Indicates if the API call involves a shared section. Set to true if it does, otherwise false. + + +## SlackApi.SetSlackChannelReadCursor + +
+ + +Update the read cursor in a Slack channel. + +**Parameters** + +- **channel_id** (`string`, required) The ID of the Slack channel or conversation where you want to set the read cursor. This should be a valid Slack channel ID. +- **timestamp_of_message_to_mark_as_read** (`string`, required) The unique identifier (timestamp) of the message you want to mark as most recently seen in the conversation. + + +## SlackApi.ListAccessibleSlackConversations + +
+ + +Retrieve a list of conversations the user can access on Slack. + +**Parameters** + +- **pagination_cursor** (`string`, optional) A cursor for pagination to continue listing conversations from a specific point. Use the 'next_cursor' from a previous response. Default is the first page. +- **maximum_items_to_return** (`integer`, optional) The maximum number of conversations to return in the response. Must be an integer with a maximum value of 999. It is recommended to request no more than 200 results at a time for optimal performance. (default: '100') +- **slack_team_id** (`string`, optional) The encoded ID of the Slack team to list conversations for. Required if using an organization-level token. Ignored if a workspace-level token is used. +- **channel_types** (`string`, optional) Comma-separated list of channel types to filter conversations. Options: public_channel, private_channel, mpim, im. (default: 'public_channel') +- **specific_user_id** (`string`, optional) Filter conversations by a specific user ID's membership. Only includes conversations shared with the calling user. +- **exclude_archived_channels** (`boolean`, optional) Set to true to exclude archived channels from the retrieved list of Slack conversations. (default: false) + + +## SlackApi.ListSlackWorkspaceOwners + +
+ + +Retrieve all owners in a Slack workspace. + +**Parameters** + +- **workspace_id** (`string`, required) The unique identifier of the Slack workspace for which to list the owners. +- **maximum_items_to_return** (`integer`, optional) Specifies the maximum number of owners to return, ranging from 1 to 1000. (default: '100') +- **pagination_cursor** (`string`, optional) The cursor from the previous response used to fetch the next page of owners. Leave empty for the first page. + + +## SlackApi.OpenOrResumeSlackConversation + +
+ + +Open or resume a direct or multi-person message in Slack. + +**Parameters** + +- **conversation_channel_id** (`string`, optional) The ID of an existing direct or multi-person message channel to resume. Alternatively, provide the `users` field to start a new conversation. +- **target_user_ids** (`string`, optional) A comma-separated list of user IDs to open or resume a conversation. Provide 1 to 8 IDs. Supplying 1 ID opens a 1:1 DM, while more than 1 ID opens a multi-person DM. Do not include the caller's ID. +- **return_full_im_channel_definition** (`boolean`, optional) Set to true to receive the entire IM channel definition; false returns only the conversation ID. +- **prevent_creation** (`boolean`, optional) If true, does not create a new conversation and instead checks for an existing DM or MPDM. + + +## SlackApi.InviteUserToSlackChannel + +
+ + +Invite users to a Slack channel. + +**Parameters** + +- **slack_channel_id** (`string`, required) The ID of the Slack channel to invite users to. It can be a public or private channel ID. +- **user_ids_list** (`string`, required) A list of up to 100 user IDs to invite, separated by commas. +- **continue_with_valid_users** (`boolean`, optional) Set to true to invite valid users while ignoring invalid IDs when multiple user IDs are provided. Default is false. + + +## SlackApi.ListSlackChannels + +
+ + +Retrieve a list of all channels in a Slack team. + +**Parameters** + +- **pagination_cursor** (`string`, optional) The cursor used to paginate through data collections. Use the `next_cursor` from a previous response to continue; omit for the first page. +- **maximum_number_of_channels** (`integer`, optional) Specify the maximum number of channels to return. Must be an integer under 1000. Note that fewer channels than requested may be returned. (default: '100') +- **team_id_for_org_app** (`string`, optional) Encoded team ID to list channels. Required for org-level tokens; ignored for workspace-level tokens. +- **channel_types** (`string[string]`, optional) Comma-separated list of channel types to include, e.g., 'public_channel', 'private_channel', 'mpim', 'im'. (default: 'public_channel') +- **exclude_archived_channels** (`boolean`, optional) Set to true to exclude archived channels from the list of Slack channels. Default is false. + + +## SlackApi.GetSlackUserProfile + +
+ + +Retrieve Slack user profile information and custom status. + +**Parameters** + +- **target_user_id** (`string`, optional) The unique identifier of the Slack user whose profile information is to be retrieved. +- **include_labels** (`boolean`, optional) Include labels for each ID in custom profile fields. This option can heavily rate-limit requests and is not recommended. Default is false. + + +## SlackApi.ListSharedChannelInvites + +
+ + +Retrieve unapproved shared channel invites from Slack. + +**Parameters** + +- **workspace_team_id** (`string`, optional) The encoded team ID for the workspace to retrieve invites from. Required when using an organization token. +- **maximum_invites_to_return** (`integer`, optional) Specify the maximum number of unapproved shared channel invites to retrieve. (default: '100') +- **pagination_cursor** (`string`, optional) The cursor for paginating through results, obtained from a previous call's next_cursor. + + +## SlackApi.ListPendingWorkspaceInvites + +
+ + +Retrieve all pending workspace invite requests from Slack. + +**Parameters** + +- **workspace_id** (`string`, optional) The ID of the workspace to list pending invite requests from. Required for multi-workspace enterprises. +- **pagination_cursor** (`string`, optional) The cursor value for fetching the next set of invite requests. Use the `next_cursor` from the previous response if available. +- **result_limit** (`integer`, optional) The number of invite requests to return per call, must be between 1 and 1000. (default: '100') + + +## SlackApi.EnableSlackFileSharing + +
+ + +Enable a Slack file for public sharing. + +**Parameters** + +- **file_id_to_share** (`string`, required) The ID of the file on Slack that you want to enable for public sharing. + + +## SlackApi.AddCallParticipants + +
+ + +Add new participants to a Slack call. + +**Parameters** + +- **call_id** (`string`, required) The unique identifier for the call, as returned by the `calls.add` method. This ID specifies which call the participants will be added to. +- **participant_users** (`array[string]`, required) List of users to add, specified by `slack_id` or `external_id`. Include optional `display_name` and `avatar_url` for each user. + + +## SlackApi.EditSlackBookmark + +
+ + +Edit an existing bookmark in a Slack channel. + +**Parameters** + +- **slack_channel_id** (`string`, required) The ID of the Slack channel where the bookmark will be updated. +- **target_bookmark_id** (`string`, required) The unique identifier of the bookmark you want to update. +- **bookmark_title** (`string`, optional) The new title for the bookmark to update. +- **bookmark_link** (`string`, optional) URL of the bookmark to be edited. Ensure it is a valid format starting with http or https. +- **emoji_tag** (`string`, optional) The emoji tag to apply to the bookmark link. It should be a valid emoji code (e.g., :smile:). + + +## SlackApi.GetTeamProfile + +
+ + +Retrieve a team's profile information from Slack. + +**Parameters** + +- **visibility_filter** (`string`, optional) Filter the profile fields based on visibility. Options: 'all', 'visible', 'hidden'. Default is 'all'. + + +## SlackApi.ListPinnedItems + +
+ + +Retrieve items pinned to a Slack channel. + +**Parameters** + +- **channel_id** (`string`, required) The ID of the Slack channel to retrieve pinned items from. This is required to specify which channel's pinned items will be listed. + + +## SlackApi.GetSlackConversationMembers + +
+ + +Retrieve members from a specified Slack conversation. + +**Parameters** + +- **conversation_id** (`string`, required) The ID of the Slack conversation to retrieve members from. This can be a channel, group, or direct message. +- **pagination_cursor** (`string`, optional) Cursor for pagination, set to the `next_cursor` value from a previous response to continue retrieving members from a conversation. +- **max_items_to_return** (`integer`, optional) The maximum number of conversation members to return. Recommended to specify a value under 1000, with no more than 200 results at a time for optimal pagination. (default: '100') + + +## SlackApi.GetSlackUserPresence + +
+ + +Retrieve user presence information from Slack. + +**Parameters** + +- **target_user_id** (`string`, optional) The Slack user ID for which you want to retrieve presence information. (default: 'authed user') + + +## SlackApi.GetUserIdentity + +
+ + +Retrieve a user's identity information from Slack. + +**Parameters** + +This tool does not take any parameters. + +## SlackApi.FetchWorkspaceSettingsInfo + +
+ + +Retrieve settings information for a Slack workspace. + +**Parameters** + +- **slack_team_id** (`string`, required) The unique identifier of the Slack workspace (team) for which to fetch the settings information. + + +## SlackApi.ListCustomEmojiForTeam + +
+ + +Retrieve a list of custom emojis for a specific team. + +**Parameters** + +- **include_emoji_categories** (`boolean`, optional) Set to true to include categories for Unicode emojis in the response. + + +## SlackApi.CreateSlackUserGroup + +
+ + +Creates a new user group in Slack. + +**Parameters** + +- **user_group_name** (`string`, required) A unique name for the user group to be created, distinguishing it from other user groups. +- **default_channel_ids** (`array[string]`, optional) A list of channel IDs to set as default for the User Group. Use comma-separated values. +- **custom_additional_channels** (`array[string]`, optional) Comma-separated encoded channel IDs where the User Group can add members. +- **user_group_description** (`string`, optional) A brief text describing the purpose or role of the user group in Slack. +- **unique_mention_handle** (`string`, optional) A unique mention handle for the user group. It must not duplicate existing handles of channels, users, or other user groups. +- **team_id_for_user_group_creation** (`string`, optional) Encoded team ID for the user group creation, required if using an org-level token. +- **include_user_count** (`boolean`, optional) Set to true to include the number of users in each User Group. +- **enable_display_as_sidebar_section** (`boolean`, optional) Set to true to display the user group as a sidebar section for all group members if the group has one or more default channels. + + +## SlackApi.RemoveCallParticipants + +
+ + +Remove participants from a Slack call. + +**Parameters** + +- **call_id** (`string`, required) The unique identifier for the call from which participants are to be removed. This `id` is obtained from the `calls.add` method. +- **users_to_remove** (`array[string]`, required) A list of user IDs to remove as participants from the call. Refer to Slack's documentation for specifying user IDs. + + +## SlackApi.DeleteScheduledSlackMessage + +
+ + +Delete a pending scheduled message from Slack queue. + +**Parameters** + +- **channel_id** (`string`, required) The ID of the channel where the scheduled message is set to post. Required to identify the correct message to delete. +- **scheduled_message_id** (`string`, required) The ID of the scheduled message to be deleted. This ID is obtained from the `chat.scheduleMessage` response. +- **delete_as_authenticated_user** (`boolean`, optional) Set to true to delete the message as the authenticated user with `chat:write:user` scope. Bot users are considered authenticated users. If false, the message will be deleted with `chat:write:bot` scope. + + +## SlackApi.SearchFilesInSlack + +
+ + +Search for files in Slack using a query. + +**Parameters** + +- **search_query** (`string`, required) The text string to search for in Slack files. Use keywords or phrases to narrow down results. +- **items_per_page** (`integer`, optional) The number of file results to return per page. Maximum allowed value is 100. (default: '20') +- **results_page_number** (`integer`, optional) The specific page number of results to retrieve, with a maximum value of 100. (default: '1') +- **sort_files_by** (`string`, optional) Specify how to sort the search results: either by 'score' or 'timestamp'. (default: 'score') +- **sort_direction** (`string`, optional) Change the sort direction for search results to ascending ('asc') or descending ('desc'). (default: 'desc') +- **encoded_team_id** (`string`, optional) Encoded team ID to specify the search domain when using an org-level token. Ignored with a workspace-level token. +- **enable_query_highlight** (`boolean`, optional) Set to true to enable highlight markers for matching query terms in the search results. + + +## SlackApi.SetSlackProfilePhoto + +
+ + +Set the user's profile photo on Slack. + +**Parameters** + +- **crop_box_size** (`string`, optional) The size of the square crop box for the profile photo in pixels. Specify the width and height, which are the same value for a square. +- **crop_box_x_coordinate** (`string`, optional) X coordinate of the top-left corner of the crop box for the profile photo. +- **crop_y_coordinate** (`string`, optional) Y coordinate of the top-left corner of the crop box for the user's profile photo on Slack. This determines where the cropping of the image will start on the vertical axis. +- **profile_photo_image** (`string`, optional) The image file to set as the Slack profile photo. Provide image data directly with the correct content type (e.g., image/jpeg, image/png). + + +## SlackApi.DenySharedInviteRequest + +
+ + +Denies an external user invitation to a Slack channel. + +**Parameters** + +- **shared_channel_invite_id** (`string`, required) The ID for the shared channel invite request that you intend to deny. This is required for specifying which invite to decline. +- **deny_invite_message** (`string`, optional) An optional message explaining why the invitation was denied. This message will be sent to the requester. + + +## SlackApi.GetExternalFileUploadUrl + +
+ + +Retrieve a URL to upload an external file to Slack. + +**Parameters** + +- **file_size_in_bytes** (`integer`, required) Specify the size of the file to be uploaded, measured in bytes. Ensure this value accurately reflects the file size. +- **file_name** (`string`, required) The name of the file to be uploaded to Slack. +- **snippet_syntax_type** (`string`, optional) Specify the syntax highlighting type for the snippet being uploaded, such as 'javascript', 'python', etc. +- **alt_text_description** (`string`, optional) A description of the image for screen-readers, limited to 1000 characters. + + +## SlackApi.GetCurrentSlackTeamInfo + +
+ + +Retrieve information about the current Slack team. + +**Parameters** + +- **query_by_domain** (`string`, optional) Comma-separated domains to query instead of a team, used when the team is not specified. This only works for domains in the same enterprise as the querying team token. +- **specific_team_id** (`string`, optional) The ID of the Slack team to retrieve information about. If omitted, information about the current team will be returned. + + +## SlackApi.ListChannelsForUsergroup + +
+ + +Retrieve channels linked to an org-level user group in Slack. + +**Parameters** + +- **usergroup_id** (`string`, required) The ID of the IDP group to list channels for. It identifies which organizational group to retrieve the default channels from. +- **workspace_id** (`string`, optional) The unique identifier for the Slack workspace. +- **include_member_count_in_channels** (`boolean`, optional) Set to true to include the count of members for each channel, otherwise set to false. + + +## SlackApi.GetConversationInfo + +
+ + +Fetches information about a Slack conversation. + +**Parameters** + +- **conversation_id** (`string`, required) The unique ID of the Slack conversation to retrieve information for. +- **include_locale** (`boolean`, optional) Set to `true` to receive the locale for this conversation. Defaults to `false`. +- **include_member_count** (`boolean`, optional) Set to true to include the member count for the specified conversation. Defaults to false. + + +## SlackApi.GetCallInformation + +
+ + +Retrieve detailed information about a specific call in Slack. + +**Parameters** + +- **call_id** (`string`, required) The unique identifier of the call as returned by the `calls.add` method. This ID is necessary to retrieve detailed call information. + + +## SlackApi.ListTeamsInEnterprise + +
+ + +Retrieve all teams in an Enterprise organization on Slack. + +**Parameters** + +- **maximum_items_to_return** (`integer`, optional) Specify the maximum number of teams to retrieve. Must be a positive integer, up to 1000. (default: '100') +- **pagination_cursor** (`string`, optional) Use this to retrieve the next page of results by setting it to the `next_cursor` from the previous response. + + +## SlackApi.ListScheduledMessages + +
+ + +Retrieve scheduled messages from Slack. + +**Parameters** + +- **channel_id** (`string`, optional) The ID of the Slack channel from which to retrieve scheduled messages. +- **pagination_cursor** (`string`, optional) Cursor value for pagination to specify the starting point of the list from a previous call. +- **latest_timestamp** (`string`, optional) A Unix timestamp marking the latest point in the time range for fetching scheduled messages. Ensure it is greater than the `oldest` timestamp if both are set. +- **max_number_of_entries** (`integer`, optional) Specify the maximum number of scheduled messages to return from Slack. +- **oldest_timestamp** (`string`, optional) A Unix timestamp representing the start of the time range for scheduled messages. It must be less than the `latest_timestamp` if both are specified. +- **team_id** (`string`, optional) Encoded team ID to specify which team's channels to list. Required if using an org-level token; ignore for workspace-level tokens. + + +## SlackApi.ListDeniedSlackInviteRequests + +
+ + +Retrieve denied Slack workspace invite requests. + +**Parameters** + +- **workspace_team_id** (`string`, optional) ID of the workspace where the invite requests were made. Required if the Enterprise org has multiple workspaces. +- **pagination_cursor** (`string`, optional) The cursor value from the previous API response to fetch the next set of results. Use this for pagination. +- **result_limit** (`integer`, optional) Specify the number of denied invite request results to return, between 1 and 1000 inclusive. (default: '100') + + +## SlackApi.GetSlackBotInfo + +
+ + +Retrieve details about a Slack bot user. + +**Parameters** + +- **target_bot_id** (`string`, optional) The unique bot ID for which information is requested. This ID is specific to each workspace the bot is in. +- **team_id_for_org_token_use** (`string`, optional) Encoded team or enterprise ID where the bot exists. Required if using an organization token. Ignored if using a workspace-level token. + + + + +## Auth + +The Arcade SlackApi toolkit uses the [Slack auth provider](/home/auth-providers/slack) to connect to users' SlackApi accounts. Please refer to the [Slack auth provider](/home/auth-providers/slack) documentation to learn how to configure auth. + + diff --git a/public/examples/integrations/toolkits/slack_api/accept_slack_invite_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/accept_slack_invite_example_call_tool.js new file mode 100644 index 00000000..1c066cce --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/accept_slack_invite_example_call_tool.js @@ -0,0 +1,35 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.AcceptSlackInvite"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_name": "project-collab", + "invite_id": "INV-9a8b7c6d", + "workspace_id": "T12345678", + "is_channel_private": false, + "use_free_trial": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/accept_slack_invite_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/accept_slack_invite_example_call_tool.py new file mode 100644 index 00000000..d130385f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/accept_slack_invite_example_call_tool.py @@ -0,0 +1,33 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.AcceptSlackInvite" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_name': 'project-collab', + 'invite_id': 'INV-9a8b7c6d', + 'workspace_id': 'T12345678', + 'is_channel_private': False, + 'use_free_trial': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/add_call_participants_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/add_call_participants_example_call_tool.js new file mode 100644 index 00000000..716c3c01 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/add_call_participants_example_call_tool.js @@ -0,0 +1,47 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.AddCallParticipants"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "call_id": "R1234567890", + "participant_users": [ + { + "slack_id": "U2345678901", + "display_name": "Ava Chen", + "avatar_url": "https://example.com/avatars/ava.png" + }, + { + "external_id": "ext-98765", + "display_name": "Dev Team Bot", + "avatar_url": "https://example.com/avatars/bot.png" + }, + { + "slack_id": "U3456789012", + "display_name": "Liam Patel" + } + ] +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/add_call_participants_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/add_call_participants_example_call_tool.py new file mode 100644 index 00000000..f567c2af --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/add_call_participants_example_call_tool.py @@ -0,0 +1,36 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.AddCallParticipants" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'call_id': 'R1234567890', + 'participant_users': [ { 'slack_id': 'U2345678901', + 'display_name': 'Ava Chen', + 'avatar_url': 'https://example.com/avatars/ava.png'}, + { 'external_id': 'ext-98765', + 'display_name': 'Dev Team Bot', + 'avatar_url': 'https://example.com/avatars/bot.png'}, + {'slack_id': 'U3456789012', 'display_name': 'Liam Patel'}] +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/add_slack_emoji_alias_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/add_slack_emoji_alias_example_call_tool.js new file mode 100644 index 00000000..6b26b638 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/add_slack_emoji_alias_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.AddSlackEmojiAlias"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "emoji_alias_name": "party_parrot", + "target_emoji_name": "parrot_party" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/add_slack_emoji_alias_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/add_slack_emoji_alias_example_call_tool.py new file mode 100644 index 00000000..af6cbcbf --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/add_slack_emoji_alias_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.AddSlackEmojiAlias" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'emoji_alias_name': 'party_parrot', 'target_emoji_name': 'parrot_party' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/add_slack_reaction_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/add_slack_reaction_example_call_tool.js new file mode 100644 index 00000000..e6ee26c8 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/add_slack_reaction_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.AddSlackReaction"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "slack_channel_id": "C04ABCD1234", + "reaction_emoji_name": "thumbsup", + "message_timestamp": "1623850245.000200" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/add_slack_reaction_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/add_slack_reaction_example_call_tool.py new file mode 100644 index 00000000..aa7df340 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/add_slack_reaction_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.AddSlackReaction" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'slack_channel_id': 'C04ABCD1234', + 'reaction_emoji_name': 'thumbsup', + 'message_timestamp': '1623850245.000200' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/approve_slack_channel_invitation_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/approve_slack_channel_invitation_example_call_tool.js new file mode 100644 index 00000000..064afbd1 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/approve_slack_channel_invitation_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ApproveSlackChannelInvitation"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "shared_channel_invite_id": "SCINV-12345", + "other_party_team_id": "T98765" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/approve_slack_channel_invitation_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/approve_slack_channel_invitation_example_call_tool.py new file mode 100644 index 00000000..e632678f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/approve_slack_channel_invitation_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ApproveSlackChannelInvitation" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'shared_channel_invite_id': 'SCINV-12345', 'other_party_team_id': 'T98765' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/check_api_calling_code_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/check_api_calling_code_example_call_tool.js new file mode 100644 index 00000000..56fa3a67 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/check_api_calling_code_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.CheckApiCallingCode"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "simulate_error_response": "invalid_auth" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/check_api_calling_code_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/check_api_calling_code_example_call_tool.py new file mode 100644 index 00000000..3ae867d2 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/check_api_calling_code_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.CheckApiCallingCode" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'simulate_error_response': 'invalid_auth' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/check_slack_discoverability_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/check_slack_discoverability_example_call_tool.js new file mode 100644 index 00000000..e08e0dc1 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/check_slack_discoverability_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.CheckSlackDiscoverability"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "email_to_check": "jane.doe@example.com" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/check_slack_discoverability_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/check_slack_discoverability_example_call_tool.py new file mode 100644 index 00000000..6cd8c4d3 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/check_slack_discoverability_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.CheckSlackDiscoverability" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'email_to_check': 'jane.doe@example.com' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/create_slack_conversation_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/create_slack_conversation_example_call_tool.js new file mode 100644 index 00000000..2193c15f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/create_slack_conversation_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.CreateSlackConversation"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_name": "project_alpha-updates", + "encoded_team_id": "T12345ABCDEF", + "create_private_channel": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/create_slack_conversation_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/create_slack_conversation_example_call_tool.py new file mode 100644 index 00000000..08131a5a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/create_slack_conversation_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.CreateSlackConversation" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_name': 'project_alpha-updates', + 'encoded_team_id': 'T12345ABCDEF', + 'create_private_channel': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/create_slack_user_group_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/create_slack_user_group_example_call_tool.js new file mode 100644 index 00000000..766351ea --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/create_slack_user_group_example_call_tool.js @@ -0,0 +1,43 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.CreateSlackUserGroup"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "user_group_name": "dev-frontend", + "default_channel_ids": [ + "C01234567", + "C08976543" + ], + "custom_additional_channels": [ + "C01234567" + ], + "user_group_description": "Frontend developers working on web UI", + "unique_mention_handle": "dev_frontend", + "team_id_for_user_group_creation": "T12345678", + "include_user_count": true, + "enable_display_as_sidebar_section": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/create_slack_user_group_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/create_slack_user_group_example_call_tool.py new file mode 100644 index 00000000..4d414fe4 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/create_slack_user_group_example_call_tool.py @@ -0,0 +1,36 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.CreateSlackUserGroup" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'user_group_name': 'dev-frontend', + 'default_channel_ids': ['C01234567', 'C08976543'], + 'custom_additional_channels': ['C01234567'], + 'user_group_description': 'Frontend developers working on web UI', + 'unique_mention_handle': 'dev_frontend', + 'team_id_for_user_group_creation': 'T12345678', + 'include_user_count': True, + 'enable_display_as_sidebar_section': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/custom_unfurl_slack_urls_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/custom_unfurl_slack_urls_example_call_tool.js new file mode 100644 index 00000000..ffbe2c8f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/custom_unfurl_slack_urls_example_call_tool.js @@ -0,0 +1,41 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.CustomUnfurlSlackUrls"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C1234567890", + "message_timestamp": "1623855600.000200", + "unfurl_url_map": "%7B%22https%3A%2F%2Fexample.com%2Fitem%2F42%22%3A%7B%22attachments%22%3A%5B%7B%22fallback%22%3A%22Item%2042%20details%22%2C%22title%22%3A%22Item%2042%22%2C%22text%22%3A%22Short%20description%20of%20item%2042%22%7D%5D%7D%7D", + "authentication_invitation_message": "*Please authenticate* to see a rich preview of this link.", + "custom_authentication_url": "https%3A%2F%2Fexample.com%2Fauth%3Freturn_to%3Dslack", + "user_authentication_blocks": [ + "{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"_Authenticate to enable unfurls_\"}}" + ], + "unfurl_link_id": "LNK-987654", + "link_source": "conversations_history", + "require_user_authentication": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/custom_unfurl_slack_urls_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/custom_unfurl_slack_urls_example_call_tool.py new file mode 100644 index 00000000..31a3b228 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/custom_unfurl_slack_urls_example_call_tool.py @@ -0,0 +1,39 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.CustomUnfurlSlackUrls" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C1234567890', + 'message_timestamp': '1623855600.000200', + 'unfurl_url_map': '%7B%22https%3A%2F%2Fexample.com%2Fitem%2F42%22%3A%7B%22attachments%22%3A%5B%7B%22fallback%22%3A%22Item%2042%20details%22%2C%22title%22%3A%22Item%2042%22%2C%22text%22%3A%22Short%20description%20of%20item%2042%22%7D%5D%7D%7D', + 'authentication_invitation_message': '*Please authenticate* to see a rich preview of this ' + 'link.', + 'custom_authentication_url': 'https%3A%2F%2Fexample.com%2Fauth%3Freturn_to%3Dslack', + 'user_authentication_blocks': [ '{"type":"section","text":{"type":"mrkdwn","text":"_Authenticate ' + 'to enable unfurls_"}}'], + 'unfurl_link_id': 'LNK-987654', + 'link_source': 'conversations_history', + 'require_user_authentication': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/delete_scheduled_slack_message_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/delete_scheduled_slack_message_example_call_tool.js new file mode 100644 index 00000000..69a6fcd8 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/delete_scheduled_slack_message_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.DeleteScheduledSlackMessage"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C024BE91L", + "scheduled_message_id": "Q1298393284", + "delete_as_authenticated_user": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/delete_scheduled_slack_message_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/delete_scheduled_slack_message_example_call_tool.py new file mode 100644 index 00000000..a6bb4f66 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/delete_scheduled_slack_message_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.DeleteScheduledSlackMessage" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C024BE91L', + 'scheduled_message_id': 'Q1298393284', + 'delete_as_authenticated_user': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/deny_shared_invite_request_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/deny_shared_invite_request_example_call_tool.js new file mode 100644 index 00000000..75709489 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/deny_shared_invite_request_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.DenySharedInviteRequest"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "shared_channel_invite_id": "S1234567890", + "deny_invite_message": "We cannot approve external access at this time." +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/deny_shared_invite_request_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/deny_shared_invite_request_example_call_tool.py new file mode 100644 index 00000000..2c33a786 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/deny_shared_invite_request_example_call_tool.py @@ -0,0 +1,30 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.DenySharedInviteRequest" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'shared_channel_invite_id': 'S1234567890', + 'deny_invite_message': 'We cannot approve external access at this time.' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/disable_user_group_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/disable_user_group_example_call_tool.js new file mode 100644 index 00000000..0c5be78a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/disable_user_group_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.DisableUserGroup"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "user_group_id": "S12345", + "team_id": "T67890", + "include_user_count": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/disable_user_group_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/disable_user_group_example_call_tool.py new file mode 100644 index 00000000..5c52a9fd --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/disable_user_group_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.DisableUserGroup" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'user_group_id': 'S12345', 'team_id': 'T67890', 'include_user_count': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/edit_slack_bookmark_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/edit_slack_bookmark_example_call_tool.js new file mode 100644 index 00000000..d78a1439 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/edit_slack_bookmark_example_call_tool.js @@ -0,0 +1,35 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.EditSlackBookmark"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "slack_channel_id": "C12345678", + "target_bookmark_id": "B987654321", + "bookmark_title": "Project Plan", + "bookmark_link": "https://example.com/project-plan", + "emoji_tag": ":clipboard:" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/edit_slack_bookmark_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/edit_slack_bookmark_example_call_tool.py new file mode 100644 index 00000000..c913c684 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/edit_slack_bookmark_example_call_tool.py @@ -0,0 +1,33 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.EditSlackBookmark" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'slack_channel_id': 'C12345678', + 'target_bookmark_id': 'B987654321', + 'bookmark_title': 'Project Plan', + 'bookmark_link': 'https://example.com/project-plan', + 'emoji_tag': ':clipboard:' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/enable_slack_file_sharing_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/enable_slack_file_sharing_example_call_tool.js new file mode 100644 index 00000000..a71d6b18 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/enable_slack_file_sharing_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.EnableSlackFileSharing"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "file_id_to_share": "F01234567ABC" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/enable_slack_file_sharing_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/enable_slack_file_sharing_example_call_tool.py new file mode 100644 index 00000000..4f94b38a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/enable_slack_file_sharing_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.EnableSlackFileSharing" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'file_id_to_share': 'F01234567ABC' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/enable_slack_user_group_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/enable_slack_user_group_example_call_tool.js new file mode 100644 index 00000000..df5e87bd --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/enable_slack_user_group_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.EnableSlackUserGroup"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "user_group_id": "S12345G", + "team_id": "T98765", + "include_user_count": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/enable_slack_user_group_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/enable_slack_user_group_example_call_tool.py new file mode 100644 index 00000000..4c398622 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/enable_slack_user_group_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.EnableSlackUserGroup" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'user_group_id': 'S12345G', 'team_id': 'T98765', 'include_user_count': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/fetch_workspace_settings_info_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/fetch_workspace_settings_info_example_call_tool.js new file mode 100644 index 00000000..64e0c90e --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/fetch_workspace_settings_info_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.FetchWorkspaceSettingsInfo"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "slack_team_id": "T12345678" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/fetch_workspace_settings_info_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/fetch_workspace_settings_info_example_call_tool.py new file mode 100644 index 00000000..718a6caf --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/fetch_workspace_settings_info_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.FetchWorkspaceSettingsInfo" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'slack_team_id': 'T12345678' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/find_slack_user_by_email_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/find_slack_user_by_email_example_call_tool.js new file mode 100644 index 00000000..58b61c17 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/find_slack_user_by_email_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.FindSlackUserByEmail"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "user_email_address": "jane.doe@example.com" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/find_slack_user_by_email_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/find_slack_user_by_email_example_call_tool.py new file mode 100644 index 00000000..3aaeda8e --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/find_slack_user_by_email_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.FindSlackUserByEmail" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'user_email_address': 'jane.doe@example.com' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_call_information_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_call_information_example_call_tool.js new file mode 100644 index 00000000..bfd0aab8 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_call_information_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetCallInformation"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "call_id": "C1234567890" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_call_information_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_call_information_example_call_tool.py new file mode 100644 index 00000000..d4853488 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_call_information_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetCallInformation" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'call_id': 'C1234567890' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_conversation_info_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_conversation_info_example_call_tool.js new file mode 100644 index 00000000..f36690c3 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_conversation_info_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetConversationInfo"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "conversation_id": "C12345678", + "include_locale": true, + "include_member_count": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_conversation_info_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_conversation_info_example_call_tool.py new file mode 100644 index 00000000..f2772b55 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_conversation_info_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetConversationInfo" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'conversation_id': 'C12345678', 'include_locale': True, 'include_member_count': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_current_slack_team_info_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_current_slack_team_info_example_call_tool.js new file mode 100644 index 00000000..9f82cc50 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_current_slack_team_info_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetCurrentSlackTeamInfo"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "specific_team_id": "T12345678", + "query_by_domain": "example.com,sub.example.com" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_current_slack_team_info_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_current_slack_team_info_example_call_tool.py new file mode 100644 index 00000000..62b872a6 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_current_slack_team_info_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetCurrentSlackTeamInfo" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'specific_team_id': 'T12345678', 'query_by_domain': 'example.com,sub.example.com' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_external_file_upload_url_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_external_file_upload_url_example_call_tool.js new file mode 100644 index 00000000..830a9bf4 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_external_file_upload_url_example_call_tool.js @@ -0,0 +1,34 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetExternalFileUploadUrl"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "file_size_in_bytes": 5242880, + "file_name": "error_log.txt", + "snippet_syntax_type": "text", + "alt_text_description": "Screenshot of error dialog showing stack trace" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_external_file_upload_url_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_external_file_upload_url_example_call_tool.py new file mode 100644 index 00000000..34cc1c1c --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_external_file_upload_url_example_call_tool.py @@ -0,0 +1,32 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetExternalFileUploadUrl" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'file_size_in_bytes': 5242880, + 'file_name': 'error_log.txt', + 'snippet_syntax_type': 'text', + 'alt_text_description': 'Screenshot of error dialog showing stack trace' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_integration_logs_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_integration_logs_example_call_tool.js new file mode 100644 index 00000000..3f0204aa --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_integration_logs_example_call_tool.js @@ -0,0 +1,37 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetIntegrationLogs"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "filter_by_app_id": "A123BCD45", + "filter_by_change_type": "added", + "result_count": "50", + "result_page_number": "1", + "filter_by_service_id": "SVC789", + "encoded_team_id": "T-ENC-9f8e7d6c", + "filter_by_user": "U234XYZ" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_integration_logs_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_integration_logs_example_call_tool.py new file mode 100644 index 00000000..d9c99e5e --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_integration_logs_example_call_tool.py @@ -0,0 +1,35 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetIntegrationLogs" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'filter_by_app_id': 'A123BCD45', + 'filter_by_change_type': 'added', + 'result_count': '50', + 'result_page_number': '1', + 'filter_by_service_id': 'SVC789', + 'encoded_team_id': 'T-ENC-9f8e7d6c', + 'filter_by_user': 'U234XYZ' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_remote_file_info_slack_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_remote_file_info_slack_example_call_tool.js new file mode 100644 index 00000000..859f4325 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_remote_file_info_slack_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetRemoteFileInfoSlack"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "file_id": "F1234567890", + "file_external_identifier": "external-guid-9876" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_remote_file_info_slack_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_remote_file_info_slack_example_call_tool.py new file mode 100644 index 00000000..fac64881 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_remote_file_info_slack_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetRemoteFileInfoSlack" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'file_id': 'F1234567890', 'file_external_identifier': 'external-guid-9876' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_bot_info_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_bot_info_example_call_tool.js new file mode 100644 index 00000000..ee645383 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_bot_info_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackBotInfo"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_bot_id": "B0456K7QZ", + "team_id_for_org_token_use": "T12345ENT" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_bot_info_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_bot_info_example_call_tool.py new file mode 100644 index 00000000..9f56b0ca --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_bot_info_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackBotInfo" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_bot_id': 'B0456K7QZ', 'team_id_for_org_token_use': 'T12345ENT' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_conversation_members_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_conversation_members_example_call_tool.js new file mode 100644 index 00000000..6bf164cf --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_conversation_members_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackConversationMembers"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "conversation_id": "C04567XYZ", + "pagination_cursor": "dXNlcjpVMEc5V0ZYQw==", + "max_items_to_return": 200 +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_conversation_members_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_conversation_members_example_call_tool.py new file mode 100644 index 00000000..0c8ee4ff --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_conversation_members_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackConversationMembers" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'conversation_id': 'C04567XYZ', + 'pagination_cursor': 'dXNlcjpVMEc5V0ZYQw==', + 'max_items_to_return': 200 +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_message_permalink_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_message_permalink_example_call_tool.js new file mode 100644 index 00000000..3c7ab657 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_message_permalink_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackMessagePermalink"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C01234567", + "message_timestamp": "1623855600.000200" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_message_permalink_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_message_permalink_example_call_tool.py new file mode 100644 index 00000000..2e27d2d7 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_message_permalink_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackMessagePermalink" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C01234567', 'message_timestamp': '1623855600.000200' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_remote_files_info_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_remote_files_info_example_call_tool.js new file mode 100644 index 00000000..e2c8faec --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_remote_files_info_example_call_tool.js @@ -0,0 +1,35 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackRemoteFilesInfo"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "filter_by_channel_id": "C04567ABC", + "pagination_cursor": "dXNlcjpVMEc5V0ZYTlo=", + "maximum_items_to_return": 25, + "filter_files_from_timestamp": "1693526400", + "timestamp_filter_end": "1696118400" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_remote_files_info_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_remote_files_info_example_call_tool.py new file mode 100644 index 00000000..5e774fe4 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_remote_files_info_example_call_tool.py @@ -0,0 +1,33 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackRemoteFilesInfo" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'filter_by_channel_id': 'C04567ABC', + 'pagination_cursor': 'dXNlcjpVMEc5V0ZYTlo=', + 'maximum_items_to_return': 25, + 'filter_files_from_timestamp': '1693526400', + 'timestamp_filter_end': '1696118400' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_team_preferences_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_team_preferences_example_call_tool.js new file mode 100644 index 00000000..1e54111c --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_team_preferences_example_call_tool.js @@ -0,0 +1,29 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackTeamPreferences"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = {}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_team_preferences_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_team_preferences_example_call_tool.py new file mode 100644 index 00000000..ca34be48 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_team_preferences_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackTeamPreferences" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_thread_messages_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_thread_messages_example_call_tool.js new file mode 100644 index 00000000..7bbd0038 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_thread_messages_example_call_tool.js @@ -0,0 +1,38 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackThreadMessages"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "conversation_id": "C01234567", + "thread_message_timestamp": "1622559600.000200", + "pagination_cursor": "dXNlcjpVMEc5V0ZYT0=", + "latest_message_timestamp": "1622563200", + "maximum_items_to_return": 50, + "start_time_unix_timestamp": "1622556000", + "include_all_message_metadata": true, + "include_boundary_timestamps": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_thread_messages_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_thread_messages_example_call_tool.py new file mode 100644 index 00000000..d53dea6a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_thread_messages_example_call_tool.py @@ -0,0 +1,36 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackThreadMessages" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'conversation_id': 'C01234567', + 'thread_message_timestamp': '1622559600.000200', + 'pagination_cursor': 'dXNlcjpVMEc5V0ZYT0=', + 'latest_message_timestamp': '1622563200', + 'maximum_items_to_return': 50, + 'start_time_unix_timestamp': '1622556000', + 'include_all_message_metadata': True, + 'include_boundary_timestamps': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_user_presence_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_user_presence_example_call_tool.js new file mode 100644 index 00000000..ac0ce0e7 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_user_presence_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackUserPresence"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_user_id": "U12345678" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_user_presence_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_user_presence_example_call_tool.py new file mode 100644 index 00000000..54a1af6f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_user_presence_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackUserPresence" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_user_id': 'U12345678' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_user_profile_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_slack_user_profile_example_call_tool.js new file mode 100644 index 00000000..928ef559 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_user_profile_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetSlackUserProfile"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_user_id": "U12345678", + "include_labels": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_slack_user_profile_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_slack_user_profile_example_call_tool.py new file mode 100644 index 00000000..a7e44417 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_slack_user_profile_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetSlackUserProfile" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_user_id': 'U12345678', 'include_labels': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_team_billable_users_info_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_team_billable_users_info_example_call_tool.js new file mode 100644 index 00000000..a3a73c0c --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_team_billable_users_info_example_call_tool.js @@ -0,0 +1,34 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetTeamBillableUsersInfo"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "pagination_cursor": "dXNlcjoxMjM0NTY3OA==", + "maximum_items_to_return": 50, + "specific_user_id": "U12345ABC", + "encoded_team_id": "T98765ENC" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_team_billable_users_info_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_team_billable_users_info_example_call_tool.py new file mode 100644 index 00000000..bbf6399a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_team_billable_users_info_example_call_tool.py @@ -0,0 +1,32 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetTeamBillableUsersInfo" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'pagination_cursor': 'dXNlcjoxMjM0NTY3OA==', + 'maximum_items_to_return': 50, + 'specific_user_id': 'U12345ABC', + 'encoded_team_id': 'T98765ENC' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_team_profile_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_team_profile_example_call_tool.js new file mode 100644 index 00000000..3609cb4c --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_team_profile_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetTeamProfile"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "visibility_filter": "visible" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_team_profile_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_team_profile_example_call_tool.py new file mode 100644 index 00000000..8444e248 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_team_profile_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetTeamProfile" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'visibility_filter': 'visible' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/get_user_identity_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/get_user_identity_example_call_tool.js new file mode 100644 index 00000000..de47d931 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_user_identity_example_call_tool.js @@ -0,0 +1,29 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.GetUserIdentity"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = {}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/get_user_identity_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/get_user_identity_example_call_tool.py new file mode 100644 index 00000000..2d1b7501 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/get_user_identity_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.GetUserIdentity" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/invite_user_to_slack_channel_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/invite_user_to_slack_channel_example_call_tool.js new file mode 100644 index 00000000..18c99899 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/invite_user_to_slack_channel_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.InviteUserToSlackChannel"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "slack_channel_id": "C01234567", + "user_ids_list": "U11111111,U22222222,U33333333", + "continue_with_valid_users": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/invite_user_to_slack_channel_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/invite_user_to_slack_channel_example_call_tool.py new file mode 100644 index 00000000..92829e15 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/invite_user_to_slack_channel_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.InviteUserToSlackChannel" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'slack_channel_id': 'C01234567', + 'user_ids_list': 'U11111111,U22222222,U33333333', + 'continue_with_valid_users': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/join_slack_conversation_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/join_slack_conversation_example_call_tool.js new file mode 100644 index 00000000..90068d93 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/join_slack_conversation_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.JoinSlackConversation"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "conversation_id": "C0456K9Q2" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/join_slack_conversation_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/join_slack_conversation_example_call_tool.py new file mode 100644 index 00000000..a6e1d8e8 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/join_slack_conversation_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.JoinSlackConversation" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'conversation_id': 'C0456K9Q2' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_accessible_slack_conversations_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_accessible_slack_conversations_example_call_tool.js new file mode 100644 index 00000000..93f8bd86 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_accessible_slack_conversations_example_call_tool.js @@ -0,0 +1,36 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListAccessibleSlackConversations"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "pagination_cursor": "dGVzdDo1MA==", + "maximum_items_to_return": 150, + "slack_team_id": "T01234567", + "channel_types": "public_channel,private_channel,im", + "specific_user_id": "U89ABCD12", + "exclude_archived_channels": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_accessible_slack_conversations_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_accessible_slack_conversations_example_call_tool.py new file mode 100644 index 00000000..a571dbfd --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_accessible_slack_conversations_example_call_tool.py @@ -0,0 +1,34 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListAccessibleSlackConversations" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'pagination_cursor': 'dGVzdDo1MA==', + 'maximum_items_to_return': 150, + 'slack_team_id': 'T01234567', + 'channel_types': 'public_channel,private_channel,im', + 'specific_user_id': 'U89ABCD12', + 'exclude_archived_channels': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_approved_workspace_invite_requests_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_approved_workspace_invite_requests_example_call_tool.js new file mode 100644 index 00000000..d208eb25 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_approved_workspace_invite_requests_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListApprovedWorkspaceInviteRequests"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_id": "T12345678", + "pagination_cursor": "dXNlcjpVMDYxTkYxTkYx", + "result_limit": 100 +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_approved_workspace_invite_requests_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_approved_workspace_invite_requests_example_call_tool.py new file mode 100644 index 00000000..f3bab841 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_approved_workspace_invite_requests_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListApprovedWorkspaceInviteRequests" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_id': 'T12345678', 'pagination_cursor': 'dXNlcjpVMDYxTkYxTkYx', 'result_limit': 100 +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_channels_for_usergroup_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_channels_for_usergroup_example_call_tool.js new file mode 100644 index 00000000..8e6618d1 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_channels_for_usergroup_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListChannelsForUsergroup"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "usergroup_id": "S12345", + "workspace_id": "T67890", + "include_member_count_in_channels": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_channels_for_usergroup_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_channels_for_usergroup_example_call_tool.py new file mode 100644 index 00000000..b363a42b --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_channels_for_usergroup_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListChannelsForUsergroup" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'usergroup_id': 'S12345', 'workspace_id': 'T67890', 'include_member_count_in_channels': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_custom_emoji_for_team_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_custom_emoji_for_team_example_call_tool.js new file mode 100644 index 00000000..2cd6c155 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_custom_emoji_for_team_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListCustomEmojiForTeam"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "include_emoji_categories": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_custom_emoji_for_team_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_custom_emoji_for_team_example_call_tool.py new file mode 100644 index 00000000..3d407dca --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_custom_emoji_for_team_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListCustomEmojiForTeam" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'include_emoji_categories': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_denied_slack_invite_requests_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_denied_slack_invite_requests_example_call_tool.js new file mode 100644 index 00000000..b261f24d --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_denied_slack_invite_requests_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListDeniedSlackInviteRequests"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_team_id": "T1234567890", + "pagination_cursor": "dXNlcjpVMDYxTkZUQ0U=", + "result_limit": 100 +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_denied_slack_invite_requests_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_denied_slack_invite_requests_example_call_tool.py new file mode 100644 index 00000000..a83efaa7 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_denied_slack_invite_requests_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListDeniedSlackInviteRequests" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_team_id': 'T1234567890', + 'pagination_cursor': 'dXNlcjpVMDYxTkZUQ0U=', + 'result_limit': 100 +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_pending_workspace_invites_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_pending_workspace_invites_example_call_tool.js new file mode 100644 index 00000000..4c47f906 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_pending_workspace_invites_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListPendingWorkspaceInvites"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_id": "T1234567890", + "pagination_cursor": "dXNlcjpVMDYxTkZUQ0E=", + "result_limit": 100 +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_pending_workspace_invites_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_pending_workspace_invites_example_call_tool.py new file mode 100644 index 00000000..355f3f0c --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_pending_workspace_invites_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListPendingWorkspaceInvites" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_id': 'T1234567890', 'pagination_cursor': 'dXNlcjpVMDYxTkZUQ0E=', 'result_limit': 100 +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_pinned_items_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_pinned_items_example_call_tool.js new file mode 100644 index 00000000..f86425fb --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_pinned_items_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListPinnedItems"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C01234567" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_pinned_items_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_pinned_items_example_call_tool.py new file mode 100644 index 00000000..7203a052 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_pinned_items_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListPinnedItems" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C01234567' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_scheduled_messages_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_scheduled_messages_example_call_tool.js new file mode 100644 index 00000000..07b1e0a8 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_scheduled_messages_example_call_tool.js @@ -0,0 +1,36 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListScheduledMessages"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C1234567890", + "pagination_cursor": "dXNlcjpVMDYxTkZUQw==", + "latest_timestamp": "1735728000", + "max_number_of_entries": 25, + "oldest_timestamp": "1735641600", + "team_id": "T9876543210" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_scheduled_messages_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_scheduled_messages_example_call_tool.py new file mode 100644 index 00000000..82c10ba3 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_scheduled_messages_example_call_tool.py @@ -0,0 +1,34 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListScheduledMessages" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C1234567890', + 'pagination_cursor': 'dXNlcjpVMDYxTkZUQw==', + 'latest_timestamp': '1735728000', + 'max_number_of_entries': 25, + 'oldest_timestamp': '1735641600', + 'team_id': 'T9876543210' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_shared_channel_invites_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_shared_channel_invites_example_call_tool.js new file mode 100644 index 00000000..c06c36f9 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_shared_channel_invites_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListSharedChannelInvites"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_team_id": "T12345678", + "maximum_invites_to_return": 25, + "pagination_cursor": "dXNlcjpVMEc5V0ZYTlo=" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_shared_channel_invites_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_shared_channel_invites_example_call_tool.py new file mode 100644 index 00000000..4883ee1d --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_shared_channel_invites_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListSharedChannelInvites" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_team_id': 'T12345678', + 'maximum_invites_to_return': 25, + 'pagination_cursor': 'dXNlcjpVMEc5V0ZYTlo=' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_channels_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_slack_channels_example_call_tool.js new file mode 100644 index 00000000..c94f782f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_channels_example_call_tool.js @@ -0,0 +1,35 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListSlackChannels"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "pagination_cursor": "dXNlcjpVMDYxTkZUVEQ=", + "maximum_number_of_channels": 50, + "team_id_for_org_app": "T1234567890", + "channel_types": "public_channel,private_channel", + "exclude_archived_channels": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_channels_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_slack_channels_example_call_tool.py new file mode 100644 index 00000000..6ac505e3 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_channels_example_call_tool.py @@ -0,0 +1,33 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListSlackChannels" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'pagination_cursor': 'dXNlcjpVMDYxTkZUVEQ=', + 'maximum_number_of_channels': 50, + 'team_id_for_org_app': 'T1234567890', + 'channel_types': 'public_channel,private_channel', + 'exclude_archived_channels': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_enterprise_emojis_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_slack_enterprise_emojis_example_call_tool.js new file mode 100644 index 00000000..4f018a4c --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_enterprise_emojis_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListSlackEnterpriseEmojis"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "pagination_cursor": "abc123cursor", + "max_items_to_return": 250 +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_enterprise_emojis_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_slack_enterprise_emojis_example_call_tool.py new file mode 100644 index 00000000..cbb14490 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_enterprise_emojis_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListSlackEnterpriseEmojis" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'pagination_cursor': 'abc123cursor', 'max_items_to_return': 250 +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_team_users_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_slack_team_users_example_call_tool.js new file mode 100644 index 00000000..c56f2884 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_team_users_example_call_tool.js @@ -0,0 +1,34 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListSlackTeamUsers"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "pagination_cursor": "dXNlcjpVMDYxTkZUQ05F", + "maximum_items_to_return": 100, + "slack_team_id": "T01234567", + "include_user_locale": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_team_users_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_slack_team_users_example_call_tool.py new file mode 100644 index 00000000..cca9f391 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_team_users_example_call_tool.py @@ -0,0 +1,32 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListSlackTeamUsers" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'pagination_cursor': 'dXNlcjpVMDYxTkZUQ05F', + 'maximum_items_to_return': 100, + 'slack_team_id': 'T01234567', + 'include_user_locale': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_user_groups_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_slack_user_groups_example_call_tool.js new file mode 100644 index 00000000..f19ce6cf --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_user_groups_example_call_tool.js @@ -0,0 +1,34 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListSlackUserGroups"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "team_id_for_org_token": "T0123456789", + "include_user_count": true, + "include_disabled_groups": false, + "include_users_in_group": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_user_groups_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_slack_user_groups_example_call_tool.py new file mode 100644 index 00000000..d1018001 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_user_groups_example_call_tool.py @@ -0,0 +1,32 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListSlackUserGroups" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'team_id_for_org_token': 'T0123456789', + 'include_user_count': True, + 'include_disabled_groups': False, + 'include_users_in_group': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_workspace_owners_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_slack_workspace_owners_example_call_tool.js new file mode 100644 index 00000000..90fd03e7 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_workspace_owners_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListSlackWorkspaceOwners"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_id": "T12345678", + "maximum_items_to_return": 100, + "pagination_cursor": "" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_slack_workspace_owners_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_slack_workspace_owners_example_call_tool.py new file mode 100644 index 00000000..30e5161d --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_slack_workspace_owners_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListSlackWorkspaceOwners" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_id': 'T12345678', 'maximum_items_to_return': 100, 'pagination_cursor': '' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_teams_in_enterprise_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_teams_in_enterprise_example_call_tool.js new file mode 100644 index 00000000..0a38c7e7 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_teams_in_enterprise_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListTeamsInEnterprise"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "maximum_items_to_return": 100, + "pagination_cursor": "dXNlcjoxMjM0NTY3ODkw" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_teams_in_enterprise_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_teams_in_enterprise_example_call_tool.py new file mode 100644 index 00000000..c2bf4168 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_teams_in_enterprise_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListTeamsInEnterprise" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'maximum_items_to_return': 100, 'pagination_cursor': 'dXNlcjoxMjM0NTY3ODkw' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/list_workspace_users_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/list_workspace_users_example_call_tool.js new file mode 100644 index 00000000..872dc8ae --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_workspace_users_example_call_tool.js @@ -0,0 +1,36 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ListWorkspaceUsers"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_team_id": "T12345678", + "pagination_cursor": "dXNlcjpVMDYxTkYxV...", + "user_retrieval_limit": 50, + "return_only_active_users": true, + "include_deactivated_user_workspaces": false, + "return_only_guest_users": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/list_workspace_users_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/list_workspace_users_example_call_tool.py new file mode 100644 index 00000000..76fae251 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/list_workspace_users_example_call_tool.py @@ -0,0 +1,34 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ListWorkspaceUsers" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_team_id': 'T12345678', + 'pagination_cursor': 'dXNlcjpVMDYxTkYxV...', + 'user_retrieval_limit': 50, + 'return_only_active_users': True, + 'include_deactivated_user_workspaces': False, + 'return_only_guest_users': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/open_or_resume_slack_conversation_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/open_or_resume_slack_conversation_example_call_tool.js new file mode 100644 index 00000000..4bde2ef1 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/open_or_resume_slack_conversation_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.OpenOrResumeSlackConversation"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_user_ids": "U12345,U67890", + "return_full_im_channel_definition": false, + "prevent_creation": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/open_or_resume_slack_conversation_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/open_or_resume_slack_conversation_example_call_tool.py new file mode 100644 index 00000000..b578dcb6 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/open_or_resume_slack_conversation_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.OpenOrResumeSlackConversation" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_user_ids': 'U12345,U67890', + 'return_full_im_channel_definition': False, + 'prevent_creation': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/pin_item_to_slack_channel_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/pin_item_to_slack_channel_example_call_tool.js new file mode 100644 index 00000000..d64fbcd2 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/pin_item_to_slack_channel_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.PinItemToSlackChannel"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C1234567890", + "message_timestamp": "1623855600.000200" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/pin_item_to_slack_channel_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/pin_item_to_slack_channel_example_call_tool.py new file mode 100644 index 00000000..42792ddd --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/pin_item_to_slack_channel_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.PinItemToSlackChannel" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C1234567890', 'message_timestamp': '1623855600.000200' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/register_slack_call_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/register_slack_call_example_call_tool.js new file mode 100644 index 00000000..458ae95a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/register_slack_call_example_call_tool.js @@ -0,0 +1,51 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.RegisterSlackCall"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "unique_call_id": "ext-call-987654", + "call_join_url": "https://meet.example.com/j/987654", + "optional_human_readable_display_id": "MEET-987654", + "desktop_app_join_url": "slack-call://open?call_id=987654", + "call_start_timestamp": 1735689600, + "call_title": "Weekly Sync", + "call_creator_user_id": "U12345678", + "participants_info": [ + { + "slack_id": "U11111111", + "external_id": "alice@example.com", + "display_name": "Alice", + "avatar_url": "https://example.com/avatars/alice.png" + }, + { + "slack_id": "U22222222", + "external_id": "bob@example.com", + "display_name": "Bob", + "avatar_url": "https://example.com/avatars/bob.png" + } + ] +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/register_slack_call_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/register_slack_call_example_call_tool.py new file mode 100644 index 00000000..dfcf8524 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/register_slack_call_example_call_tool.py @@ -0,0 +1,43 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.RegisterSlackCall" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'unique_call_id': 'ext-call-987654', + 'call_join_url': 'https://meet.example.com/j/987654', + 'optional_human_readable_display_id': 'MEET-987654', + 'desktop_app_join_url': 'slack-call://open?call_id=987654', + 'call_start_timestamp': 1735689600, + 'call_title': 'Weekly Sync', + 'call_creator_user_id': 'U12345678', + 'participants_info': [ { 'slack_id': 'U11111111', + 'external_id': 'alice@example.com', + 'display_name': 'Alice', + 'avatar_url': 'https://example.com/avatars/alice.png'}, + { 'slack_id': 'U22222222', + 'external_id': 'bob@example.com', + 'display_name': 'Bob', + 'avatar_url': 'https://example.com/avatars/bob.png'}] +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/remove_call_participants_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/remove_call_participants_example_call_tool.js new file mode 100644 index 00000000..3feb6548 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/remove_call_participants_example_call_tool.js @@ -0,0 +1,35 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.RemoveCallParticipants"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "call_id": "R12345678", + "users_to_remove": [ + "U11111111", + "U22222222" + ] +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/remove_call_participants_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/remove_call_participants_example_call_tool.py new file mode 100644 index 00000000..fccd7276 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/remove_call_participants_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.RemoveCallParticipants" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'call_id': 'R12345678', 'users_to_remove': ['U11111111', 'U22222222'] +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/remove_reaction_from_item_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/remove_reaction_from_item_example_call_tool.js new file mode 100644 index 00000000..81818b9f --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/remove_reaction_from_item_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.RemoveReactionFromItem"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "reaction_emoji_name": "thumbsup", + "message_channel_id": "C024BE91L", + "message_timestamp": "1611784860.000200" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/remove_reaction_from_item_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/remove_reaction_from_item_example_call_tool.py new file mode 100644 index 00000000..1f676705 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/remove_reaction_from_item_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.RemoveReactionFromItem" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'reaction_emoji_name': 'thumbsup', + 'message_channel_id': 'C024BE91L', + 'message_timestamp': '1611784860.000200' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/remove_slack_bookmark_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/remove_slack_bookmark_example_call_tool.js new file mode 100644 index 00000000..cc9cec28 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/remove_slack_bookmark_example_call_tool.js @@ -0,0 +1,33 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.RemoveSlackBookmark"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "slack_channel_id_to_remove_bookmark": "C1234567890", + "bookmark_id_to_remove": "B9876543210", + "quip_section_id": "Q-section-42" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/remove_slack_bookmark_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/remove_slack_bookmark_example_call_tool.py new file mode 100644 index 00000000..cea788a3 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/remove_slack_bookmark_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.RemoveSlackBookmark" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'slack_channel_id_to_remove_bookmark': 'C1234567890', + 'bookmark_id_to_remove': 'B9876543210', + 'quip_section_id': 'Q-section-42' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/rename_slack_emoji_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/rename_slack_emoji_example_call_tool.js new file mode 100644 index 00000000..ed0d9f30 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/rename_slack_emoji_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.RenameSlackEmoji"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "current_emoji_name": ":party_parrot:", + "new_emoji_name": "celebration_parrot" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/rename_slack_emoji_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/rename_slack_emoji_example_call_tool.py new file mode 100644 index 00000000..2854586a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/rename_slack_emoji_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.RenameSlackEmoji" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'current_emoji_name': ':party_parrot:', 'new_emoji_name': 'celebration_parrot' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/revoke_slack_token_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/revoke_slack_token_example_call_tool.js new file mode 100644 index 00000000..6143c7b5 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/revoke_slack_token_example_call_tool.js @@ -0,0 +1,31 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.RevokeSlackToken"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "trigger_testing_mode": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/revoke_slack_token_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/revoke_slack_token_example_call_tool.py new file mode 100644 index 00000000..feec8228 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/revoke_slack_token_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.RevokeSlackToken" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'trigger_testing_mode': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/schedule_slack_message_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/schedule_slack_message_example_call_tool.js new file mode 100644 index 00000000..b1047f54 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/schedule_slack_message_example_call_tool.js @@ -0,0 +1,38 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ScheduleSlackMessage"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "slack_channel_id_or_name": "C024BE91L", + "schedule_time_unix_timestamp": 1716201600, + "message_text": "Reminder: stand-up meeting starts in 10 minutes. Please join the #standup channel.", + "structured_blocks_json": "[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"*Stand-up Reminder*\\nPlease join the meeting in 10 minutes.\"}}]", + "enable_group_linking": false, + "enable_link_unfurling": true, + "disable_unfurling_of_media_content": false, + "make_reply_visible_to_everyone": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/schedule_slack_message_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/schedule_slack_message_example_call_tool.py new file mode 100644 index 00000000..88e4837d --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/schedule_slack_message_example_call_tool.py @@ -0,0 +1,38 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ScheduleSlackMessage" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'slack_channel_id_or_name': 'C024BE91L', + 'schedule_time_unix_timestamp': 1716201600, + 'message_text': 'Reminder: stand-up meeting starts in 10 minutes. Please join the #standup ' + 'channel.', + 'structured_blocks_json': '[{"type":"section","text":{"type":"mrkdwn","text":"*Stand-up ' + 'Reminder*\\nPlease join the meeting in 10 minutes."}}]', + 'enable_group_linking': False, + 'enable_link_unfurling': True, + 'disable_unfurling_of_media_content': False, + 'make_reply_visible_to_everyone': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/search_files_in_slack_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/search_files_in_slack_example_call_tool.js new file mode 100644 index 00000000..5456b5c9 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/search_files_in_slack_example_call_tool.js @@ -0,0 +1,37 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SearchFilesInSlack"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "search_query": "project roadmap Q3 budget", + "items_per_page": 25, + "results_page_number": 1, + "sort_files_by": "timestamp", + "sort_direction": "desc", + "encoded_team_id": "T12345ORG", + "enable_query_highlight": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/search_files_in_slack_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/search_files_in_slack_example_call_tool.py new file mode 100644 index 00000000..fd1e4643 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/search_files_in_slack_example_call_tool.py @@ -0,0 +1,35 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SearchFilesInSlack" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'search_query': 'project roadmap Q3 budget', + 'items_per_page': 25, + 'results_page_number': 1, + 'sort_files_by': 'timestamp', + 'sort_direction': 'desc', + 'encoded_team_id': 'T12345ORG', + 'enable_query_highlight': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/search_slack_messages_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/search_slack_messages_example_call_tool.js new file mode 100644 index 00000000..38a1c0e6 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/search_slack_messages_example_call_tool.js @@ -0,0 +1,38 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SearchSlackMessages"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "search_query": "deploy rollback script error", + "results_per_page": 25, + "page_number": 1, + "pagination_cursor": "*", + "sort_results_by": "score", + "sort_direction": "desc", + "team_id": "T1234567890", + "enable_query_highlighting": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/search_slack_messages_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/search_slack_messages_example_call_tool.py new file mode 100644 index 00000000..37881f59 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/search_slack_messages_example_call_tool.py @@ -0,0 +1,36 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SearchSlackMessages" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'search_query': 'deploy rollback script error', + 'results_per_page': 25, + 'page_number': 1, + 'pagination_cursor': '*', + 'sort_results_by': 'score', + 'sort_direction': 'desc', + 'team_id': 'T1234567890', + 'enable_query_highlighting': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/send_ephemeral_message_slack_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/send_ephemeral_message_slack_example_call_tool.js new file mode 100644 index 00000000..38cf0f83 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/send_ephemeral_message_slack_example_call_tool.js @@ -0,0 +1,54 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SendEphemeralMessageSlack"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_channel": "C1234567890", + "recipient_user_id": "U2345678901", + "structured_blocks": [ + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": "Hey <@U2345678901>, here is a quick update about the deploy:" + } + }, + { + "type": "context", + "elements": [ + { + "type": "mrkdwn", + "text": "*Status:* Successful" + } + ] + } + ], + "message_icon_emoji": ":rocket:", + "ephemeral_message_text": "Deploy completed successfully. Click the details button for more info.", + "bot_username": "deploy-bot", + "link_names_auto_link": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/send_ephemeral_message_slack_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/send_ephemeral_message_slack_example_call_tool.py new file mode 100644 index 00000000..7566bb8b --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/send_ephemeral_message_slack_example_call_tool.py @@ -0,0 +1,41 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SendEphemeralMessageSlack" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_channel': 'C1234567890', + 'recipient_user_id': 'U2345678901', + 'structured_blocks': [ { 'type': 'section', + 'text': { 'type': 'mrkdwn', + 'text': 'Hey <@U2345678901>, here is a quick update ' + 'about the deploy:'}}, + { 'type': 'context', + 'elements': [{'type': 'mrkdwn', 'text': '*Status:* Successful'}]}], + 'message_icon_emoji': ':rocket:', + 'ephemeral_message_text': 'Deploy completed successfully. Click the details button for more ' + 'info.', + 'bot_username': 'deploy-bot', + 'link_names_auto_link': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/send_slack_message_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/send_slack_message_example_call_tool.js new file mode 100644 index 00000000..6b01cf25 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/send_slack_message_example_call_tool.js @@ -0,0 +1,38 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SendSlackMessage"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_channel_id_or_name": "#engineering", + "message_text": "Deployment succeeded for service-api v2.1. Rollout complete.", + "structured_blocks": "[{\"type\":\"section\",\"text\":{\"type\":\"mrkdwn\",\"text\":\"*:white_check_mark: Deployment Complete*\\nservice-api v2.1 rolled out to production.\"}},{\"type\":\"context\",\"elements\":[{\"type\":\"mrkdwn\",\"text\":\"Triggered by @deployer\"}]}]", + "emoji_icon_for_message": ":rocket:", + "bot_username": "deploy-bot", + "broadcast_reply_to_channel": false, + "enable_slack_markup_parsing": true, + "enable_unfurling_text_content": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/send_slack_message_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/send_slack_message_example_call_tool.py new file mode 100644 index 00000000..bfbe3529 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/send_slack_message_example_call_tool.py @@ -0,0 +1,39 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SendSlackMessage" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_channel_id_or_name': '#engineering', + 'message_text': 'Deployment succeeded for service-api v2.1. Rollout complete.', + 'structured_blocks': '[{"type":"section","text":{"type":"mrkdwn","text":"*:white_check_mark: ' + 'Deployment Complete*\\nservice-api v2.1 rolled out to ' + 'production."}},{"type":"context","elements":[{"type":"mrkdwn","text":"Triggered ' + 'by @deployer"}]}]', + 'emoji_icon_for_message': ':rocket:', + 'bot_username': 'deploy-bot', + 'broadcast_reply_to_channel': False, + 'enable_slack_markup_parsing': True, + 'enable_unfurling_text_content': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/set_slack_channel_read_cursor_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/set_slack_channel_read_cursor_example_call_tool.js new file mode 100644 index 00000000..f52c4d72 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_slack_channel_read_cursor_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SetSlackChannelReadCursor"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "channel_id": "C024BE91L", + "timestamp_of_message_to_mark_as_read": "1623854876.000200" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/set_slack_channel_read_cursor_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/set_slack_channel_read_cursor_example_call_tool.py new file mode 100644 index 00000000..96d52b5a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_slack_channel_read_cursor_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SetSlackChannelReadCursor" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'channel_id': 'C024BE91L', 'timestamp_of_message_to_mark_as_read': '1623854876.000200' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/set_slack_profile_photo_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/set_slack_profile_photo_example_call_tool.js new file mode 100644 index 00000000..73d8ac12 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_slack_profile_photo_example_call_tool.js @@ -0,0 +1,34 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SetSlackProfilePhoto"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "crop_box_size": "200", + "crop_box_x_coordinate": "50", + "crop_y_coordinate": "50", + "profile_photo_image": "[file_content]" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/set_slack_profile_photo_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/set_slack_profile_photo_example_call_tool.py new file mode 100644 index 00000000..77d387a5 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_slack_profile_photo_example_call_tool.py @@ -0,0 +1,32 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SetSlackProfilePhoto" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'crop_box_size': '200', + 'crop_box_x_coordinate': '50', + 'crop_y_coordinate': '50', + 'profile_photo_image': '[file_content]' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/set_slack_workspace_name_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/set_slack_workspace_name_example_call_tool.js new file mode 100644 index 00000000..c1f7674b --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_slack_workspace_name_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SetSlackWorkspaceName"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_id": "T12345678", + "new_workspace_name": "Acme Engineering" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/set_slack_workspace_name_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/set_slack_workspace_name_example_call_tool.py new file mode 100644 index 00000000..bdbe3cf8 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_slack_workspace_name_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SetSlackWorkspaceName" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_id': 'T12345678', 'new_workspace_name': 'Acme Engineering' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/set_workspace_description_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/set_workspace_description_example_call_tool.js new file mode 100644 index 00000000..c85a9746 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_workspace_description_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.SetWorkspaceDescription"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "workspace_id": "T12345678", + "workspace_description": "Acme Corp Slack workspace for product and engineering collaboration — shared guidelines and updates." +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/set_workspace_description_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/set_workspace_description_example_call_tool.py new file mode 100644 index 00000000..96713cd5 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/set_workspace_description_example_call_tool.py @@ -0,0 +1,31 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.SetWorkspaceDescription" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'workspace_id': 'T12345678', + 'workspace_description': 'Acme Corp Slack workspace for product and engineering collaboration ' + '— shared guidelines and updates.' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/share_remote_file_in_channel_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/share_remote_file_in_channel_example_call_tool.js new file mode 100644 index 00000000..88df1b3a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/share_remote_file_in_channel_example_call_tool.js @@ -0,0 +1,32 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.ShareRemoteFileInChannel"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "target_channel_ids": "C12345678,C23456789", + "file_external_identifier": "app-file-guid-98765" +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/share_remote_file_in_channel_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/share_remote_file_in_channel_example_call_tool.py new file mode 100644 index 00000000..8e00755d --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/share_remote_file_in_channel_example_call_tool.py @@ -0,0 +1,29 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.ShareRemoteFileInChannel" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'target_channel_ids': 'C12345678,C23456789', 'file_external_identifier': 'app-file-guid-98765' +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/update_slack_user_group_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/update_slack_user_group_example_call_tool.js new file mode 100644 index 00000000..71c073d2 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/update_slack_user_group_example_call_tool.js @@ -0,0 +1,44 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.UpdateSlackUserGroup"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "user_group_id": "S01234567", + "default_channel_ids": [ + "C0123ABCD", + "C0456EFGH" + ], + "additional_channel_ids": [ + "C0999ZZZZ" + ], + "user_group_description": "Frontend engineers responsible for UI components and UX", + "user_group_handle": "frontend-engineers", + "user_group_name": "Frontend Engineers", + "team_id_for_org_token": "T12345678", + "include_user_count": true, + "enable_sidebar_section": true +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/update_slack_user_group_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/update_slack_user_group_example_call_tool.py new file mode 100644 index 00000000..728afcea --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/update_slack_user_group_example_call_tool.py @@ -0,0 +1,37 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.UpdateSlackUserGroup" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'user_group_id': 'S01234567', + 'default_channel_ids': ['C0123ABCD', 'C0456EFGH'], + 'additional_channel_ids': ['C0999ZZZZ'], + 'user_group_description': 'Frontend engineers responsible for UI components and UX', + 'user_group_handle': 'frontend-engineers', + 'user_group_name': 'Frontend Engineers', + 'team_id_for_org_token': 'T12345678', + 'include_user_count': True, + 'enable_sidebar_section': True +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/public/examples/integrations/toolkits/slack_api/update_slack_usergroup_users_example_call_tool.js b/public/examples/integrations/toolkits/slack_api/update_slack_usergroup_users_example_call_tool.js new file mode 100644 index 00000000..a5e13a6a --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/update_slack_usergroup_users_example_call_tool.js @@ -0,0 +1,43 @@ +import { Arcade } from "@arcadeai/arcadejs"; + +const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable + +const USER_ID = "{arcade_user_id}"; +const TOOL_NAME = "SlackApi.UpdateSlackUsergroupUsers"; + +// Start the authorization process +const authResponse = await client.tools.authorize({ + tool_name: TOOL_NAME, + user_id: USER_ID +}); + +if (authResponse.status !== "completed") { + console.log(`Click this link to authorize: ${authResponse.url}`); +} + +// Wait for the authorization to complete +await client.auth.waitForCompletion(authResponse); + +const toolInput = { + "user_group_id": "S0123456789", + "user_ids_list": [ + "U12345678", + "U23456789", + "U34567890" + ], + "team_id_for_org_token": "T9876543210", + "update_additional_channels": [ + "C11111111", + "C22222222" + ], + "include_user_count": true, + "is_shared_section": false +}; + +const response = await client.tools.execute({ + tool_name: TOOL_NAME, + input: toolInput, + user_id: USER_ID, +}); + +console.log(JSON.stringify(response.output.value, null, 2)); diff --git a/public/examples/integrations/toolkits/slack_api/update_slack_usergroup_users_example_call_tool.py b/public/examples/integrations/toolkits/slack_api/update_slack_usergroup_users_example_call_tool.py new file mode 100644 index 00000000..473f7a23 --- /dev/null +++ b/public/examples/integrations/toolkits/slack_api/update_slack_usergroup_users_example_call_tool.py @@ -0,0 +1,34 @@ +import json +from arcadepy import Arcade + +client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable + +USER_ID = "{arcade_user_id}" +TOOL_NAME = "SlackApi.UpdateSlackUsergroupUsers" + +auth_response = client.tools.authorize( + tool_name=TOOL_NAME, + user_id=TOOL_NAME +) + +if auth_response.status != "completed": + print(f"Click this link to authorize: {auth_response.url}") + +# Wait for the authorization to complete +client.auth.wait_for_completion(auth_response) + +tool_input = { + 'user_group_id': 'S0123456789', + 'user_ids_list': ['U12345678', 'U23456789', 'U34567890'], + 'team_id_for_org_token': 'T9876543210', + 'update_additional_channels': ['C11111111', 'C22222222'], + 'include_user_count': True, + 'is_shared_section': False +} + +response = client.tools.execute( + tool_name=TOOL_NAME, + input=tool_input, + user_id=USER_ID, +) +print(json.dumps(response.output.value, indent=2)) diff --git a/src/components/ApiWrapperInfo.tsx b/src/components/ApiWrapperInfo.tsx new file mode 100644 index 00000000..03b17612 --- /dev/null +++ b/src/components/ApiWrapperInfo.tsx @@ -0,0 +1,36 @@ +import { Warning } from "@/markdown/Callouts"; +import React from "react"; + +interface ApiWrapperInfoProps { + toolkit_name: string; + api_wrapper_docs_url: string; +} + +const ApiWrapperInfo: React.FC = ({ toolkit_name }) => { + return ( + +

+ {toolkit_name} is an{" "} + + API wrapper + {" "} + toolkit: each tool mirrors one HTTP endpoint and offers LLMs a way to + interact with the low-level API. +

+

+ Differently from{" "} + + LLM-native tools + + , API wrapper tools are heavily influenced by the original API design, + which is not usually optimized for LLM usage. For this reason, we + recommend thoroughly evaluating the toolkit with your Agents or chatbots + before using it in production.{" "} + Read more about LLM-native + vs API wrapper tools. +

+
+ ); +}; + +export default ApiWrapperInfo; diff --git a/src/components/custom/Toolkits/toolkits-config.ts b/src/components/custom/Toolkits/toolkits-config.ts index 9512814e..8ad551d8 100644 --- a/src/components/custom/Toolkits/toolkits-config.ts +++ b/src/components/custom/Toolkits/toolkits-config.ts @@ -47,6 +47,14 @@ const availableTools: Tool[] = [ category: "social", type: "arcade", }, + { + name: "Slack API Wrapper", + image: "slack.png", + summary: "Enable LLMs to interact with the low-level Slack API", + link: "/toolkits/social-communication/slack_api", + category: "social", + type: "arcade", + }, { name: "X", image: "twitter.png",