> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lithoblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Airtable

> Use LithoBlocks with Airtable to send Slack messages from automations and receive webhooks from LithoBlocks in Airtable.

<Note>
  The LithoBlocks Airtable integration is currently in development. The steps below will be updated when the integration is available. Until then, you can use Airtable Automations with Send webhook or Run script to call the LithoBlocks API, and When webhook received to receive LithoBlocks webhooks.
</Note>

This guide explains how to use LithoBlocks with [Airtable](https://airtable.com/) to send Slack messages from Airtable automations and to receive webhooks from LithoBlocks in Airtable.

## Prerequisites

* LithoBlocks account and organization
* Airtable account (with Automations available)
* LithoBlocks Airtable integration (when available; until then, Send webhook / Run script, When webhook received)
* [Connecting Slack](/connecting-slack) for your LithoBlocks workspace

## Coming soon: LithoBlocks Airtable integration

When the LithoBlocks Airtable integration is released, you will be able to:

1. **Trigger an automation and send a message to Slack** — Use a LithoBlocks action in an Airtable automation to compile a template with your record data and send the message to a Slack channel or user. No custom webhook or script needed.
2. **Receive a webhook from LithoBlocks in Airtable** — When a button or modal triggers a webhook in LithoBlocks, trigger an Airtable automation (e.g. When webhook received) and create or update records from the payload.

Steps for these flows will be added here when the integration is available.

## Current workaround: Use the LithoBlocks API from Airtable

Until the integration is available, use Airtable **Automations** with **Send webhook** or **Run script** to call the LithoBlocks API, and **When webhook received** to receive LithoBlocks webhooks.

### Get an API key

1. Log into your [LithoBlocks dashboard](https://app.lithoblocks.com)
2. Go to **API Keys** in your account or organization settings
3. Create an API key with the scopes you need (e.g. `templates:read`, `messages:create`)
4. Copy the key (it is shown only once)

### Send a message from an Airtable automation

1. In your base, open **Automations** and create an automation (e.g. trigger: When record created, When record matches conditions).
2. Add an action. Use **Send webhook** or **Run script**.
   * **Send webhook:** URL `https://api.lithoblocks.com/v1/templates/compile` or `https://api.lithoblocks.com/v1/templates/send`. Method POST. Headers: `Authorization: Bearer YOUR_LITHOBLOCKS_API_KEY`, `Content-Type: application/json`. Body: JSON with `template_id`, `data` (map Airtable fields into `data` to match your template), and for send a destination such as `channel_id` as in the [API reference](/api-reference/introduction).
   * **Run script:** Use `fetch()` or a script extension to POST to the same URL with the same headers and body built from `inputConfig.record`.
3. The response contains the compiled Slack blocks (compile) or send result (send). Use the send endpoint so LithoBlocks posts to Slack, or add a subsequent step to post to Slack if you use compile.
4. Map record fields to your template’s placeholders (e.g. `{{request.title}}`, `{{assignee.name}}`) so the message reflects the record.

See the [API reference](/api-reference/introduction) for authentication, base URL, and endpoint details. See [Quickstart](/quickstart) and [Placeholders](/guides/templates-placeholders) for template and data structure.

### Receive LithoBlocks webhooks in Airtable

When a button or modal in LithoBlocks triggers a webhook:

1. In Airtable, create an automation with trigger **When webhook received** (or use a script/webhook extension if your plan supports it). Copy the webhook URL Airtable provides.
2. In LithoBlocks, create a [Webhook destination](/guides/webhook-destinations) with that URL and connect it to your button or modal submission.
3. When a user clicks the button or submits the modal, LithoBlocks POSTs the payload to your Airtable webhook. In the automation, use the webhook payload to **Create record** or **Update record** (map payload fields to table fields).

Payload structure depends on your [payload template](/guides/button-webhooks); use the same placeholders (e.g. `{{interaction.user_email}}`, `{{expense.id}}`) so Airtable receives the data you need.

## Next steps

<CardGroup cols={2}>
  <Card title="Connecting Slack" icon="slack" href="/connecting-slack">
    Connect your Slack workspace to LithoBlocks.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Build a template and send a message.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/introduction">
    Authentication, endpoints, and parameters.
  </Card>

  <Card title="Webhook destinations" icon="link" href="/guides/webhook-destinations">
    Configure webhooks for buttons and modals.
  </Card>
</CardGroup>
