Kaizen #134 Manipulating Rich Text Field (RTF) using Zoho CRM APIs

Kaizen #134 Manipulating Rich Text Field (RTF) using Zoho CRM APIs

 Hello everyone!

Last week, we discussed Deciding on the type of applications: Self-client or Server-based? This week, we will discuss the Rich Text Field (RTF) and how we can manipulate RTF using Zoho CRM APIs.
In this post, 
  1. What is a Rich Text Field (RTF)?
  2. Use case
  3. Rich Text Field creation in a module using the Create Custom Field API
  4. Adding values to the RTF using the Insert Records API 

  5. Fetch complete data of RTF using the GET - Rich Text Field API 
  6. Updating Rich Text Field using the Update Records API 
  7. Deleting RTF using the Delete Custom Field API
  8. RTF using the COQL API
  9.  RTF using Bulk APIs

1. What is a Rich Text Field?

The Rich Text field is the preferred choice when there is a need for formatted text and a larger character limit. It can accommodate up to 50,000 characters, including HTML elements that are generated when the text is formatted, making it ideal for entries that require styling and organization, such as product descriptions or detailed client communications. Although tooltips can be added to improve user interaction, the rich text field does not support encryption or mandatory input settings.

Using rich text can improve the visual appeal of your information by providing different font styles, colors, and highlights. This allows for effective communication of important details. Bullet points and numbered lists can enhance readability, while bold, italics, or underlined texts can emphasize crucial information. Increased and decreased indents can help organize data, and the strikethrough feature can easily indicate changes or updates.

2. Use case

Consider Zylker, an org that uses Zoho CRM as their sales management system to store reports or feedback on its employees' sales performance report, total revenue, sales breakdown by product, key achievement, challenges faced, action plan, and to-do lists. These are stored in the multi-line field's rich text format type for better visuals and to identify the important information easily.

Let us see how to create RTFs using APIs, and how to access or update RTF using different available APIs. Note that the Rich Text type of multi-line field is supported from version 6.

3. Rich Text Field creation in a module using the Create Custom Field API

To create a rich text field in a module, first know the module's API name using the GET - Modules Metadata API, then create a custom RTF field in that module.

Request URL to create Rich Text Field : 
{api-domain}/crm/v6/settings/fields?module=Employees

Request Method : POST

Sample Input :
{
    "fields": [
        {
            "field_label": "Feedback",
            "data_type": "textarea",
            "length": 50000,
            "textarea": {
                "type": "rich_text"
            },
            "tooltip": {
                "name": "static_text",
                "value": "employee's feedback"
            }
        }
    ]
}


4. Adding values to the RTF using the Insert Records API 

To add values to the created rich text field, you should know its API name. 
Using the api_name of the Employees module, make a GET - Fields metadata API call to get the list of fields (along with their api_name) in the Employees module. Search for the field in which you need to add values to the Rich Text Field. In our case, it is Feedback.

Request URL : {api-domain}/crm/v6/Employees
Request Method : POST

Sample Input :

