LogoLogo
HomeExploreDocsAPIBlogContact
  • 🗃️Gooey.AI Docs
  • Changelog
  • 📖Guides
    • 🤖How to build an AI Copilot?
      • AI Prompting: Best practices
      • Curate your Knowledge Base Documents
      • Advanced Settings
      • Prepare Synthetic Data
      • Conversation Analysis
        • Glossary
      • Building a Multi-Modal Copilot
      • Frequently Asked Questions about AI Copilot
      • How to Automate Data Export?
    • 🚀How to deploy an AI Copilot?
      • Deploy to Web
      • Deploy to WhatsApp
      • Deploy to Slack
      • Deploy to Facebook
      • Broadcast Messages (via web or API)
      • Add buttons to your Copilot
    • ⚖️Understanding Bulk Runner and Evaluation
      • 💪How to set up Bulk Runner?
      • 🕵️‍♀️How to set up Evaluations?
      • How to use Bulk Run via API
    • 👄How to use AI Lip Sync Generator?
      • Lip Sync Animation Generator (WITH AUDIO FILES)
      • LipSync videos with Custom Voices
      • Set up your API for Lipsync with Local Folders
      • Tips to create great HD lipsync output
      • Frequently Asked Questions about Lipsync
    • 🗣️How to use ASR?
      • 📊How to create language evaluation for ASR?
    • How to use Compare AI Translations?
      • Google Translate Glossary
    • How does RAG-based document search work?
    • 🧩How to use Gooey Functions?
      • ✨LLM-enabled Functions
      • How to use SECRETS in Functions?
      • 🔥How to connect FirebaseDB to Copilot
    • 🎞️How to create AI Animations?
    • 🤳How to make amazing AI Art QR Codes?
      • API tips on AI Art QR Codes
    • 🖼️Create an AI Image with text
      • AI Image Prompting
      • API Tips for AI Image Generator
    • 📸AI Photo Editor
      • Build your avatar with AI
    • 🧑‍🏫How to use Gooey.AI’s Image Model Trainer?
    • 🔍Generate “People Also Ask” SEO Content
    • 🌐How to create SEO-Optimized content with AI?
    • How to use Workspaces?
      • How to use Version History?
      • How to add SECRETS in your Workspace?
    • 🍟How can I get free credits?
  • 😇CONTRIBUTING
    • Contributing
    • Documentation Style Guide
  • 🤓API REFERENCE
    • Getting started
    • API Generator
    • Rate Limits
    • Error Codes
  • 🍭ENDPOINTS
    • Copilot
    • Lipsync
    • Lipsync TTS
    • AI Art QR Generator
    • AI Animation Generator
    • Compare AI Image Generator
    • Gooey.AI on GitHub
Powered by GitBook
LogoLogo

Home

  • Gooey.AI
  • Explore Workflows
  • Sign In
  • Pricing

Learn

  • Docs
  • Blog
  • FAQs
  • Videos

Developers

  • How-to Guides
  • Get your Gooey.AI Key
  • Github
  • API Endpoints

Connect

  • Book a Demo
  • Discord
  • Team
  • Jobs

@Dara.network / Gooey.AI / support@gooey.ai

On this page
  • Using the Web-Based Graphical Interface
  • Programmatic Access via API
  • Specifying which Integration to Broadcast through
  • Example Code
  • Filtering Users

Was this helpful?

Edit on GitHub
  1. Guides
  2. How to deploy an AI Copilot?

Broadcast Messages (via web or API)

After you've connected your copilot to Slack or WhatsApp, you can send custom messages to your users to notify them of relevant news, reengage inactive users, and more!

Last updated 10 months ago

Was this helpful?

Using the Web-Based Graphical Interface

Navigate to the on the published run that you've connected. Expand "Configure Settings 🛠️" and scroll to the bottom of the settings. For supported integration types like Slack and WhatsApp, you should see the following input widget:

