# Integrations and API keys

Once a workflow has been built, you can connect the apps that are required for the automation to run.

{% hint style="info" %}
Having your integrations already connected when building the workflow increases your chances of success, since the chat agent can run tests to verify everything functions properly.
{% endhint %}

You should only need to provide your own API key if:

* Cody specifically states they don't have access to a particular service you're trying to use
* You prefer to use your own API quota for cost control
* You're integrating with specialized or enterprise services that require your credentials

**Example**: If Cody asks for an OpenAI API key, you can respond: *"Please use your own API key for the LLM models instead."*

<details>

<summary>Airtable</summary>

To connect CodeWords with your Airtable data, you'll need to provide an API Key that has access to your Workspaces and Bases. Getting your Airtable API Key is straightforward:

* In your Airtable Account, navigate to the Builder Hub from the dropdown menu options when you click on your profile section
* Once in Builder Hub, look for the Personal Access Token option under the Developers section
* Select "Create a token" and provide a descriptive name for your CodeWords integration
* Choose the appropriate Scopes that you want CodeWords to be able to perform with your data
  * **Read** - Allows CodeWords to view and extract data from your bases
  * **Write** - Enables CodeWords to add and modify records in your bases
  * **Manage** - Gives CodeWords full control to create, modify, and delete bases and workspaces
* Add the specific bases that CodeWords can access, or choose "Add all resources" to give access to everything in your account
* Copy the generated token and paste it into your CodeWords workflow when prompted

</details>

<details>

<summary>Pinecone</summary>

Once an account is created on Pinecone, an API key is generated by default. You can access this from the API keys section on the right menu.

You can create an Index or use an existing Index from Pinecone by using codewords using the API Key.

</details>

<details>

<summary>Telegram</summary>

**Setting Up a Telegram Bot Webhook**

This guide walks you through connecting your Telegram bot to CodeWords using webhooks.

**Step 1: Create or Get Your Bot Token**

1. Open Telegram and search for **@BotFather**
2. Start a conversation with BotFather
3. Choose one of the following options:
   * **For a new bot**: Send `/newbot` and follow the prompts to create your bot
   * **For existing bots**: Send `/mybots` to see your current bots
4. Select your bot from the list
5. Click **"API Token"** from the available options
6. Copy the bot token (format: `123456789:ABC-DEF1234ghIkl-zyx57W2v1u123ew11`)

**Step 2: Configure the Webhook**

1. Take the webhook URL template:

   ```
   https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=<YOUR_CODEWORDS_WEBHOOK_URL>
   ```
2. Replace `<YOUR_BOT_TOKEN>` with your actual bot token from Step 1.
3. Replace `<YOUR_CODEWORDS_WEBHOOK_URL>` with the webhook URL that Cody generates when setting up your trigger.
4. Example:

   ```
   https://api.telegram.org/bot<YOUR_BOT_TOKEN>/setWebhook?url=<YOUR_CODEWORDS_WEBHOOK_URL>
   ```

**Step 3: Activate the Webhook**

1. Copy the complete URL from Step 2
2. Paste it into your browser's address bar
3. Press Enter to navigate to the URL
4. You should see a confirmation message indicating the webhook has been activated

</details>

**Best Practice**: Only grant the minimum permissions needed for your specific automation. If your workflow only reads data, don't grant Write or Manage permissions. Once configured, CodeWords will be able to seamlessly interact with your Airtable data as part of your automated workflows.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codewords.ai/apps-and-integrations/popular-integrations/integrations-and-api-keys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