{
    "data": [
        {
            "Company": "Zylker",
            "Name" : "Patricia Boyle",
            "Email": "patricia@zylker.com",
            "State": "Texas",
            "Feedback": "<b>Sales Performance Report</b><br><br><span style=\"font-style:normal;\"><b>Salesperson Name: </b></span> Patricia<br><b>Reporting Period:</b>  Q1 2024<br><br><b>Total Sales Revenue Generated:</b> <i><u>$250,000</u></i><br><br><b>Sales Breakdown:</b><br><br><ul style=\"list-style-type:disc;list-style-position:inside;padding-inline-start:20px;\"><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Product A:</span><span style=\"background-color:rgb(93, 195, 90);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> $100,000</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Product B:</span><span style=\"background-color:rgb(239, 177, 22);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> $80,000</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Product C: </span><span style=\"background-color:rgb(22, 208, 239);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">$70,000</span></p></li></ul><br><b>Key Achievements:</b><br><br><ul style=\"list-style-type:disc;list-style-position:inside;padding-inline-start:20px;\"><li><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Exceeded sales targets for Product A by</span><span style=\"background-color:rgb(255, 255, 255);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">  </span><span style=\"background-color:rgb(0, 176, 80);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">20%.</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Secured </span><span style=\"background-color:rgb(125, 207, 123);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">5 new clients for Product B</span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">, contributing to a </span><span style=\"background-color:rgb(93, 195, 90);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">25% increase </span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">in sales.</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"background-color:rgb(93, 195, 90);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Closed a high-value deal for Product C with a revenue of $50,000.</span></p></li></ul><br><b>Challenges Faced:</b><span></span><br><ul style=\"list-style-type:disc;list-style-position:inside;padding-inline-start:20px;\"><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Market competition intensified, resulting in</span><span style=\"background-color:rgb(242, 69, 69);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> longer sales cycles</span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">.</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Difficulty in accessing decision-makers for key accounts,</span><span style=\"background-color:rgb(242, 69, 69);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> leading to delays in closing deals</span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">.</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Some clients expressed concerns about pricing,</span><span style=\"background-color:rgb(242, 69, 69);color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> requiring additional negotiation efforts</span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">.</span></p></li></ul><br><b>Action Plan:</b><br><ol style=\"list-style-type:decimal;list-style-position:inside;padding-inline-start:20px;\"><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-style:normal;\"><b>Targeted Marketing Campaigns:</b></span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> Launch targeted marketing campaigns to increase brand visibility and attract potential clients.</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-style:normal;\"><b>Enhanced Networking:</b></span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\"> Strengthen networking efforts to establish connections with decision-makers and key stakeholders.</span></p></li><li style=\"color:rgb(51, 51, 51);\"><p style=\"display:inline;\"><span style=\"color:rgb(51, 51, 51);font-style:normal;\"><b>Client Retention Strategy: </b></span><span style=\"color:rgb(51, 51, 51);font-weight:normal;font-style:normal;\">Implement a client retention strategy to address pricing concerns and ensure customer satisfaction.</span></p></li></ol><br><b>To-Do Lists :</b><br>Continued focus on building strong<span style=\"background-color:rgb(255, 255, 0);\"> client relationships</span>, identifying <span style=\"background-color:rgb(255, 255, 0);\">new opportunities</span>, and leveraging resources effectively to<span style=\"background-color:rgb(255, 255, 0);\"> drive further sales growth in the upcoming quarters</span>."
        }
    ]
}


Notes:
  1. If you enter incorrect API names for fields, the system will skip them and the record will be created successfully, but the values won't be added. This rule applies to RTF too.
  2. When using the Insert Records API for bulk records creation and the Update Records API for bulk records update, you can add up to 50,000 characters to RTFs in each record.
  3. For details on supported HTML tags and their attributes, refer to the help document.

The below GIF shows the result of the above input in the UI.

 

When you add values using HTML tags to the RTF via API, the input will be transformed into formatted data.

5. Fetch complete data of RTF using the Rich Text Field API

The Rich Text Field supports up to 50000 characters. Using the GET - Records API, you can fetch only the first 500 characters of the rich text field ('Feedback' in our case) in the response. If the @has_more property in the GET- Records response is true for the Rich Text Field (RTF) value, it indicates that the RTF contains more than 500 characters.


To fetch the entire data, we have introduced the GET - Rich Text Field API in V6, enabling the retrieval of complete data from rich text fields.

Below Sample shows how to fetch full data :

Request URL : {api-domain}/crm/v6/Employees/5725767000002594018/actions/fetch_full_data
Request Method : GET

Response :


6. Updating Rich Text Field using the Update Records API 

Updating a rich text field doesn't require any special steps. It is similar to the process how we update other fields in a record, using the Update Records API.


7. Deleting RTF using the Delete Custom Field API


General notes :
  • Rich text fields are not supported in subforms, List View, Kanban View, Canvas View, Sheet View, Related Lists, Lookup popup, global search, filters and criteria, formula fields, report export, and integrations.
  • Rich text fields are not supported in the Search API.
  • Rich text fields are supported for importing and exporting records, using the Bulk APIs. The data will be exported as HTML content. For example, Patricia will be exported as <b>Patricia</b>.

8. Rich Text Field using the COQL API

Retrieve the Rich Text Fields from a module through a COQL query.  Note that RTFs cannot be used in the criteria. Similar to the GET - Records API, the COQL API response fetches up to 500 characters of the RTFs. To fetch its complete data, use the GET - Rich Text Field API.

