---
title: "Examples — AVCodex Docs"
description: "Examples — AVCodex documentation for AV integrators, programmers, and ops teams."
lang: en
json-ld:
---

[](/)

Solutions

[Pricing](/pricing)[The Signal](/blog)[Resources](/resources)

Learn

[Free AI Assessment](/scorecard)[Get Started →](/pricing)

[Documentation Home](/docs)

Guides 

Custom Actions 

-   [Overview](/docs/custom-actions/overview)
-   [Getting Started](/docs/custom-actions/getting-started)
-   [Action Collections](/docs/custom-actions/action-collections)
-   [Parameter Configuration](/docs/custom-actions/parameter-configuration)
-   [Variables and Secrets](/docs/custom-actions/variables-and-secrets)
-   [Testing and Debugging](/docs/custom-actions/testing-and-debugging)
-   [Examples](/docs/custom-actions/examples)
-   [Single-Use Custom Actions](/docs/custom-actions/single-use-custom-actions)

Pro Actions 

API 

Builder API 

Agentic Commerce (ACP) 

Integrations 

[Docs](/docs)/ Custom Actions / Custom Actions 

# Examples

Last updated · MAR 2026 · [Read as Markdown](/docs/custom-actions/examples.md)

# Integration Examples

Common Custom Action patterns and real-world AV integrations.

* * *

> **Note:** Custom Actions require a Builder plan or higher. [Upgrade to Builder](https://app.avcodex.com/plans)

## [Slack notifications# ](#slack-notifications)

Push status updates from the agent to a Slack channel via webhook. Useful for install-team standups, commissioning callouts, or escalations.

### [Configuration# ](#configuration)

bash 

```
curl -X POST https://hooks.slack.com/services/{{var.SLACK_WEBHOOK_ID}} \
  -H "Content-Type: application/json" \
  -d '{
    "text": "{{message}}",
    "channel": "{{channel}}",
    "username": "AVCodex Bot"
  }'
```

### [Parameters# ](#parameters)

Parameter

Source

Configuration

`message`

AI Generated

Message content to send.

`channel`

AI Generated

Target channel (optional).

`SLACK_WEBHOOK_ID`

Variable

Your Slack webhook ID.

### [Usage# ](#usage)

\_"Post to #av-ops that Boardroom 4 commissioning passed."\_

## [OpenAI completions# ](#openai-completions)

Call OpenAI's API for an extra round of analysis (for example, summarizing a long commissioning checklist).

### [Configuration# ](#configuration)

bash 

```
curl -X POST https://api.openai.com/v1/chat/completions \
  -H "Authorization: Bearer {{var.OPENAI_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": {{system.message_history}},
    "temperature": 0.7,
    "max_tokens": {{maxTokens}}
  }'
```

### [Parameters# ](#parameters)

Parameter

Source

Configuration

`OPENAI_API_KEY`

Variable (secret)

Your OpenAI API key.

`message_history`

System variable

Conversation context.

`maxTokens`

AI Generated

Token limit (default: 1000).

## [SendGrid email# ](#sendgrid-email)

Send a transactional email, for example a client-acceptance email after commissioning.

### [Configuration# ](#configuration)

bash 

```
curl -X POST https://api.sendgrid.com/v3/mail/send \
  -H "Authorization: Bearer {{var.SENDGRID_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "personalizations": [{
      "to": [{"email": "{{recipientEmail}}"}],
      "subject": "{{subject}}"
    }],
    "from": {
      "email": "{{var.FROM_EMAIL}}",
      "name": "{{var.FROM_NAME}}"
    },
    "content": [{
      "type": "text/html",
      "value": "{{emailBody}}"
    }]
  }'
```

### [Variables# ](#variables)

bash 

```
SENDGRID_API_KEY = SG.abc123...
FROM_EMAIL = noreply@your-integrator.com
FROM_NAME = Your Integrator
```

## [Google Sheets# ](#google-sheets)

Read or append to a Google Sheet. Common use: an asset register or a per-room commissioning log.

### [Read data# ](#read-data)

bash 

```
curl -X GET "https://sheets.googleapis.com/v4/spreadsheets/{{var.SHEET_ID}}/values/{{range}}" \
  -H "Authorization: Bearer {{var.GOOGLE_API_KEY}}"
```

### [Append data# ](#append-data)

bash 

```
curl -X POST "https://sheets.googleapis.com/v4/spreadsheets/{{var.SHEET_ID}}/values/{{range}}:append" \
  -H "Authorization: Bearer {{var.GOOGLE_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "values": [[
      "{{system.timestamp}}",
      "{{system.user_id}}",
      "{{data}}"
    ]]
  }'
```

## [Webhook with dependencies# ](#webhook-with-dependencies)

Multi-step workflow using action dependencies. Example: register a new site, then push a welcome ticket to the field-service queue.

### [Step 1: create site record# ](#step-1-create-site-record)

bash 

```
curl -X POST https://api.example.com/sites \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{var.API_KEY}}" \
  -d '{
    "name": "{{siteName}}",
    "client": "{{clientName}}"
  }'
```

Returns: `{"data": {"id": "site_123", "name": "1200 Market"}}`.

### [Step 2: open kickoff ticket# ](#step-2-open-kickoff-ticket)

Use the site ID from Step 1:

bash 

```
curl -X POST https://api.example.com/tickets \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {{var.API_KEY}}" \
  -d '{
    "site_id": "{{siteId}}",
    "template": "kickoff",
    "send_at": "{{system.timestamp}}"
  }'
```

**Parameter configuration for \`site\_id\`:**

-   Source: Output from another Action.
-   Action: Create site record.
-   JSONPath: `$.data.id`.

## [CRM integration# ](#crm-integration)

Update client records in your CRM (HubSpot, Salesforce, ConnectWise).

### [Configuration# ](#configuration)

bash 

```
curl -X PATCH https://api.crm.com/v2/contacts/{{contactId}} \
  -H "Authorization: Bearer {{var.CRM_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "properties": {
      "last_contact": "{{system.timestamp}}",
      "last_message": "{{summary}}",
      "status": "{{status}}"
    }
  }'
