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!


    • Recent Topics

    • Dear Zoho CEO: Business Growth is about how you prioritise!

      All of us in business know that when you get your priorities right, your business grows. Zoho CRM and Zoho Books are excellent products, but sadly, Zoho Inventory continues to lag behind. Just this morning, I received yet another one-sided email about
    • Payroll In Canada

      Hi, When can we expect to have payroll in Canada with books 
    • Please review and re-enable outgoing emails for my domain

      Hello Zoho Support, I have recently purchased a new domain and set up email hosting with Zoho. However, my account shows "Outgoing Email Blocked". I am a genuine user and not sending bulk/spam emails. Please review and re-enable outgoing emails for my
    • Payroll without tax integrations (i.e. payroll for international)

      It seems as though Zoho waits to develop integrations with local tax authorities before offering Zoho Payroll to Zoho customers in a country. Please reconsider this approach. We are happy Zoho Books customers, but unhappy that we have to run payroll in
    • goingout e mail block

      info@ozanrade.com.tr
    • Incoming mails blocked

      Zoho User ID : 60005368884 My mail Id is marketing#axisformingtechnology.com .I am getting following message "Your Incoming has been blocked and the emails will not be fetched in your Zoho account and POP Accounts. Click here to get unblocked." Please
    • Assistance Needed: Ticket Status Not Updating and Sorting by Last Customer Reply in Zoho Desk

      Hello, I’m facing two issues in Zoho Desk that I’d like your guidance on: Ticket Status Not Updating: When a customer replies to a ticket, the status does not change to Reopened. Instead, it remains in Waiting on Customer, even after the customer’s response
    • Configuring Email Notifications with Tautulli for Plex

      Hi I'm new to Zoho. I am from Canada and I have a I use a web based application called Tautulli for Plex that monitors my Plex media server. It also sends a newsletter to my followers. To set this up they require a "From" email address., a smtp server
    • Is there a way to automatically add Secondary Contacts (CCs) when creating a new ticket for specific customers?

      Some of our customers want multiple contacts to receive all notifications from our support team. Is there a way to automatically add secondary contacts to a ticket when our support team opens a new ticket and associates it with an account? This would
    • How to Set Up Zoho Mail Without Cloudflare on My Website

      I'm having some trouble with Cloudflare here in Pakistan. I want to configure Zoho Mail for my domain, but I'm not sure how to set it up without going through Cloudflare. My website, https://getcrunchyrollapk.com/ , is currently using CF, but I'd like
    • Spam is Being Forwarded

      I am filtering a certain sender directly to the Trash folder. Those messages are still being forwarded. Is this supposed to happen?
    • IMAP Block

      My two accounts have been blocked and I am not able to unblocked them myself. Please respond to email, I am traveling and this is urgent.
    • "DKIM not configured"

      Hello. I have been attempting get the DKIM verified but Toolkit keeps sending the message that it is not configured, but both Namecheap and Zoho show it as configured properly. What am I missing?
    • Zoho mail with custom domain not receiving email

      i registered zoho mail with my own domain. I can login and access the mail app. I tried to send email from an outlook email account and an icloud email account. Both emails were not received. My plan is free. I also tried to send email from this zoho
    • Set connection link name from variable in invokeurl

      Hi, guys. How to set in parameter "connection" a variable, instead of a string. connectionLinkName = manager.get('connectionLinkName').toString(); response = invokeurl [ url :"https://www.googleapis.com/calendar/v3/freeBusy" type :POST parameters:requestParams.toString()
    • Waterfall Chart

      Hello, I would like to create a waterfall chart on Zoho analytics which shows the movement in changes of budget throughout a few months, on a weekly basis. Should look something like the picture below. Does anyone know how to?
    • Help Center and SEO: Any Benefit to My Domain-Mapped Website Ranking?

      First of, I love the Help Center which I've just decided to integrate into my website to replace its old-fashioned FAQs. So much more to achieve there now! Lots of new benefits to the site visitors and to me in terms of organizing and delivering all the
    • Issue with Importing Notes against Leads

      Hi, I am attempting to import some Notes into Zoho CRM which need to be assigned to various Leads. I have created a csv file which I am testing that contains just one record. This csv file contains the following columns: Note Id Parent Id       (I have
    • Trigger a Workflow Function if an Attachment (Related List) has been added

      Hello, I have a Case Module with a related list which is Attachment. I want to trigger a workflow if I added an attachment. I've seen some topics about this in zoho community that was posted few months ago and based on the answers, there is no trigger
    • Option to Hide Project Overview for Client Profiles

      In Zoho Projects, the Project Overview section is currently visible to client profiles by default. While user profiles already have the option to restrict or hide access to the project overview, the same flexibility isn’t available for client profiles.
    • Creator Add Records through API - Workflows not triggered ?

      Hi Everyone, I am trying to add records to my Creator application through a third party app that I am developing. Currently, I am testing this through Postman. The records I need to add have a lot of workflows to run to populate dropdowns, fields, use
    • Important Update: Changes to Google Translate Support in Zoho SalesIQ

      We’re updating our default chat translation options across all Zoho SalesIQ data centres to offer a more secure, in-house solution for your translation needs. What’s changing? We will be offering Zoho Translate (our in-house tool) as the default translation
    • Zoho CRM Community Digest - July P1 | 2025

      Hey everyone, The start of July 2025 marked a special milestone: 200 posts in our Kaizen series! For those new here, Kaizen is a go-to series for Zoho CRM developers, where we regularly share best practices, tips, and expert insights to help you build
    • What’s New in Zoho Expense (April – July 2025)

      Hello users, We're happy to bring you the latest updates and enhancements we've made to Zoho Expense over the past three months, which include introducing the Trip Expense Summary report in Analytics, extending Chatbot support to more editions, rolling
    • Weekly Tips: Insert frequently used phrases in a jiffy using Hotkeys

      You often find yourself using similar phrases in an email —like confirming appointments or providing standard information. Constantly switching between the mouse and keyboard interrupts your flow and slows you down.Instead of typing the same phrases over
    • Undo Command in Notebook

      It would be handy to have an Undo in the row of icons at the bottom of the notes.
    • Improved UI for a Seamless User Experience - Calls, Tasks, and Meetings

      Hello all, We are making UI unification across CRM so that the UI experience is seamless across the product. As part of that effort, we have made changes to the details page of activity-based module records—Meetings, Calls, and Tasks. Let's look at these
    • New Customization options in the module builder: Quick Create and Detail view

      Hello everyone, We have introduced two new components to the module builder: Quick create and Detail view. The Quick Create Component It is a mini form used to create a record and associate it to the parent record from a lookup field. For example, if you have a Deals lookup in the Contacts module, then you can associate existing deals or create a deal and associate it with the contact. You can customize this Quick Create form by adding standard as well as custom fields. There is no limit to the number
    • Narrative 9: GC—Meaningful conversations that benefit your customers

      Behind the scenes of a successful ticketing system - BTS Series Narrative 9: GC—Meaningful conversations that benefit your customers Customers often seek immediate solutions, which is why self-service options are essential. Guided Conversations provides
    • FSM App Oddity

      We recently rolled out FSM to our technicians, and only one technician is having an issue. He's using an iPhone with iOS 18.6 installed. When he goes to service appointments using the calendar icon at the bottom of the app, he gets a list view only. Typically,
    • Cliq Not Working !

      Zoho Cliq has been experiencing connectivity issues since this morning. The app is unable to establish a connection with the server.
    • Injecting CSS into ZML pages

      Is there a way to inject CSS into ZML pages? Use case: 1. Dashboard displays 'Recent Activities' card displaying a list of newly added records 2. Each item in list links to the record onClick 3. When a user points the cursor over an item in the list,
    • Power of Automation :: Automated Weekly Notifications for Unapproved Timesheets

      Hello Everyone, A custom function is a software code that can be used to automate a process and this allows you to automate a notification, call a webhook, or perform logic immediately after a workflow rule is triggered. This feature helps to automate
    • Extracting Data from Sitelink APIs

      Hi All, I'm working to pull data on Sitelink using API calls but i can't seem to extract it. If you click expand, you will see it has a lot of data in it. I tried extracting from the map but it's not giving me anything. Is there a workaround on this or
    • Export a list of fields for all modules in a spreadsheet with specific field data

      Many of my clients are using spreadsheets to create lists of fields for all modules when starting a new implementation or when updating an existing setup. This is a useful process but also a very time consuming one. It would be good a list of fields could
    • [Important announcement] Zoho Writer will mandate DKIM configuration for automation users

      Hi all, Effective Dec. 31, 2024, configuring DKIM for From addresses will be mandatory to send emails via Zoho Writer. DKIM configuration allows recipient email servers to identify your emails as valid and not spam. Emails sent from domains without DKIM
    • 【Zoho Backstage】2025年7月のアップデート紹介

      本投稿は、本社のZoho Desk コミュニティに投稿された以下の記事を翻訳し、一部抜粋したものです。 What's New - July 2025 | Zoho Backstage ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 本投稿では、Zoho Backstage の直近のアップデートを3点抜粋して、ご紹介します。 目次 1.参加可否の確認:RSVP 2.証明書作成ツール:Certificate Builder 3.登録の承認 :Registration Approval 1.参加可否の確認:RSVP
    • Option to select location?

      As a business coach, I meet with clients at various public locations. I have two or three pre-determined locations that I meet at. I would like the client to choose the location when booking an appointment. Is there a way to do that with a single service, or is the best way to accomplish this by creating one service for each location offered?
    • Can we have Backorder Management ?

      Can we have Backorder Management ?
    • Display a field of an Account on the Ticket view

      Hi there, We would like to display of the Account of the user submitting a ticket on the ticket view. See for example: How can this be achieved? It doesn't really matter where it will be placed as long as it is shown there. Thanks, Snir
    • Next Page