Request Method : POST

Sample Input :

 {
    "select_query":"select 'Feedback' from Employees where Company is not null"
 }


Response :


9. Rich Text Field using Bulk APIs

Bulk Read API allows you to fetch a large set of data i.e., you can fetch a maximum of 200,000 records in a single API call. You can export complete data of rich text fields in a module. Note that RTFs cannot be specified in the criteria. 

Request Method: POST

Sample input :

{
    "callback": {
        "method": "post"
    },
    "query": {
        "module": {
            "api_name": "Employees"
        },
        "file_type": "ics"
    }
}


The Bulk Read API is an asynchronous API, the response will not be available instantly; the bulk read job is scheduled. Once the job is completed, it'll be notified in the callback URL. The records are available in a downloadable CSV file or ICS file (for events). 

Below is a sample downloaded CSV file:
Unlike the GET - Records API, the Bulk Read API fetched the RTF's complete data.



See our Bulk Read API documentation to know how to view the status of the scheduled job and download the file in detail, along with more sample requests and responses.

Bulk Write API allows you to insert, update, or upsert a large set of data. In the CSV file module, using the Bulk Write API, you can add up to 50000 characters to the RTFs for each record in a row.

Prepare your CSV file
The Bulk Write API only accepts a CSV file compressed into a ZIP file as input. 

Below picture represents values added to the rich text field:

Please ZIP the CSV file once you add values to the Rich Text Field.

Upload your CSV file :
This involves making a POST API call, with the ZIP file containing the required data. 

Headers
               Header Name
                                   Description
 feature
 bulk-write
 X-CRM-ORG
 Your zgid which you get from the Organization API

Request Method: POST



Create a bulk write job :
Request URL : {{api-domain}}/crm/bulk/v6/write
Request Method : POST

Sample Input for bulk insert :

{
    "operation": "insert",
    "ignore_empty": true,
    "callback": {
        "method": "post"
    },
    "resource": [
        {
            "type": "data",
            "module": {
                "api_name": "Employees"
            },
            "file_id": "5725767000002613001",
            "file_names": [
                "Rich.csv"
            ],
            "field_mappings": [
                {
                    "api_name": "Name",
                    "index": 0
                },
                {
                    "api_name": "Feedback",
                    "index": 1
                },
                {
                    "api_name": "Company",
                    "index": 2
                }
            ]
        }
    ]
}

Refer to our Bulk Write API help document and get more information on how the Bulk Write API works, how to prepare your CSV file, and how to upload your CSV file, and how to check the job status.

We trust that this post meets your needs and is helpful. Let us know your thoughts in the comment section or reach out to us at support@zohocrm.com

Stay tuned for more insights in our upcoming Kaizen posts!

Cheers!

Previous Kaizen Post :
Kaizen #133 - Deciding on the type of applications: Self-client or Server-based?                                                                              

Additional Reading :