```

### [AI instructions# ](#ai-instructions)

For `summary`:

code 

```
Summarize the key points of the conversation in 1-2 sentences. Mention any rooms, devices, or deadlines referenced.
```

For `status`:

code 

```
Choose one: 'rfp-open', 'design-review', 'install-active', 'commissioning', 'closed-won', 'closed-lost'.
```

## [Stripe payment# ](#stripe-payment)

Create payment intents via Stripe, for example accepting a deposit on a hospitality AV refresh.

### [Configuration# ](#configuration)

bash 

```
curl -X POST https://api.stripe.com/v1/payment_intents \
  -u "{{var.STRIPE_SECRET_KEY}}:" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "amount={{amount}}&currency=usd&customer={{customerId}}"
```

### [Parameters# ](#parameters)

Parameter

Source

Configuration

`STRIPE_SECRET_KEY`

Variable (secret)

Your Stripe secret key.

`amount`

AI Generated

Amount in cents.

`customerId`

AI Generated

Stripe customer ID.

## [Network monitoring lookup# ](#network-monitoring-lookup)

Pull a device's recent status from a monitoring tool, for example checking a Q-SYS Core or a Crestron 4-Series before dispatching a tech.

### [Configuration# ](#configuration)

bash 

```
curl -X GET "https://api.your-monitoring.com/devices/{{deviceId}}/status" \
  -H "Authorization: Bearer {{var.MONITORING_API_KEY}}"
```

### [Usage examples# ](#usage-examples)

\_"Is the Q-SYS Core in the auditorium online?"\_ \_"What was the last reboot time for the boardroom Crestron processor?"\_

## [GitHub integration# ](#github-integration)

Open issues in a repo, for example a control-system code library where programmers track Crestron SIMPL or Q-SYS Lua modules.

### [Configuration# ](#configuration)

bash 

```
curl -X POST https://api.github.com/repos/{{var.GITHUB_OWNER}}/{{var.GITHUB_REPO}}/issues \
  -H "Authorization: Bearer {{var.GITHUB_TOKEN}}" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "{{issueTitle}}",
    "body": "{{issueBody}}",
    "labels": {{labels}},
    "assignees": {{assignees}}
  }'
