Bigin Variables | Using Bigin Variables and widgets to build an AI-assisted email composer

Bigin Variables | Using Bigin Variables and widgets to build an AI-assisted email composer

Hello Biginners!

In our previous post, we explored how to embed custom UI components inside Bigin using widgets. Building on that, this post looks at Bigin Variables and how they work together with widgets to build a topping that is easy to configure and maintain. To show this in action, we will walk through a real use case for a topping called Bigin With GLM, an AI-powered follow-up email composer built into the Contacts module of Bigin.

What are Bigin Variables?

Bigin Variables are org-level values stored in your Bigin account. They are not tied to any record or module. They belong to the topping and can be read or updated by your code at any time. 

You can think of them as a settings layer for your topping. Instead of hard-coding values directly into your code, you store them as separate variables for which values can be dynamically provided by the end user during topping installation. Once the topping is published, admins can access and manage these values directly from their Bigin account based on the permissions you set, without any involvement from the developer.

To create a variable, go to Custom Properties in the left panel of the Developer Console and click Create your first Bigin variable.


Fill in the Variable Name and choose a Variable Type based on the kind of value the variable will hold, such as Single Line for short text values like a model name. Next, set the Permission to control who can see and change the value. A Read/Write variable is visible to the end user and can be updated by them at any time. A Read Only variable is visible but cannot be changed. A Hidden variable is hidden from the UI and is only accessible through code. Once you have filled in all the details, click Save.

Notes
Note: The Developer Console will add your topping namespace as a prefix to the API name automatically. Always use the full prefixed API name to access the variable in your Deluge code.
Now that we know what Bigin Variables are, let us see how they are used in a real topping.

The use case: Bigin With GLM

Sales reps spend a lot of time writing follow-up emails after calls and meetings. Writing a good, personalized email for every contact takes time, especially when managing many deals at once.

Bigin With GLM solves this by adding an AI email composer directly into the Contacts module. When a rep opens a contact record and clicks the Send AI Mail button, a widget opens. The widget reads the contact's details, such as their name, job title, company, industry, open deals, recent activities, and notes, and uses that information to generate a personalized follow-up email using the GLM AI model. The rep can review and edit the email, then send it from within Bigin. The sent email is saved as a note on the contact record automatically.

This topping uses four components from the Bigin Developer Console: Connections, Bigin Variables, widgets, and Deluge REST API functions. Let's put these components together and build the topping.

Setting up the topping

To build and test Bigin With GLM, follow these steps in order.

Start by creating the two Connections in the Bigin Developer Console. BiginWithGLM is a default Bigin service connection with the OAuth scopes ZohoBigin.modules.ALL, ZohoBigin.settings.variables.READ, and ZohoBigin.send_mail.all.CREATE. GLM Connection is a custom service connection using API Key authentication for the GLM API at https://api.z.ai. For step-by-step instructions on creating these connections, refer to our earlier posts on setting up default service connections and setting up custom service connections in this series.


Next, let's create a Bigin Variable that will be used to get the AI model name from the end user. AI providers update and deprecate their models regularly, and hard-coding the model name in the Deluge function would mean a developer has to update the code and republish the topping every time that happens. By storing it as a Read/Write variable instead, an admin can update the model name directly from their Bigin account the moment a newer model is available, and the topping will start using it right away, with no code changes and no republishing needed. This is how Bigin Variables are of real value. To do this, go to Custom Properties and create the AI Model name variable. Set the Variable Name to AI Model name, the Variable Type to Single Line, the Permission to Read/Write, and leave the value field empty. Then click Save.


NotesNote: The Value field is left empty here because the model name will be prompted during the topping installation. When an admin installs the topping, they will be asked to enter the model name, and it will be saved as the variable value automatically.
After that, set up the widget. If you have not read our previous post on widgets, we recommend going through it first: using widgets to extend the Bigin UI.

Go to Connected Apps and create a new Connected App with Internal Hosting. Build your ZET project locally, add the BiginWithGLM.zip file from the attachment, and upload the packaged ZIP.


Then go to Components and select the Links & Buttons tab. Click Create Your Button. Set the module to Contacts, name the button Send AI Mail, and set the placement to View Page. For the action, select Invoke a Widget. In the Sandbox URL, provide the path to your widget file.

The Production URL will be populated automatically from your Connected App once the zip file is uploaded. The Dimension is set to 700 x 700 px by default. Click Save.