Join us for our upcoming Zoho CRM Developer Series: Zoho CRM APIs, where you can explore more about Zoho CRM APIs. Register Now!


    • Sticky Posts

    • Kaizen #197: Frequently Asked Questions on GraphQL APIs

      🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Kaizen #198: Using Client Script for Custom Validation in Blueprint

      Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

      Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
    • Kaizen #193: Creating different fields in Zoho CRM through API

      🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Client Script | Update - Introducing Commands in Client Script!

      Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands
    • Recent Topics

    • Cannot Enable Picklist Field Dependency in Products or Custom Modules – Real Estate Setup

      Hello Zoho Support, I am configuring Zoho CRM for real estate property management and need picklist field dependency: What I’ve tried: I started by customizing the Products module (Setup > Modules & Fields) to create “Property Type” (Housing, Land, Commercial)
    • Get Workflow Metadata via API

      Is there a way to get metadata on workflows and/or custom functions via API? I would like to automatically pull this information. I couldn't find it in the documentations, but I'm curious if there is an undocumented endpoint that could do this. Moderation
    • Zoho Projects - Q2 Updates | 2025

      Hello Users, With this year's second quarter behind us, Zoho Projects is marching towards expanding its usability with a user-centered, more collaborative, customizable, and automated attribute. But before we chart out plans for what’s next, it’s worth
    • FSM setup

      So we have been tinkering with FSM to see if it is going to be for us. Now is the time to bite the bullet and link it to our zoho books and zoho crm. The help guides are good but it would really help if they were a bit more in depth on the intergrations.
    • Upcoming Updates to the Employees Module in Zoho Payroll (US)

      We've made a couple of updates to the Employees module in Zoho Payroll (latest version of the US edition). These changes will go live today. While creating an employee Currently, the Compensation Details section is part of the Basic Details step, where
    • Possible to Turn Off Automatic Notifications for Approvals?

      Hello, This is another question regarding the approval process. First a bit of background: Each of our accounts is assigned a rank based on potential sales. In Zoho, the account rank field is a drop-down with the 5 rank levels and is located on the account
    • ZOHO Creator subform link

      Dear Community Support, I am looking for some guidance on how to add a clickable link within a Zoho Creator subform. The goal is for this link to redirect users to another Creator form where they can edit the data related to the specific row they clicked
    • Allow Resource to Accept or Reject an Appointment

      I have heard that this can be done, is there any documentation on how?
    • Create new Account with contact

      Hi I can create a new Account and, as part of that process, add a primary contact (First name, last name) and Email. But THIS contact does NOT appear in Contacts. How can I make sure the Contact added when creating an Account is also listed as a Contact?
    • Custom Fonts in Zoho CRM Template Builder

      Hi, I am currently creating a new template for our quotes using the Zoho CRM template builder. However, I noticed that there is no option to add custom fonts to the template builder. It would greatly enhance the flexibility and branding capabilities if
    • Python - code studio

      Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
    • Sync desktop folders instantly with WorkDrive TrueSync (Beta)

      Keeping your important files backed up and accessible has never been easier! With WorkDrive desktop app (TrueSync), you can now automatically sync specific desktop folders to WorkDrive Web, ensuring seamless, real-time updates across devices. Important:
    • How To Insert Data into Zoho CRM Organization

      Hi Team I have this organization - https://crm.zoho.com/crm/org83259xxxx/tab/Leads I want to insert data into this Leads module, what is the correct endpoint for doing so ? Also I have using ZohoCRM.modules.ALL scope and generated necessary tokens.
    • Where can I get Equation Editor por Zoho Writer?

      I need to use Math Formulas in my document. Thank you.
    • How can I get base64 string from filecontent in widget

      Hi, I have a react js widget which has the signature pad. Now, I am saving the signature in signature field in zoho creator form. If I open the edit report record in widget then I want to display the Signature back in signature field. I am using readFile
    • Creator roadmap for the rest of 2022

      Hi everyone, Hope you're all good! Thanks for continuing to make this community engaging and informative. Today we'd like to share with you our plans for the near future of Creator. We always strive to strike a good balance of features and enhancements
    • Filtering repport for portal users

      Salut, I have a weird problem that I just cannot figure out : When I enter information as administrator on behalf of a "supplier" portal user (in his "inventory" in a shared inventory system), I can see it, "customer" portal users can see it, but the
    • Zoho Inventory. Preventing Negative Stock in Sales Orders – Best Practices?

      Dear Zoho Inventory Community, We’re a small business using Zoho Inventory with a team of sales managers. Unfortunately, some employees occasionally overlook stock levels during order processing, leading to negative inventory issues. Is there a way to
    • Zoho One - Syncing Merchants and Vendors Between Zoho Expense and Zoho Books

      Hi, I'm exploring the features of Zoho One under the trial subscription and have encountered an issue with syncing Merchant information between Zoho Expense and Zoho Books. While utilizing Zoho Expense to capture receipts, I noticed that when I submit
    • Is Zoho Sheet available for Linux ?

      Is Zoho Sheet available for Linux ?
    • Zoho Sheet for Desktop

      Does Zoho plans to develop a Desktop version of Sheet that installs on the computer like was done with Writer?
    • BUTTONS SHOWN AS AN ICON ON A REPORT

      Hi Is there any way to create an action button but show it as an icon on a report please? As per the attached example? So if the user clicks the icon, it triggers an action?
    • Dropshipping Address - Does Not Show on Invoice Correctly

      When a dropshipping address is used for a customer, the correct ship-to address does not seem to show on the Invoice. It shows correctly on the Sales Order, Shipment Order, and Package, just not the Invoice. This is a problem, because the company being
    • RFQ MODEL

      A Request for quotation model is used for Purchase Inquiries to multiple vendors. The Item is Created and then selected to send it to various vendors , once the Prices are received , a comparative chart is made for the user. this will help Zoho books
    • Will zoho thrive be integrated with Zoho Books?

      title
    • Product Updates in Zoho Workplace applications | August 2025

      Hello Workplace Community, Let’s take a look at the new features and enhancements that went live across all Workplace applications this August. Zoho Mail Delegate Email Alias Now you can let other users send emails on your behalf—not just from your primary
    • Notebook audio recordings disappearing

      I have recently been experiencing issues where some of my attached audio recordings are disappearing. I am referring specifically to ones made within a Note card in Notebook on mobile, made by pressing the "+" button and choosing "Record audio" (or similar),
    • Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked

      Hi, I sent few emails and got this: Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked And now I have few days since I cant send any email. Is there something wrong I did? Also can someone fix this please
    • Want to use Zoho Books in Switzerland. CHF support planned?

      Hi, We're a Swiss company using other Zoho suite software and I discovered Zoho Books and other accounting SaaS when looking for an accounting tool. Do you intend to cover Switzerland and CHF based accounting anytime soon? Roy
    • Zoho sheet desktop version

      Hi Zoho team Where can I access desktop version of zoho sheets? It is important as web version is slow and requires one to be online all the time to do even basic work. If it is available, please guide me to the same.
    • Weekly Tips : Teamwork made easy with Multiple Assignees

      Let's say you are working on a big project where different parts of a single task need attention from several people at the same time—like reviewing a proposal that requires input from sales, legal, and finance teams. Instead of sending separate reminders
    • Best way to share/download presentation files in Zoho without losing formatting?

      Hello Zoho Community, I often work with PPT/PDF files in Zoho Docs and share them with colleagues. While PDFs usually give a direct download option, I’ve noticed that PPT/PPTX files sometimes only open in the viewer without a clear download link. Is there
    • Celebrating Connections with Zoho Desk

      September 27 is a special day marking two great occasions: World Tourism Day and Google’s birthday. What do these two events have in common (besides the date)? It's something that Zoho Desk celebrates, too: making connections. The connect through tourism
    • What is Resolution Time in Business Hours

      HI, What is the formula used to find the total time spent by an agent on a particular ticket? How is Resolution Time in Business Hours calculated in Zohodesk? As we need to find out the time spent on the ticket's solution by an agent we seek your assistance
    • How use

      Good morning sir I tried Zoho Mail
    • Adding Overlays to Live Stream

      Hello folks, The company I work for will host an online event through Zoho Webinar. I want to add an overlay (an image) at the bottom of the screen with all the sponsors' logos. Is it possible to add an image as an overlay during the live stream? If so,
    • Email Sending Failed - SMTP Error: data not accepted. - WHMCS Not sending emails due to this error

      I have been trying to figure out a fix for about a week now and I haven't found one on my own so I am going to ask for help on here.  After checking all the settings and even resetting my password for the email used for WHMCS it still says: Email Sending Failed - SMTP Error: data not accepted.  I have no clue how to fix it at this point. Any insight would be lovely. 
    • Does Zoho Learn integrate with Zoho Connect,People,Workdrive,Project,Desk?

      Can we propose Zoho LEarn as a centralised Knowledge Portal tool that can get synched with the other Zoho products and serve as a central Knowledge repository?
    • Zoho Flow - Update record in Trackvia

      Hello, I have a Flow that executes correctly but I only want it to execute once when a particular field on a record is updated in TrackVia. I have the trigger filters setup correctly and I want to add an "update record" action at the end of the flow to
    • Add Comprehensive Accessibility Features to Zoho Desk Help Center for End Users

      Hello Zoho Desk Team, We hope you're doing well. We’d like to submit a feature request to enhance the client-facing Help Center in Zoho Desk with comprehensive accessibility features, similar to those already available on the agent interface. 🎯 Current
    • Next Page