Enter your message and upload audio, video, and other documents as desired. Make sure the file type is supported by the relevant platform. WhatsApp currently supports audio/aac, audio/mp4, audio/mpeg, audio/amr, and audio/ogg. Slack has the best support for audio/mp4 or audio/mpeg. Once you're ready to send the messages, click "Send Broadcast" and you'll be prompted for confirmation. Upon confirmation, the messages will start sending. Depending on how many users you have, it can take a few minutes for all of them to be notified.

Programmatic Access via API

Specifying which Integration to Broadcast through

Example Code

# $ python3 -m pip install requests
# $ export GOOEY_API_KEY=sk-xxxx

import os
import requests

payload = {"text": "Hi, we've launched a new feature: you can now upload photos of your crops and ask questions about them!"}

response = requests.post(
    "https://gooey.ai/copilot/farmerchat-with-vision/?example_id=nuwsqmzp",
    headers={
        "Authorization": "Bearer " + os.environ["GOOEY_API_KEY"],
    },
    json=payload,
)
assert response.ok, response.content

result = response.json()
print(response.status_code, result)
// $ npm install node-fetch
// $ export GOOEY_API_KEY=sk-xxxx

import fetch from 'node-fetch';

const payload = {"text": "Hi, we've launched a new feature: you can now upload photos of your crops and ask questions about them!"};

async function gooeyAPI() {
  const response = await fetch("https://gooey.ai/copilot/farmerchat-with-vision/?example_id=nuwsqmzp", {
    method: "POST",
    headers: {
      "Authorization": "Bearer " + process.env["GOOEY_API_KEY"],
      "Content-Type": "application/json",
    },
    body: JSON.stringify(payload),
  });

  if (!response.ok) {
    throw new Error(response.status);
  }

  const result = await response.json();
  console.log(response.status, result);
}

gooeyAPI();
# export GOOEY_API_KEY=sk-xxxx

curl 'https://gooey.ai/copilot/farmerchat-with-vision/?example_id=nuwsqmzp' \
  -H "Authorization: Bearer $GOOEY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "text": "Hi, we have launched a new feature: you can now upload photos of your crops and ask questions about them!"
}'

Filtering Users

To only broadcast messages to certain subsets of users, we provide some filter options. These include

  • "wa_phone_number__in": list[string],

  • "slack_user_id__in": list[string],

  • "slack_user_name__icontains": string,

  • "slack_channel_is_personal": boolean

They can be added to the filter object of the payloads in the above example code. For example, to only broadcast to the WhatsApp accounts with phone numbers "1234" and "+1 (420) 666-6969", you could modify the payload to the following:

payload = {
    "text": "Hi, we've launched a new feature: you can now upload photos of your crops and ask questions about them!",
    "filters": {
        "wa_phone_number__in": ["1234", "+1 (420) 666-6969"]
    }
}

Note that WhatsApp restricts free-form message sending to users who have contacted you within the last 24 hours to prevent spam. To sidestep this issue, you can have your message templates . To do this, you must use a custom WhatsApp business integration on Gooey and not one where we manage the number for you. If you have questions, don't hesitate to contact us via .

The API supports a few extra features including only sending the message to some subset of users or adding custom buttons. To get started, click the (either here or from the integration tab shown above) to view the API documentation for message broadcasting.

You'll use some combination of the example_id and run_id query parameters to specify which of your connected published runs you want to broadcast through. These are the same parameters you'll see in the URL on Gooey.AI when you are or on the . To find your run, find it in your history and click on the title to activate it. Then inspect the URL, e.g. "" -- in this case, we only have the "example_id" query parameter so "https://api.gooey.ai/v2/video-bots/broadcast/send/?example_id=nuwsqmzp" would be our API endpoint URL.

Once you have your API endpoint, you are ready to start making requests. Here's some sample code in Python, NodeJS, and via :

📖
🚀
approved by WhatsApp
support@gooey.ai
API link
editing your run
integrations tab
https://gooey.ai/copilot/farmerchat-with-vision/?example_id=nuwsqmzp
CURL
integrations tab
The Broadcast Widget. Allows entering text and uploading audio, video, and miscellaneous file attachments. Hit "Send Broadcast" and subsequently click "confirm" to send a message to all your users!
API documentation for broadcasting.