When the Send AI button is clicked, the widget opens and calls the Deluge functions (which will be discussed be in next section) in the background to fetch the contact's details and generate a personalized email draft.

The widget is built as a simple HTML file that loads inside Bigin using the Bigin Widget SDK. It has three fields: a To field that is pre-filled with the contact's email address from the PageLoad event, a Subject field, and a Body field that the rep can edit. There are two buttons: Generate Draft and Send Email.

The rep can review the draft, make any edits, and send it directly to the contact's email address from within Bigin. Let's look at how these Deluge functions make that happen.

The Deluge functions

Bigin with GLM uses two Bigin REST API Functions, both called by the widget using ZOHO.BIGIN.FUNCTIONS.execute(). The first function generates the email draft, and the second function sends it. The full code for both functions is available in the attachment.

The first function, generate_followup_draft, is the main function of the topping. It reads the AI model name from the biginai__AI_Model_name variable, then fetches the Contact record, the linked Company record, open Deals, Activities, and Notes. After gathering all the data, the function builds a prompt, calls the GLM API using the GLM Connection with the model name from the variable, and returns the draft to the widget.

The second function, send_followup_mail, sends the email and saves it as a note on the Contact record. After sending, it saves the email as a note titled Follow-up Email Sent.

With both functions in place, the topping is ready to be published. For detailed instructions on how to test and publish your topping, refer to our post on testing and publishing Bigin toppings in this series.

What happens when the topping is installed

Once the topping is published, you can test it by creating a Contact record in Bigin with relevant details such as the contact's name, job title, company, and email address. Adding a description about the contact's background and a note about your recent interaction with them will help the AI generate a more personalized and contextual email draft.

Once the contact record is ready, open the Contact record and click the Send AI Mail button. The widget will open and generate a personalized email draft based on the contact's details. Review the draft, make any edits, and click Send. The email will be sent from your account and saved as a note on the contact record automatically.

For a detailed walkthrough of the topping in action, watch our screen recording.


In this post, we built Bigin with GLM, an AI-powered topping, and used it to show how Bigin Variables and widgets work together in a real topping. Bigin Variables gave us a settings layer to store the AI model name so admins can update it without touching the code, and the Widget brought the experience directly into the Contacts module so reps can generate and personalized emails without leaving Bigin.

Combined with the Connections, Deluge Functions, and other components we have covered in our previous posts, you now have a complete picture of how a production-ready topping is built. We will continue exploring more components of the Bigin Developer Console in our next posts.

Stay tuned!

Attachments

