Mails are not being sent from custom Deluge function

Mails are not being sent from custom Deluge function

We are having troubles to implement sending Invoices / Sales_Orders etc. automatically using following deluge script:

  1. attachment_template_id = "aaaa";
  2. record_id = "bbbb";
  3. mail_template_id = "cccc";
  4. //NEW aproach
  5. fileUrl = "https://www.zohoapis.com/crm/v8/settings/inventory_templates/" + attachment_template_id + "/actions/print_preview?record_id=" + record_id + "&print_type=pdf";
  6. download = invokeurl
  7. [
  8. url :fileUrl
  9. type :GET
  10. connection:"zzz"
  11. ];
  12. info download;
  13. download.setParamName("file");
  14. info download;
  15. //info downloadFile;
  16. response = invokeurl
  17. [
  18. url :"https://www.zohoapis.com/crm/v8/files"
  19. type :POST
  20. files:download
  21. connection:"zzz"
  22. ];
  23. info "zfs : " + response;

  24. fid = response.get("data").get(0).get("details").get("id");
  25. info fid;

  26. sendfrom = Map();
  27. sendfrom.put("email",zoho.adminuserid);
  28. sendto = Map();
  29. sendto.put("email","XXXXX");
  30. tolist = List();
  31. tolist.add(sendto);
  32. attmp = Map();
  33. attmp.put("id",fid);
  34. alist = List();
  35. alist.add(attmp);
  36. tempmp = Map();
  37. tempmp.put("id", mail_template_id);
  38. mp = Map();
  39. mp.put("from",sendfrom);
  40. mp.put("to",tolist);
  41. mp.put("attachments",alist);
  42. mp.put("template",tempmp);
  43. intm = Map();
  44. intm.put("inventory_template", {"id":attachment_template_id, "name": "SalesOrder.pdf"});
  45. mp.put("inventory_details", intm);
  46. mp.put("template",tempmp);
  47. dlist = List();
  48. dlist.add(mp);
  49. data = Map();
  50. data.put("data",dlist);
  51. info data;
  52. // info mp;
  53. sendmail = invokeurl
  54. [
  55. url :"https://www.zohoapis.com/crm/v2.1/Invoices/" + record_id + "/actions/send_mail"
  56. type : POST
  57. parameters:data + ""
  58. connection:"zzz"
  59. ];
  60. info sendmail;
We get the following return (from info sendmail):

  1. {"data":[{"code":"SUCCESS","details":{"message_id":"XXXXX"},"message":"Your mail has been sent successfully.","status":"success"}]}
But the mail does not get delivered.
We also tried to use API version 8, no difference.

