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.
The LithoBlocks Retool integration is currently in development. The steps below will be updated when the integration is available. Until then, create a LithoBlocks API resource in Retool (root URL, stored auth) and use it in your apps or workflows with the API path, query params, and body as required. In Retool Workflows (not Retool Apps), you can use a Webhook trigger to receive LithoBlocks webhooks.
Prerequisites
- LithoBlocks account and organization
- Retool account (cloud or self-hosted)
- LithoBlocks Retool integration (when available; until then, LithoBlocks API resource; Webhook trigger in Retool Workflows for receiving webhooks)
- Connecting Slack for your LithoBlocks workspace
Coming soon: LithoBlocks Retool integration
When the LithoBlocks Retool integration is released, you will be able to:- Send a message to Slack from a Retool app — Use a LithoBlocks resource or block to compile a template with your app data and send the message to a Slack channel or user. No custom HTTP needed.
- Receive a webhook from LithoBlocks in Retool Workflows — When a button or modal triggers a webhook in LithoBlocks, trigger a Retool Workflow (via Webhook trigger) and use the payload in subsequent workflow steps.
Current workaround: LithoBlocks API as a Retool resource
Until the integration is available, create a LithoBlocks API resource in your Retool account. The resource uses the root URL and stores the auth token once; then use it in any app or workflow by providing the API path, query params, and body as required.Get an API key
- Log into your LithoBlocks dashboard
- Go to API Keys in your account or organization settings
- Create an API key with the scopes you need (e.g.
templates:read,messages:create) - Copy the key (it is shown only once)
Create the LithoBlocks API resource
- In Retool, go to Resources and create a new resource. Choose REST API (or Custom API).
- Base URL (root URL): Set to
https://api.lithoblocks.com. Do not include a path; paths are specified when you use the resource in an app or workflow. - Authentication: Configure the resource to store and use your LithoBlocks API key:
- Add a header:
Authorization=Bearer YOUR_LITHOBLOCKS_API_KEY - Store the key in Retool environment variables or secrets and reference it in the header (e.g. so the token is not hardcoded). The resource will send this header on every request.
- Add a header:
- Optional: Set default headers such as
Content-Type: application/jsonif your requests will use JSON bodies. - Save the resource (e.g. name it “LithoBlocks API”).
Use the resource in an app or workflow
In any Retool app or workflow that can call this resource:- API path — Provide the path for the operation you need. Examples:
- Compile a template:
POST /v1/templates/compile(template id is in the JSON body, not the path). - Send a message:
POST /v1/templates/send(see API reference for body fields such aschannel_id). - List templates:
GET /v1/templates.
- Compile a template:
- Query params — Add any query parameters the endpoint requires (e.g.
include_sample_data=truefor list templates). Set them in the query configuration when you invoke the resource. - Body — For compile or send, the body is JSON with
template_id,data(same shape as sample data), and for send a destination as documented. Use Retool bindings to map form fields, table data, or state intodata. - Run the query (e.g. on button click, form submit, or workflow trigger). The response contains the API result (compiled blocks, send confirmation, or list data).
Receive LithoBlocks webhooks in Retool Workflows
Webhooks are available in Retool Workflows only, not in Retool Apps. When a button or modal in LithoBlocks triggers a webhook:- In Retool, create a Workflow and add a Webhook trigger as the first step. From the workflow builder, copy the webhook URL and copy the API key (shown for the Webhook trigger).
- In LithoBlocks, create a Webhook destination with that URL. Add a header:
x-retool-api-keywith the value of the API key you copied from the Retool workflow builder. This header is required so Retool accepts the incoming request. - Connect the webhook destination to your button or modal submission.
- When a user clicks the button or submits the modal, LithoBlocks POSTs the payload to your Retool Workflow webhook (with the
x-retool-api-keyheader). The payload is available in the webhook trigger output; use it in subsequent workflow steps (e.g. run a query, call an API, update a database).
{{interaction.user_email}}, {{expense.id}}) so your workflow receives the data you need.
Next steps
Connecting Slack
Connect your Slack workspace to LithoBlocks.
Quickstart
Build a template and send a message.
API reference
Authentication, endpoints, and parameters.
Webhook destinations
Configure webhooks for buttons and modals.