<< Previous                                                                                                                                                                                                                    




    • Recent Topics

    • Function #50: Send Mass emails to your customers

      Hello everyone, and welcome back to our series! We have reached a milestone of 50 Functions, which means that we have automated 50 different tasks in Zoho Books. Every Friday, we have shared a nifty function aimed at either automating a task or streamlining
    • Time tracking

      Hi there We are looking for a simple, intuitive but powerful time track application. We bill our clients by the time we spend, and so need to link Clients<>Projects<>Tasks or Activities<> Time spent. Is there an app in Zoho we could use? Many thanks.. Morri
    • Staff Tracking in

      Hi , I would like to see what activity my staff does over Zoho CRM and over Zoho Mail . I need to know which deals in CRM haven't been touched or had an activity on by a particular staff member . Basically need to establish what work.gets done by WFH
    • Zoho Projects connector with Zoho CRM (Related List module) features

      Hi community, I use Zoho Projects connected to Zoho CRM, where we associate Projects with Deals, clients, etc.. I am looking to change/edit the fields that are available in the integration. Currently it shows Project Status, Project Completion, Milestones,
    • Report: avg time to visit each lead

      We are on zoho one. our sales team visits leads using the ZohoCRM app. They track their hours using the zoho books timer. So the results in zoho books look like this: -total hours worked: 8 In ZohoCRM we have a custom date/time field in each lead record
    • Creating a Stop Start Timer for Custom Moduel

      Hello, I am trying to track Maintenance of internal Assets through Zoho CRM (I have tried the FSM, Projects, Inventory apps nothing is working the way I need it to). I have it all built in the CRM where I have internal work orders where i can keep track
    • Logging time to a Sales Lead in CRM

      Hi, Is there a way to log time against a Sales Lead / Deal in CRM before it is won and becomes a project? Our employees often do work for sales opportunities and need to log time against them at any point of the sales cycle, before it is won. Thanks, Atif
    • Hourly Billing in Zoho CRM Deals, Books, and Projects?

      We bill on an hourly basis and need that time added into a client's invoice in Books. A client might have multiple deals open with us that we are working on, and billing separately, and thus need separate invoices for each. The functionality of Projects
    • Time taken on a task

      I notice that you can record the length of a call, but not an event or a task. When a potential progresses from beginning to end it is just a series of tasks/calls/events in a process.  I have most of it automated depending on the type of sale and triggered by updating the sales cycle field. It follows that you should be able monitor the time of each of them so that you actually know how much time you spend on each potential. This gives an idea of profitability of each potential. I would think this
    • Timesheets from Deals

      Hi Guys, new Zoho One customer here with only a few employees. I run a small software company and currently our small number of employees are creating manual timesheets in excel. There is a column for a job number (that relates to a Zoho Deal) and they just put in the time taken to perform the work. As an example, they might spend 1 hour running some barcodes for a particular client (and deal). Then they may do a support all for another client and that takes 2 hours (This client would have a yearly
    • Timesheet option in zoho crm

      Recording a timesheet against a job is very crucial for every business because it will help them in billing the client accordingly and also it keeps a track on how much time a user is exactly taking in marking the job as cloed. Currently in crm there
    • Portal access is now available in the Zoho CRM mobile app

      Hello everyone, Zoho CRM Portals provide a secure space for sharing selected records with people outside your organization. These portal users can include customers, vendors, partners, or anyone who needs access to specific CRM data. Previously, portal
    • Field of Lookup - 5 Field Association Limit.

      This query relates to the post at: https://help.zoho.com/portal/en/community/topic/introducing-the-field-of-lookup-in-crm-public-early-access-2023 My simple (and common) scenario: I select an account / customer lookup and want their address pulled into
    • Zoho Forms API

      Is there any way to get all form entry list using API? Looking forward to hear from you
    • Multiple locations

      I have many customers (accounts) that have multiple locations, like bank branches. How can I manage them under one account?
    • Calendar won't load

      I run into this problem about once a week, where I try to open my Zoho calendar in a web browser, and it just gets stuck, waiting forever to load (see attached screenshot). I'm usually using Edge or Duck-Duck-Go browser. Sometimes it loads just fine,
    • Feature Request: Enhance Zoho Books Customer Approvals with WhatsApp, Multiple Approvers, Automated Reminders, and Workflow Automation

      Product: Zoho Books Module: Time Tracking → Customer Approvals Category: Feature Enhancement / Workflow Automation / Omnichannel Communication Description I would like to suggest several improvements to the Customer Approvals module in Zoho Books, particularly
    • Feature Request: Extend Zoho Books Customer Approvals API and MCP Support

      Product: Zoho Books Category: API Enhancement / OAuth Scopes / MCP Integration Feature: Customer Approvals (Timesheet Approvals) Description I would like to suggest an enhancement to the integration and automation capabilities of Zoho Books, specifically
    • Introducing PRM: Build, manage, and scale your partner ecosystem

      Growing a partner ecosystem is a good problem to have. What starts as a handful of partners can quickly turn into a maze of spreadsheets, emails, and disconnected processes. More partners mean more opportunities, greater reach, and new ways to grow
    • Tip: #14 Save words and phrases in Writer for faster writing!

      As you start working with more documents everyday, you'd find yourself using certain words and phrases across documents quite often. In this week's tip, let's discuss two easy ways to train Writer to remember your commonly used words—equipping you to
    • Introducing the Markdown editor in Zoho Learn

      Hello everyone, We're excited to announce the release of the Markdown editor in Zoho Learn. With Markdown editor, you can create and import articles as Markdown. You can write content using simple Markdown syntax and see how it looks with the built-in
    • Zoho ERP | Product updates | October 2026

      Hello users, A new month, a fresh set of updates in Zoho ERP. This month brings Netting, enhancements across our verticals, and more updates to help streamline your everyday work. Explore this month’s updates and see what’s new. Compliance with Revised
    • Zoho Forms - Feature Request - Embed iFrame or Dynaic URLs in Description fields

      Hi Zoho Forms team, I'm working with a client who uses Zoho Forms internally to collect information over the phone from potential work placement candidates. At the end of the form, the candidate needs to be booked in for an induction, which we've configured
    • BANK FEED - MAYBANK , provider from YODLEE IS NOT WORKING

      As per topic, the provider YODLEE is not working for the BANK FEED. It have been reported since 2023 Q3, and second report on 2023 Q4. now almost end of 2024 Q1, and coming to 2024 Q2. Malaysia Bank Maybank is NOT working. can anyone check on this issue?
    • Digest Octobre - Un résumé de ce qui s'est passé le mois dernier sur Community

      Bonjour chers utilisateurs, Bienvenue dans ce nouveau digest de la communauté Zoho France ! Vous y trouverez les discussions marquantes, les nouveautés produits, les conseils pratiques partagés et bien sûr les événements à venir. Le mois dernier, nous
    • Bank feeds - still a problem

      I'm really frustrated that the bank feeds only "sometimes" work.  I raised this problem once before and was advised that Zoho used Yodlee and feeds were only updated once a day.  That's fine but it only "sometimes" seems to work.  Eventually transactions appear but they sometimes seem to take days.  I know of other programs (Xero) that another business I am involved with uses Yodlee and they do not have this issue. My bank feeds are active,  I tried to manually refresh however Zoho tells me that
    • this is getting ridiculous

      My checking account bank feeds haven't worked since 6/4/21.  Multiple emails to Zoho since 6/10, and all they tell me is they have re-escalated my problem to their banking service provider team.  14 days and nothing is fixed. I'm just about ready to bail
    • No feedback from Zoho Books regarding Yodlee feeds for Investec

      I reported on 6 Feb 2025 that the Bank Feeds for Investec bank via Yodlee are not working. To date there has been no resolution. You are charging us for a suite of products where the functionality does not work. Please advise how you will refund me for
    • ongoing bank sync problems

      My bank feed broke May 14th 2021 Since then I just get an endless stream of we are working on it, "Kindly bear with us for sometime" from support Multiple times I have asked to speak to managers and half the time they don't call at all. If they do call
    • We must admit - Yodlee is an unreliable partner!

      Hello Zoho, Our Yes Bank account intergration is messed up since the beginning and the problem has not been addressed yet. With bad synchronization, poor categorization of transactions, duplicate/unknown copies of accounts, no support, geared at income/expenses,
    • Make your PDFs clearer with shapes

      Sometimes the best way to mark up a PDF is to point at it directly. Zoho PDF Editor includes shape tools that let you add circle, check and cross marks anywhere in your PDF, so you can flag content for review without extra comments. Here's what you can
    • Admin Logging in as another User

      How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Latest Update (27th April 2026): With the early
    • Project Migration

      We currently have two separate Zoho organizations: A Spark Robotic organization under Zoho CRM Plus A separate Contract Manufacturing organization under Zoho One We are working with Zoho Support to consolidate the CRM Plus organization into our existing
    • CNIL - Suivi de Pixel

      Bonjour à tous, À la suite de la nouvelle recommandation de la CNIL sur les pixels de suivi dans les e-mails, savez-vous si Zoho Campaigns permet : de conditionner le suivi des ouvertures au consentement de chaque contact ; de proposer un lien permettant
    • Live connection to DS files in Zoho Creator / ChatGPT

      As an idea, we are using ChatGPT to build with Zoho Creator (outside of Zia), which is works brilliantly to assist write deluge, provide test suggesitons etc. Currently we are uploading the DS files which are very point in time, it would be great to have
    • Improved Filtering and Tagging options for Notes

      We rely on the notes section across several modules and would love to have some more options in filtering, grouping, and tagging notes. We would like to be able to filter notes differently on a contact or deal and have that choice stay on that record
    • Action required: Update the Zoho Desk Client SDK URL in your extensions

      Hi Developers, To improve reliability and performance, the Zoho Desk Client SDK is now served from a new CDN domain. We request that you update your existing extensions with the new Client SDK URL given below. Note: Going forward, all newly created extensions
    • Decoupling Email Sending from Storage in CRM & Email Storage Add-on Purchases

      Hello everyone, We are excited to announce the rollout of the second phase of our email storage management, designed around a simple principle: your business communication should never be disrupted by storage limits. We've decoupled email sending from
    • Enhancement Request: Preserve Canceled Zoho Bookings Meetings in CRM

      I recently worked with Zoho Support on ticket 170383788 regarding what happens in Zoho CRM when an appointment is canceled in Zoho Bookings. Support confirmed that the current behavior is intentional: when a Bookings appointment is canceled, the corresponding
    • Edit PDFs using Zoho PDF Editor

      Hello users, In a previous article, we covered the organizing capabilities of Zoho PDF Editor. Here, we'll provide a quick recap of its editing features, including a few new additions. A few highlights of Zoho PDF Editor's editing capabilities: Add and
    • Next Page