```

### [Parameter configuration# ](#parameter-configuration)

Parameter

Source

AI instructions

`issueTitle`

AI Generated

Concise issue title that names the module and symptom.

`issueBody`

AI Generated

Detailed description, include processor model and firmware.

`labels`

AI Generated

Array of labels, for example \["crestron", "simpl", "bug"\].

`assignees`

AI Generated

Array of GitHub usernames to assign.

## [Best practices# ](#best-practices)

### [1\. Error handling# ](#1-error-handling)

Always return clear error messages:

json 

```
{
  "success": false,
  "error": "API key invalid. Please check your credentials."
}
```

### [2\. Rate limiting# ](#2-rate-limiting)

Respect API rate limits:

-   Add delays between requests.
-   Implement exponential backoff.
-   Cache responses when possible.

### [3\. Security# ](#3-security)

-   Use HTTPS endpoints only.
-   Store credentials as secret variables.
-   Never log sensitive data.
-   Validate all inputs.

### [4\. Performance# ](#4-performance)

-   Paginate large result sets.
-   Use field selection to minimize data.
-   Implement timeouts (30s max).
-   Cache frequently accessed data.

### [5\. Testing# ](#5-testing)

-   Test with various inputs.
-   Verify error handling.
-   Check edge cases.
-   Monitor response times.

## [Next steps# ](#next-steps)

-   [Getting Started](/docs/custom-actions/getting-started)
-   [Parameter configuration](/docs/custom-actions/parameter-configuration)
-   [Manage variables](/docs/custom-actions/variables-and-secrets)
-   [Testing guide](/docs/custom-actions/testing-and-debugging)

\*AVCodex · Your AV expertise. Amplified by AI.\*

Was this helpful? 

[Edit this page →](#)

[

Previous

Testing and Debugging

](/docs/custom-actions/testing-and-debugging)[

Next

Single-Use Custom Actions

](/docs/custom-actions/single-use-custom-actions)

On this page

-   [Slack notifications](#slack-notifications)
-   [Configuration](#configuration)
-   [Parameters](#parameters)
-   [Usage](#usage)
-   [OpenAI completions](#openai-completions)
-   [Configuration](#configuration)
-   [Parameters](#parameters)
-   [SendGrid email](#sendgrid-email)
-   [Configuration](#configuration)
-   [Variables](#variables)
-   [Google Sheets](#google-sheets)
-   [Read data](#read-data)
-   [Append data](#append-data)
-   [Webhook with dependencies](#webhook-with-dependencies)
-   [Step 1: create site record](#step-1-create-site-record)
-   [Step 2: open kickoff ticket](#step-2-open-kickoff-ticket)
-   [CRM integration](#crm-integration)
-   [Configuration](#configuration)
-   [AI instructions](#ai-instructions)
-   [Stripe payment](#stripe-payment)
-   [Configuration](#configuration)
-   [Parameters](#parameters)
-   [Network monitoring lookup](#network-monitoring-lookup)
-   [Configuration](#configuration)
-   [Usage examples](#usage-examples)
-   [GitHub integration](#github-integration)
-   [Configuration](#configuration)
-   [Parameter configuration](#parameter-configuration)
-   [Best practices](#best-practices)
-   [1\. Error handling](#1-error-handling)
-   [2\. Rate limiting](#2-rate-limiting)
-   [3\. Security](#3-security)
-   [4\. Performance](#4-performance)
-   [5\. Testing](#5-testing)
-   [Next steps](#next-steps)

[](/)

The AI platform built exclusively for professional AV. Build, deploy, and sell AI tools that understand your industry.

### Platform

-   What You Can Build
-   Templates
-   [Pricing](/pricing)

### Services

-   [Done-For-You](/pricing)
-   [Academy](/academy)
-   [Contact](/contact)

### Company

-   About
-   [The Signal](/blog)
-   [Docs](/docs)
-   [LinkedIn](#)

© 2026 AVCodex. A Future Ready Holdings Inc. product. SOC 2 Type II Certified · HIPAA Compliant