Articles on: Integrations

Custom Functions

🔧 Custom Functions – Extend Your Chatbot's Capabilities


Overview


Custom functions allows you to extend your chatbot by connecting it to external APIs — enabling it to do things like send emails, create documents, or schedule calendar events, all through natural language.


What We’ll Build


We’ll build a custom function that sends targeted emails to users who requested a specific feature — using insights from past call transcripts. For example, after releasing dark mode, the chatbot can automatically identify users who asked for it and send them a thank-you email.


This closes the feedback loop and turns feature launches into personal, high-impact moments — all triggered by a single natural language command.


Left: User prompts BlazeSQL to send a thank-you email. Right: Preview dialog shows the email before it’s sent.



Step 1: Requirements


To make this workflow possible, your call transcripts need to be stored in a database that BlazeSQL can query — such as BigQuery, PostgreSQL, or Snowflake.


If you’re using a tool like Fathom, you can automate this by connecting it to Zapier and writing each transcript into your preferred database. Once transcripts are stored, BlazeSQL can search them to identify users who requested specific features and trigger targeted emails in response.



Step 2: Create the custom function


Open the new function dialog



  1. Click on the functions tab on the left side
  2. Click on the new function button



Set Up the API Connection



  1. API Endpoint: Enter the full URL to your email-sending API, for example use Zapier to send emails.


  1. Request Type: Choose POST.
  2. Authentication: Toggle it On.
  3. Type: Select Bearer token.
  4. Token: Paste your token here (this is used in the Authorization header).


Click Next to continue.



Define Parameters


Set the name and description



Now define the core settings for your function.


Fill in the following:


  • Name: Send emails
  • Description: Sends an email to one or more recipients using the provided subject and HTML body.


🔐 Ask for Approval Before Running



If you want to have control before the assistant executes the function, toggle on "Ask for approval in chat before running the function".


Here’s what it looks like in chat:


Approval Message Preview


Set receivers (Array) parameter


Receivers


  • Name: receivers
  • Type: Array
  • Description: List of email addresses to receive the email.


Set the subject (String) parameter


Subject


  • Name: subject
  • Type: String
  • Description: Subject line of the email.


Set the body (String) parameter


Body


  • Name: body
  • Type: String
  • Description: Main content of the email in HTML.


Click Next to continue.



Test the Function


Testing


Now test the function by entering values for:



Click Test to verify the integration.


Save the Function


Saving


  1. If the test is successful, you will see a confirmation message.
  2. A Save button appears at the bottom.
  3. Click Save to finalize and store your custom function.



Step 3: Use the function


Ask BlazeSQL to Send Emails



Once the function is set up, BlazeSQL can automatically use it in conversations — triggered by natural language.
For example, you can simply say:


Send an email to all users who mentioned ‘dark mode’ in their call transcripts. Let them know the feature is now available, thank them for their feedback, and make it look fancy.


Edit the Suggested Message (Optional)



BlazeSQL will generate a draft email based on your prompt. You can review and customize the content before sending it out.


Approve or Reject the Function Call




Before any email is sent, you’ll see a preview and can approve or reject the action — giving you full control over what gets delivered.





Updated on: 10/06/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!