### Get Example Path Parameters Source: https://docs.retool.com/assets/edu/ai/agent-wf.json Retrieves example path parameters for a Retool component. Includes error handling. ```javascript const getExamplePathParams = () => { try { return {} } catch { return { error: true, message: 'Error parsing example path params' } } } ``` -------------------------------- ### Get Example Headers Source: https://docs.retool.com/assets/edu/ai/agent-wf.json Retrieves example headers for a Retool component. Includes error handling. ```javascript const getExampleHeaders = () => { try { return {} } catch { return { error: true, message: 'Error parsing example headers' } } } ``` -------------------------------- ### Install Docker Dependencies Source: https://docs.retool.com/self-hosted/self-managed/tutorials/additional-types/ec2 Run the install script to prepare the Docker image and install Docker and Docker Compose if they are not already present. ```bash ./install.sh ``` -------------------------------- ### Install Dependencies Source: https://docs.retool.com/apps/guides/custom/custom-component-libraries Run this command in the cloned repository directory to install all necessary project dependencies. ```bash npm install ``` -------------------------------- ### URL Path Examples Source: https://docs.retool.com/data-sources/guides/connect/rest Examples of static, dynamic, query parameter, and multi-segment URL paths. ```text // Static path /users/ // Dynamic with ID /users/{{ table1.selectedRow.data.id }} // With query parameters /search?q={{ searchInput.value }}&limit=20 // Multiple path segments /customers/{{ customerId.value }}/orders ``` -------------------------------- ### Connection Property Example Source: https://docs.retool.com/queries/reference/objects/query Example usage of the connection property. ```text false"keep-alive" ``` -------------------------------- ### Run Brave Search MCP Server with Supergateway Source: https://docs.retool.com/agents/guides/tools/connect-to-mcp-server An example of starting the Brave Search MCP Server using supergateway, requiring a BRAVE_API_KEY environment variable. ```bash BRAVE_API_KEY=... npx -y supergateway --stdio "npx@modelcontextprotocol/server-brave-search" --cors ``` -------------------------------- ### File Input Value Examples Source: https://docs.retool.com/mobile/reference/components/forms/file-input Examples of blob and file URI values for the file input component. ```text falseblob:example.com/12345678-1234-5678-1234-567812345678 ``` ```text falsefile://path/to/file ``` -------------------------------- ### Example deviceType Usage Source: https://docs.retool.com/mobile/reference/objects/retoolcontext This example demonstrates setting the deviceType property. It is a read-only string. ```javascript falsePHONE ``` -------------------------------- ### Alert Value Example Source: https://docs.retool.com/apps/reference/components/alert Example showing how the 'value' property is displayed. ```text falseHello world! ``` -------------------------------- ### Suffix Text Examples Source: https://docs.retool.com/apps/reference/components/color-input Examples demonstrating the use of the `textAfter` property with different string values. ```string falseUSD ``` ```string falsepx ``` ```string false@example.com ``` -------------------------------- ### Example Telemetry Configuration for Datadog Source: https://docs.retool.com/self-hosted/guides/telemetry Example configuration to forward telemetry data to both Retool and Datadog. ```yaml ... telemetry: extraEnv: - name: DD_AGENT_HOST valueFrom: fieldRef: fieldPath: status.hostIP customVectorConfig: sinks: # forward statsd metrics to datadog-agent port 8125 metrics_datadog: address: ${DD_AGENT_HOST}:8125 buffer: when_full: drop_newest inputs: - metrics_statsd_raw mode: udp type: statsd enabled: true ... ``` -------------------------------- ### GitHub App Installation URL Source: https://docs.retool.com/source-control/quickstarts/setup/github The installation ID is the number at the end of this URL. Save this for later use. ```text https://github.com/settings/installations/:installation_id ``` -------------------------------- ### Example Usage of Content-Type Source: https://docs.retool.com/queries/reference/objects/query This example demonstrates how to access or set the content type. It is read-only and typically used for response headers. ```javascript false["application/json"] ``` -------------------------------- ### Enable Just-in-Time (JIT) Provisioning Source: https://docs.retool.com/reference/environment-variables Set to true to enable Just-in-Time (JIT) user provisioning. ```bash JIT_ENABLED=true ``` -------------------------------- ### Global Setup Script Initialization Source: https://docs.retool.com/assets/edu/examples/Mailing-List.json A consolidated script used to initialize all required custom libraries for the project. ```javascript // lodash /* Edit library variable below */ const _ = require('lodash') /* Add destructured imports from library below eg. const { pow, log } = require("mathjs") */ // numbro /* Edit library variable below */ const numbro = require('numbro') /* Add destructured imports from library below eg. const { pow, log } = require("mathjs") */ // papaparse /* Edit library variable below */ const Papa = require('papaparse') /* Add destructured imports from library below eg. const { pow, log } = require("mathjs") */ // moment-timezone /* Edit library variable below */ const moment = require('moment-timezone') /* Add destructured imports from library below eg. const { pow, log } = require("mathjs") */ // uuid /* Edit library variable below */ const uuid = require('uuid') /* Add destructured imports from library below eg. const { pow, log } = require("mathjs") */ ``` -------------------------------- ### Get Example Input JSON Source: https://docs.retool.com/assets/edu/ai/agent-wf.json Retrieves example input JSON for a Retool component. Includes error handling for parsing. ```javascript const getExampleInputJSON = () => { try { return { /* example input JSON */ } \n } catch { return { error: true, message: 'Error parsing example input JSON' }\n }\n } ``` -------------------------------- ### Playwright Global Setup for Authentication Source: https://docs.retool.com/apps/guides/webdriver-testing Configures Playwright's global setup to log in programmatically and store authentication cookies. This allows tests to start with an authenticated session. ```typescript import { chromium } from "@playwright/test"; export default async function globalSetup() { const browser = await chromium.launch(); const page = await browser.newPage(); await page.goto("https:///auth/login"); await page .getByPlaceholder("name@company.com") .fill(`${process.env.PLAYWRIGHT_USERNAME}`); await page .getByPlaceholder("*******************") .fill(`${process.env.PLAYWRIGHT_PASSWORD}`); await page.getByText(/^Sign in$/).click(); await page.getByText("Welcome to Retool").click(); const cookies = await page.context().cookies(); process.env.COOKIES = JSON.stringify(cookies); // set this env var to store the authed page session await browser.close(); } ``` -------------------------------- ### Get Task Response Example Source: https://docs.retool.com/agents/reference/a2a-endpoints This is an example of a successful response when retrieving task details. It includes the task ID, context ID, current status, and optionally the message history. ```json { "id":"054c93a8-b0ed-49ea-915d-418e615cb7b4", "contextId":"23a617f6-f7a7-40a8-955c-f17faad5c954", "status":{ "state":"completed", "message":{ "role":"agent", "parts":[ { "kind":"text", "text":"Why don't skeletons fight each other? Because they don't have the guts!" } ], "messageId":"8dc8c544-f6d9-49a8-b9e3-cecf2433f23d", "contextId":"23a617f6-f7a7-40a8-955c-f17faad5c954", "taskId":"054c93a8-b0ed-49ea-915d-418e615cb7b4", "kind":"message" } }, "kind":"task", "history":[ { "role":"user", "parts":[ { "kind":"text", "text":"tell me a joke" } ], "messageId":"dd992a34-b2bc-4f4f-b0c1-0e7399da87d2", "contextId":"23a617f6-f7a7-40a8-955c-f17faad5c954", "taskId":"054c93a8-b0ed-49ea-915d-418e615cb7b4", "kind":"message" }, { "role":"agent", "parts":[ { "kind":"text", "text":"Why don't skeletons fight each other? Because they don't have the guts!" } ], "messageId":"8dc8c544-f6d9-49a8-b9e3-cecf2433f23d", "contextId":"23a617f6-f7a7-40a8-955c-f17faad5c954", "taskId":"054c93a8-b0ed-49ea-915d-418e615cb7b4", "kind":"message" } ]} ``` -------------------------------- ### Initialize a Component Library Source: https://docs.retool.com/apps/guides/custom/custom-component-libraries This command starts the process of creating a new component library. It will prompt you for a name and description, and then configure your local package.json and Retool. ```bash npx retool-ccl init ``` -------------------------------- ### GET Request with URL Parameter Source: https://docs.retool.com/queries/guides/api/rest This example demonstrates a GET request that includes a URL parameter. The parameter's value is dynamically set from the currently selected row of a Table component. ```javascript { "id": "{{ table1.selectedRow.data.id }}" } ``` -------------------------------- ### signature.focus() Source: https://docs.retool.com/apps/reference/components/signature Sets the keyboard focus to the signature component. This allows users to immediately start interacting with the component, for example, by typing or drawing. ```APIDOC ## signature.focus() ### Description Sets focus on the component. ### Method JavaScript ### Endpoint signature.focus() ### Parameters None ### Request Example ```javascript signature.focus(); ``` ### Response None ``` -------------------------------- ### Module Output Example Source: https://docs.retool.com/apps/web/guides/modules This example shows how to create a module with a text input and an output. The output is set to the value of the text input, allowing parent apps to reference it. ```javascript output1: {{ textInput1.value }} ``` -------------------------------- ### Role-Based Agent Instructions Source: https://docs.retool.com/agents/guides/prompting-guidance Example of instructions for a SQL query optimizer, outlining steps for analyzing query structure, identifying bottlenecks, suggesting optimizations, and explaining reasoning. ```text Act as a SQL query optimizer. For any query provided:1. Analyze the query structure2. Identify potential performance bottlenecks3. Suggest specific optimizations4. Explain the reasoning behind each suggestion ``` -------------------------------- ### Fetch Remote File via REST Source: https://docs.retool.com/queries/guides/files Example GET request to retrieve a remote image file using a REST query. ```http GET https://github.com/tryretool.png ``` -------------------------------- ### Kubernetes Node Capacity Example Source: https://docs.retool.com/self-hosted/quickstarts/kubernetes/manifests Example output showing the capacity of a Kubernetes node. Verify that 'cpu' and 'memory' meet the specified requirements. ```text Capacity: attachable-volumes-aws-ebs: 25 cpu: 8 ephemeral-storage: 83873772Ki hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 7931556Ki pods: 29 ``` -------------------------------- ### Example API Spec URLs Source: https://docs.retool.com/data-sources/guides/connect/rest Import an OpenAPI or Swagger specification by providing its URL to enable guided query creation and autocompletion. ```text https://api.example.com/openapi.json https://api.example.com/swagger.yaml https://petstore.swagger.io/v2/swagger.json ``` -------------------------------- ### Start Trigger Webhook Configuration Source: https://docs.retool.com/assets/edu/ai/ai-action-wf.json Configuration for the 'startTrigger' webhook, including headers, input schema, and example JSON input for ticket-related data. ```json {"ticket1":"I have lost my baggage and need someone to help me locate it! This is the third time this has happened in the past month and I am an exclusive frequent flyer on Air New England! This shouldn't be happening. Maybe I should switch to Nantucket Air!","ticket2":"I am a frequent flyer and I need help because I missed my flight.","ticket3":"I have missed my flight and need help."} ``` -------------------------------- ### Set up Python Virtual Environment Source: https://docs.retool.com/agents/tutorials/a2a-tutorial Create and activate a Python virtual environment for the project. This ensures dependencies are isolated. ```bash python3.12 -m venv venv source venv/bin/activate ``` -------------------------------- ### Get Agent Card cURL Example Source: https://docs.retool.com/agents/reference/a2a-endpoints Use this cURL command to retrieve an agent's information, including its capabilities and skills, via its agent card. ```curl curl --url "https://example.retool.com/api/agents/a2a/agent_id/.well-known/agent-card.json" \ -H "Content-Type: application/json" \ -H "X-Api-Key: retool_wk_########" ``` -------------------------------- ### Example URL for Data Source Source: https://docs.retool.com/mobile/reference/components/media/image This example shows a URL format that can be used for data sources. Ensure the URL is valid and accessible. ```text falsehttps://upload.wikimedia.org/wikipedia/commons/1/14/Marspathfinder.pdf ``` -------------------------------- ### Kubernetes Node Capacity Example Source: https://docs.retool.com/self-hosted/quickstarts/kubernetes/helm Example output from 'kubectl describe nodes' showing the capacity of a node, including CPU and memory. Verify these values meet the recommended specifications. ```text Capacity: attachable-volumes-aws-ebs: 25 cpu: 8 ephemeral-storage: 83873772Ki hugepages-1Gi: 0 hugepages-2Mi: 0 memory: 7931556Ki pods: 29 ``` -------------------------------- ### Get Task cURL Example Source: https://docs.retool.com/agents/reference/a2a-endpoints Use this cURL command to retrieve the status of a specific task. Ensure you replace 'agent_id' and 'task_id' with actual values and provide your API key. ```curl curl --url "https://example.retool.com/api/agents/a2a/agent_id/v1/tasks/task_id" \ -H 'Content-Type: application/json' \ -H 'X-Api-Key: retool_wk_######' ``` -------------------------------- ### Stripe Event Payload Example Source: https://docs.retool.com/workflows/guides/triggers/webhooks This JSON represents a Stripe event payload for a 'setup_intent.created' event. It contains detailed information about the created Setup Intent, which can be accessed within your workflow. ```json { "id": "evt_1NG8Du2eZvKYlo2CUI79vXWy", "object": "event", "api_version": "2019-02-19", "created": 1686089970, "data": { "object": { "id": "seti_1NG8Du2eZvKYlo2C9XMqbR0x", "object": "setup_intent", "application": null, "automatic_payment_methods": null, "cancellation_reason": null, "client_secret": "seti_1NG8Du2eZvKYlo2C9XMqbR0x_secret_O2CdhLwGFh2Aej7bCY7qp8jlIuyR8DJ", "created": 1686089970, "customer": null, "description": null, "flow_directions": null, "last_setup_error": null, "latest_attempt": null, "livemode": false, "mandate": null, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": "pm_1NG8Du2eZvKYlo2CYzzldNr7", "payment_method_options": { "acss_debit": { "currency": "cad", "mandate_options": { "interval_description": "First day of every month", "payment_schedule": "interval", "transaction_type": "personal" }, "verification_method": "automatic" } }, "payment_method_types": [ "acss_debit" ], "single_use_mandate": null, "status": "requires_confirmation", "usage": "off_session" } }, "livemode": false, "pending_webhooks": 0, "request": { "id": null, "idempotency_key": null }, "type": "setup_intent.created" } ``` -------------------------------- ### Microsoft SQL Server Connection String Example Source: https://docs.retool.com/data-sources/guides/connect/microsoft-sql-server Use this example to autofill the configuration fields for your Microsoft SQL Server resource. Ensure you replace the placeholder values with your actual server, database, user ID, and password. ```sql Server=myserver.database.windows.net,1433;Database=mydb;User Id=myuser;Password=mypassword; ``` -------------------------------- ### Example cURL command to send a webhook event Source: https://docs.retool.com/workflows/guides/triggers/webhooks Use this cURL command to send a POST request to your Retool Workflow's start trigger endpoint. Ensure you replace the placeholder URL and API key with your actual values. The command includes a JSON payload and sets the Content-Type and API key headers. ```bash curl -X POST --url "https://api.retool.com/v1/workflows/43rewfs-7da9-ddgfet32-fddfr3-43rewf344gre/startTrigger" --data '{"hello":"world"}' -H 'Content-Type: application/json' -H 'X-Workflow-Api-Key: retool_wk_fdsedgf3t4t3grg34354656' ``` -------------------------------- ### Example Prompt for Assist Source: https://docs.retool.com/data-sources/guides/connect/azure-blob-storage Use this prompt to list all files in a container using Azure Blob Storage via Retool's Assist feature. ```text list all files in my-container using @Azure Blob Storage ``` -------------------------------- ### Timestamp Example Source: https://docs.retool.com/queries/reference/libraries/utils An example of a numeric timestamp value. ```text 1617024000000 ``` -------------------------------- ### PostgreSQL Connection Options Examples Source: https://docs.retool.com/data-sources/guides/connect/postgresql Add custom connection parameters as query parameters for PostgreSQL. Examples include setting the search path, application name, and connection timeouts. ```sql search_path=public,app_schema ``` ```sql application_name=retoolconnect ``` ```sql connect_timeout=10 ``` ```sql statement_timeout=30000 ``` -------------------------------- ### Request Body Example Source: https://docs.retool.com/queries/reference/objects/query Example of a request body payload. ```json {"key": "value"} ``` -------------------------------- ### Configuration Assistant Prompt Source: https://docs.retool.com/education/labs/fundamentals/agentside Use this prompt to guide the Configuration Assistant in setting up an inventory management agent. ```text Create a inventory management agent that is able to examine @Retool Database , flash_inventory table and answer questions about the suppliers in this table including costs, lead time, manufacturing time and delivery time. ``` -------------------------------- ### CockroachDB Connection Options Examples Source: https://docs.retool.com/data-sources/guides/connect/cockroachdb Add custom connection options as query parameters for advanced configurations. ```text search_path=public,app_schemaapplication_name=retoolstatement_timeout=30000 ``` -------------------------------- ### Tracestate Example Source: https://docs.retool.com/queries/reference/objects/query Example of tracestate usage. This property is a read-only string. ```string false"congo=t61rcWkgMzE" ``` ```string false{"Content-Type": "application/json"} ``` -------------------------------- ### CouchDB Host Examples Source: https://docs.retool.com/data-sources/guides/connect/couchdb Examples of host configurations for CouchDB, including cloud-hosted, local development, IP addresses, and dynamic values from Retool components. ```javascript // Cloud-hosted CouchDB couchdb.example.com // Local development localhost // IP address 192.168.1.100 // Dynamic from dropdown {{ serverSelect.value }} ``` -------------------------------- ### Installation Source: https://docs.retool.com/apps/reference/retool-cli Install the Retool CLI globally using npm. Node.js is a prerequisite. ```APIDOC ## Installation ``` npm install -g retool-cli ``` Retool CLI requires [Node.js](https://nodejs.org/en). ``` -------------------------------- ### Summarize Compliance Documents Query Source: https://docs.retool.com/data-sources/guides/connect/azure-openai This example demonstrates how to configure a query to analyze compliance documents and extract key requirements. It sets a specific deployment and temperature, and provides a system message and prompt for analysis. ```text You are a compliance analyst. Analyze documents and provide structured summaries of regulatory requirements, key obligations, and potential compliance risks. ``` ```text Analyze this compliance document and provide:1. Primary regulatory requirements (list 3-5)2. Key obligations for the organization3. Compliance risks and mitigation strategiesDocument: {{ documentTextarea.value }} ``` -------------------------------- ### Example Content-Length Value Source: https://docs.retool.com/queries/reference/objects/query This example shows a possible value for the content-length property. ```javascript false"1234" ``` -------------------------------- ### Context-Rich Agent Instructions Source: https://docs.retool.com/agents/guides/prompting-guidance Example of instructions for Retool app debugging, focusing on identifying component types, checking configurations, suggesting fixes, and providing example code. ```text You are helping with Retool app debugging. Given the error message:- First identify the component type involved- Check for common configuration issues- Suggest specific fixes- Provide example code if relevantOnly use features available in the current Retool version. ``` -------------------------------- ### Deploy Component Using Environment Variables Source: https://docs.retool.com/apps/guides/custom/custom-component-libraries/retool-ccl Configure deployment parameters like URL and access token using environment variables for non-interactive execution. ```bash RETOOL_CCL_URL=http://yourretoolinstance.com RETOOL_CCL_ACCESS_TOKEN=retool_01...8cp npx retool-ccl deploy ``` -------------------------------- ### Timestamp Example Source: https://docs.retool.com/queries/reference/objects/query This example shows a timestamp value. It is read-only and defaults to null. ```text false1617024000000 ``` -------------------------------- ### Audio URL Example Source: https://docs.retool.com/apps/reference/components/microphone This example shows how to set the audioURL property with a base64-encoded audio string. This is useful for pre-loading audio into the component. ```javascript false"data:audio/ogg;base64,SGVsbG8gV29ybGQ=" ``` -------------------------------- ### surfacePrimary Color Example Source: https://docs.retool.com/apps/reference/objects/theme This example shows the format for the surfacePrimary color value. ```text false#FFFFFF ``` -------------------------------- ### scrollIntoView Example Source: https://docs.retool.com/apps/reference/components/file-input Example of how to use the scrollIntoView method with behavior and block properties. ```APIDOC ## scrollIntoView Example ### Description Example of how to use the scrollIntoView method with behavior and block properties. ### Code ```javascript fileInput.scrollIntoView({behavior: 'auto', block: 'nearest'}); ``` ``` -------------------------------- ### PostgreSQL Host Examples Source: https://docs.retool.com/data-sources/guides/connect/postgresql Provide the hostname or IP address of your PostgreSQL server. Examples include RDS instances, internal hostnames, and IP addresses. ```sql mydb.abc123.us-east-1.rds.amazonaws.com ``` ```sql postgres-instance.c.my-project.internal ``` ```sql postgres.example.com ``` ```sql 192.168.1.100 ``` -------------------------------- ### Install Retool CLI Source: https://docs.retool.com/apps/reference/retool-cli Install the CLI globally using npm. Requires Node.js. ```bash npm install -g retool-cli ``` -------------------------------- ### Install Cert-Manager Source: https://docs.retool.com/self-hosted/quickstarts/kubernetes/manifests Install cert-manager using Helm, specifying the namespace, version, and essential configuration options for integrating with Let's Encrypt. ```bash helm install \ cert-manager jetstack/cert-manager \ --namespace cert-manager \ --create-namespace \ --version v1.11.0 \ --set installCRDs=true --set ingressShim.defaultIssuerName=letsencrypt-prod \ --set ingressShim.defaultIssuerKind=ClusterIssuer \ --set ingressShim.defaultIssuerGroup=cert-manager.io ``` -------------------------------- ### Example urlParams object Source: https://docs.retool.com/workflows/reference/objects/starttrigger This is an example of the `urlParams` object structure. It is included on webhook triggers only. ```json false{"id": "238j23abse9"} ``` -------------------------------- ### Setting Bar Mode to Stack Source: https://docs.retool.com/apps/reference/components/bar-chart This example demonstrates how to set the bar mode to 'stack'. This is useful for visualizing parts of a whole. ```javascript false"stack" ``` -------------------------------- ### HTTP Method Example Source: https://docs.retool.com/queries/reference/objects/query Example of HTTP method usage. This property is a read-only string. ```string falseGET ``` ```string falsePOST ``` -------------------------------- ### Font Properties Example Source: https://docs.retool.com/mobile/reference/objects/theme An example demonstrating the usage of fontWeight and fontSize properties together. ```APIDOC ### Examples ``` false{"fontWeight": "700","fontSize": "18px"} ``` ``` -------------------------------- ### MySQL Connection String Example Source: https://docs.retool.com/data-sources/guides/connect/mysql Use this format to autofill MySQL connection fields. It includes the username, password, host, port, and database name. ```text mysql://username:password@host:3306/dbname ``` -------------------------------- ### Example pageTag values Source: https://docs.retool.com/mobile/reference/objects/retoolcontext Examples of pageTag values used to specify app versions. ```text falselatest ``` ```text false1.0.0 ```