We tried using deluge sendmail function before, which worked, but the mail does not appear in the "sent" folder.

    • Sticky Posts

    • Zoho CRM Functions 53: Automatically name your Deals during lead conversion.

      Welcome back everyone! Last week's function was about automatically updating the recent Event date in the Accounts module. This week, it's going to be about automatically giving a custom Deal name whenever a lead is converted. Business scenario Deals are the most important records in CRM. After successful prospecting, the sales cycle is followed by deal creation, follow-up, and its subsequent closure. Being a critical function of your sales cycle, it's good to follow certain best practices. One such
    • User Tips: Auto-Create Opportunity/Deal upon Quote Save (PART 1)

      Problem: We use quotes which convert to sales orders but Users / Sales Reps do not create opportunities / deals and go straight to creating a quote. This leads to poor reporting. Implementing this solution improves reporting and makes it easier for users.
    • Custom Function : Automatically send the Quote to the related contact

      Scenario: Automatically send the Quote to the related contact.  We create Quotes for customers regularly and when we want to send the quote to the customer, we have to send it manually. We can automate this, using Custom Functions. Based on a criteria, you can trigger a workflow rule and the custom function associated to the rule and automatically send the quote to customer through an email. Please note that the quote will be sent as an inline email content and not as a PDF attachment. Please follow
    • Function #50: Schedule Calls to records

      Welcome back everyone! Last week's function was about changing ownership of multiple records concurrently. This week, it's going to be about scheduling calls for records in various modules. Business scenario Calls are an integral part of most sales routines.. Sales, Management, Support, all the branches of the business structure would work in cohesion only through calls. You could say they are akin to engine oil, which is required by the engine to make all of it's components function perfectly. CRM
    • Function #37: Create a Purchase Order from a Quote

      Welcome back everyone! Last week, we learnt how to calculate the total number of activities for a lead and further take note of the activity count for particular dates. For instance, from the period of Demo to Negotiation. This week, let's look at a function that lets you create a Purchase Order instantly from a Quote. Business scenario: In any form of business, one of the most important things to do is to document the transactions. Naturally, negotiation, signing an agreement, placing an order,
      • Recent Topics

      • Seriously - Create multiple contacts for leads, (With Company as lead) Zoho CRM

        In Zoho CRM, considering a comapny as a lead, you need us to allow addition of more than one contact. Currently the Lead Section is missing "Add contact" feature which is available in "Accounts". When you know that a particular lead can have multiple
      • Related Module in Sharing Rules

        Zoho CRM team recently added the feature to filter records by Related Records It will be really beneficial if we can have this feature for Sharing Rules as well
      • Assignment Thresholds Resetting After Lead Conversion

        Hello everyone, We're facing an issue with Zoho CRM's lead assignment thresholds that makes them unsuitable for our workflow. I'm hoping to find a potential workaround or solution from the community. Here’s our current process: A new lead is created automatically
      • Vendor Signatures Needed for Purchase Orders

        Hello everyone, We have a unique requirement that necessitates that Vendors & Suppliers formally acknowledge our Purchase Orders upon receipt. I was hoping that there would be an option to do so in Zoho Books, but that does not appear to be the case.
      • Zoho CRM Analytics - Allow To Reorder Dashboards

        I would like to suggest that you add the ability to reorder dashboards in the Analytics Module. I can see that this has been requested some time ago, the latest 9 years ago. I am not sure if this is a big or small endeavor, but such a small fix can go
      • Territory view for custom modules?

        I have recently activated territories however I can't seem to find how to use territories for custom modules? These modules have territories:  Contacts /  Accounts / Opportunities These modules don't have territories:   Buildings (custom module) and 
      • Zoho Books - How to Invoke a Custom Function in Schedulers

        We have multiple schedulers that send emails to customers in batches. Currently, we are maintaining the same code across several schedulers. Is it possible to use a custom function inside a scheduler script? If yes, how can we invoke the custom function
      • Approval Process Comments

        Is it possible to view the comments entered during the approval or rejection of a record in the approval process? If not, is there a way to require a field to be completed upon approval or rejection?
      • Login for test case

        Had a few questions regarding authentication test cases and couldn't find an answer in the the docs. 1. If an app like Zoho Creator requires authentication before providing access, do I need to create a login function and add it to each test case? 2.
      • Zoho / Outlook Calendar sync

        The current Marketplace -> Microsoft -> Meetings integration needs 2 changes. 1. The current language for the Two-Way sync option should be changed. It currently states, "Sync both your Zoho CRM Calendar and Office 365 Calendar meetings with each other."
      • GST Slabs Redefined: Stay Compliant Using Zoho Books!

        Hello Everyone! The Government of India is rolling out new GST rates, a major reform aimed at simplifying the current tax structure starting 22 September 2025. GST will move from four slabs (5%, 12%, 18%, 28%) to two main slabs (5% and 18%), plus a special
      • Form Rules for Suburb Categories to alternate landing pages or Making a Fields Contents ALL CAPS

        I need to send differentform submissions to two to three different thank-you URLs (for Meta/Google pixels) depending on which suburb a user selects in a form. I have ~400 suburbs split into two categories (A and B, based on business value). Current challenges:
      • Please make it easier to Pause syncing

        right now it takes 3 clicks to get there. sounds silly, but can you make it just 2 clicks to get it done instead? thats how dropbox does it, 2 clicks to pause instead of 3.
      • Customer members area

        Does FSM support a customer members area? If not what do you propose we use if we want the data used in FSM for customers to give them an area / login to see past orders, create new orders and general announcements.
      • Zoho Books-Accounting on the Go Series!

        Dear users, Continuing in the spirit of our 'Function Fridays' series, where we've been sharing custom function scripts to automate your back office operations, we're thrilled to introduce our latest initiative – the 'Zoho Books-Accounting on the Go Series'.
      • Record Logged in User while using CRM lookup field

        Is it possible, while using the Zoho CRM lookup field, to automatically use the user account logged into Zoho CRM in a hidden field? I was hoping to add employee accounts to my current plan. But would like a record on the Form submission of who submitted
      • Desktop app doesn't support notecards created on Android

        Hi, Does anybody have same problem? Some of last notecards created on Android app (v. 6.6) doesn't show in desktop app (v. 3.5.5). I see these note cards but whith they appear with exclamation mark in yellow triangle (see screenshot) and when I try to
      • Notes created in mobile can no longer be accessed in desktop

        Working with a 2013 Mac running OS 10.14.6; Desktop Notebook version 4.5.3. Using Motorola Moto G Power 5G - 2024; Android app version 6.7 I have been using Notebook for some years. Starting several weeks ago, the notes newly created ion the phone can
      • Function #49: Manage varying installment payments using Zoho Books

        . Hello everyone, and welcome back to our series! Last week, we discussed automating the collection of fixed installment payments in Zoho Books. But what if your payment structure involves charging varying percentages of the invoice total as installments?
      • Open Sans Font in Zoho Books is not Open Sans.

        Font choice in customising PDF Templates is very limited, we cannot upload custom fonts, and to make things worse, the font names are not accurate. I selected Open Sans, and thought the system was bugging, but no, Open Sans is not Open Sans. The real
      • Zoho Writer - Option to Export as .zdoc format

        I've noticed that it's not possible to export a Zoho Writer Document in the .zdoc format. Isn't zdoc, Zoho Writer's own format? My use case is that I sometimes need to create quite complex documents with floating elements, which sometimes need to become
      • Is it possible for contacts to "Re-enter" a workflow in Zoho Campaign?

        We are currently working on a way to automatically add users to from one list to other lists based on specific criteria, but can't seem to find a native way of doing this so we are trying to use Workflows to do this. So, for example, if a user's status is set to "Active," then they should be added to the list "Active Users." If the same user's status is then set to "Paused," they should be added to the list "Paused Users" and removed from the list "Active Users." This works fine for the first go
      • Bulk upload images and specifications to products

        Hi, Many users have asked this over the years and I am also asking the same. Is there any way in which we can bulk upload product (variant) images and product specifications. The current way to upload/select image for every variant is too cumbersome.
      • Out of Office for Just One of My Alias Email

        Can I set up the Out of Office Reply for Just One of my Alias Email Addresses?
      • Can I map multiple Surveys into the CRM using the same fields?

        Hello, We are a healthcare practice that offers two distinct services (Nutrition and Primary Care). We use Zoho Survey for our lead generation form (Get Started Survey), which allows people to express interest in one of the two services and even allows
      • Dealing with API responses where integers have more than 16 digits

        Hi there How do I deal with an api response contaning an int or float with more than 16 digits (before any decimal places for a float). I constantly receive the response "Unable to cast the 'BigInteger' value into a 'BIGINT' value because the input is
      • Can not add fields to a Section

        I feel like I'm missing something obvious: I can add new Sections to my form but I can not add fields to the Sections. I've tried fields already on the form as well as dragging and dropping new fields into the Section but nothing will go into it. What
      • Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration

        Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
      • To Zoho customers and partners: how do you use Linked Workspaces?

        Hello, I'm exploring how we can set up and use Linked Workspaces and would like to hear from customers and partners about your use cases and experience with them. I have a Zoho ticket open, because my workspace creation fails. In the meantime, how is
      • [Webinar] Automate sales and presales workflows with Writer

        Sales involves sharing a wide range of documents with customers across the presales, sales, and post-sales stages: NDAs, quotes, invoices, sales orders, and delivery paperwork. Generating and managing these documents manually slows down the overall sales
      • Can't change form's original name in URL

        Hi all, I have been duplicating + editing forms for jobs regarding the same department to maintain formatting + styling. The issue I've not run into is because I've duplicated it from an existing form, the URL doesn't seem to want to update with the new
      • Need Inactive accounts to be visible in Reports in Zoho Books

        I N=need Inactive accounts to be visible in Reports in Zoho Books to do recons of the accounts but when i see the same they are not visible in the Accountant - Account Transactions report
      • Issue with Inline Images in Email Reply via Zoho Desk API

        Hi, I am attempting to send inline images in an email reply using the Zoho Desk API, but the images are not being displayed inline for the recipient. I have followed this documentation: https://desk.zoho.com/DeskAPIDocument#Uploads https://desk.zoho.com/DeskAPIDocument#Threads#Threads_SendEmailReply
      • unblock e-mail

        please unblock my e-mails info@meatnews.gr and myrtokaterini@meatnews.gr
      • Add Zoho Mail for users who do not need Zoho One

        We have licenses for ZOho One for teams that need to use the suite of products that Zoho One offers.  We have 8 more people who only need email access and we would like to add just a Zoho Mail.  They do not need the Zoho One license.  We are currently
      • 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
      • ZML vs HTML Snippet - which is better?

        Are there certain use cases where one is better than the other?
      • Auto CheckOut Based On Shift.

        This Deluge script runs on a scheduled basis to automatically set the 'Actual_Check_Out' time for employees who haven't manually checked out. If the current time is past their scheduled 'Shift_End_Time', the script updates the check-out time to match
      • How to remove some users in zoho accounts

        How to remove some users in Zoho accounts.
      • how to differentiate if whatsapp comes from certain landing page?

        I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
      • Next Page