Sign Up
Loading...

Connector Commands

Connector Commands allow you to integrate Twidget projects with external services such as Google Drive, Slack, OpenAI’s ChatGPT, and many others. These commands provide ready-made actions that communicate with third-party APIs, removing the need to manually create and maintain external HTTP requests.

What Are Connector Commands?

A connector is a collection of prebuilt commands designed for a specific external service.

Each connector exposes multiple actions—known as connector commands—which map directly to the service’s public API.

Examples of what connectors can do:

  • Google Drive → Upload files, list folders, read documents

  • Slack → Send messages, create channels, manage reminders

  • OpenAI → Generate text/chat responses, perform embeddings

  • Google Sheets → Append rows, read sheet values, update cells

These built-in actions allow you to interact with external platforms without having to know their API details.

Where Connector Commands Can Be Used

You can add connector commands anywhere you can run Twidget logic:

  • Endpoints

  • Reusable Functions

  • Events (scheduled or triggered)

In these areas, a connector command behaves just like any other Twidget command, you simply insert it into the command flow and configure its inputs.

Note:

  • Connector commands cannot be used inside Pages or Page Components.

  • They run only on the backend.

Authentication Requirements

Most external services require authentication before their API can be used. Connector commands support this by letting you attach credentials securely.

Common methods include:

  • Google OAuth – for Google Sheets, Drive, Calendar, etc.

  • OpenAI API keys – for ChatGPT, embeddings, and other OpenAI models

  • Slack OAuth – for reading channels, sending messages, or using the Slack API

You only need to authenticate once. After that, Twidget stores the credential and automatically injects it when the connector command runs.

When adding a connector command you will be prompted to select:

  • A previously authenticated credential

    or

  • Start the authentication process for that connector

This ensures each connector action can securely interact with the external service.

How to Use a Connector Command

Using a connector command is similar to adding any other command:

  1. Open an endpoint, function, or event.

  2. Click Add Command.

  3. Select the connector category (e.g., Google Drive, Slack, OpenAI).

  4. Choose the specific connector command you want to run.

  5. Provide inputs such as:

    • File IDs

    • Folder paths

    • Text prompts

    • Channel IDs

    • Payloads required by the external API

  6. Select or authenticate the necessary credential.

  7. Save your resource.

Once added, the connector command becomes part of your backend workflow and will run in sequence with your other commands.

Examples of Actions You Can Perform

Google Drive

  • Upload a file

  • List files in a folder

  • Get file metadata

Slack

  • Send a message to a channel

  • List user channels

  • Create a reminder

OpenAI

  • Generate a chat response

  • Create embeddings

  • Moderate text

Each connector includes a variety of commands tailored to that service.

Limitations

  • Connector commands cannot be used in Pages or Page Components.

  • Only supported authentication types can be used for each connector.

  • The number of available commands depends on the provider’s public API.

Related Topics

Conditionals

Condition Command. The Condition Command allows you to perform actions based on whether an expression evaluates to true or false. You can nest other commands within the true or false branches of the condition, enabling complex logic flows. - Expression Builder: Validate two variables to equal true. ...

Send Message

Send SMS Command. With Twidget, you can send SMS messages to phones using the `Send SMS` command. This functionality varies depending on the provider. Currently, we support Twilio as the SMS provider. To use Twilio for SMS integrations, you will need: - A Twilio account ID - Twilio Auth Token - A Tw...

Database

Twidget offers many commands to manage data in your database. Below is a list of the available commands and their functionalities: Get Data. Retrieve an entry from a table. Get Multiple Data. Retrieve multiple entries from a table. Save Data. Save an object to a database table. Save Multiple Data. S...

Local Storage

Twidget provides a set of local storage commands that enable interaction with the browser’s `localStorage` API through a no-code interface. These commands are useful for storing, retrieving, and managing key-value data persistently within the current domain context. Purpose. These commands abstract ...

Loops

In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks. List Loop. The `List Loop` command enables you to loop thr...