Transferring Attachments from Lead to Account

Transferring Attachments from Lead to Account

Hi All,

I'm trying to create a function that will transfer attachments in leads to the newly created account. I know there's an option to choose where the attachments go when you click the standard convert button but we have a high volume of conversions per day so we have automated conversion. Once we get an automatic notification of an approved account from our partner, we have a Zapier flow trigger the lead conversion and so as a result, it skips the manual selection of where to transfer the attachments (by default they go to the contact). I created the following function to convert the lead and transfer the attachments to the account:

relatedrecords = zoho.crm.getRelatedRecords("Attachments","Leads",leadid);
convert = zoho.crm.convertLead(leadid);
accID = convert.get("Accounts");
attachid = List();
for each  ele in relatedrecords
{
attachmentId = ele.get("id");
attachid.add(attachmentId);
}
for each  ele in attachid
{
downloadFile = invokeurl
[
url :"https://www.zohoapis.com/crm/v2/Leads/" + leadid + "/Attachments/" + ele
type :GET
connection:"lead_attach"
];
resp = zoho.crm.attachFile("Accounts",accID,downloadFile);
}

The issue is that the invokeurl function returns an error that the lead is already converted and so it can't access the link to the attachment. I tried the same function without converting the lead and it successfully accesses the attachment URL and so it appears that the URL is no longer accessible once the lead is converted. Any ideas on how I can make this work?

Thanks

    • Sticky Posts

    • Function #46: Auto-Calculate Sales Margin on a Quote

      Welcome back everyone! Last week's function was about displaying the discount amount in words. This week, it's going to be about automatically calculating the sales margin for a particular quote, sales order or an invoice. Business scenario Where there is sales, there's also evaluation and competition between sales reps. A healthy rivalry helps to better motivate your employees to do smart work and close deals faster and more efficiently. But how does a sales rep get evaluated? 90% of the time, it's
    • 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
    • Recent Topics

    • Zoho Projects - Project Details on the Project Menu

      Hi Project's team, I've helped may businesses setup and use Zoho Project and one thing I see time and time again is confusion on where to find the Project Details information. I would be much more intuitive if Project Details was on the menu before Dashboard.
    • Zoho Projects - Add Feed to Project Tabs

      Hi Projects Team, I'm working on a lightweight communications requirement for one of my customers in relation to communicating with their client users via Zoho Projects. I noticed that the Feed is only available in the Collaboration section, but you can
    • Zoho Logs - Not seeing logs since 30 Nov

      Hi, we have a few functions running, I am testing some new ones and noticed that although I can see executions, I cannot see any logs, even when the first line on the functions is a log. I reviewed some existing functions, one of which is invoked on a
    • Flow - Fetch info from drop down in another module

      I am running into a road block which I thought would be a simple task. My goal - The account is assigned to a "route" which can be selected from a drop down menu and adds a tag to the account accordingly (easy enough). Now when I create a task for this
    • Problem with signature on zoho survey

      Hello, I'm trying to export individual responses with signatures on zoho survey. But the signatures on some of my surveys are not exported as the original image, but as a generic image, same for all (screen joins). Is there a solution to have the signatures
    • Show unsubscribed contacts ?

      Hello, I would like to display the unsubscribed contacts. Unfortunately, I do not have this subscription type as described in the documentation (https://help.zoho.com/portal/en/kb/marketing-automation-2-0/user-guide/contacts/contact-management/articles/subscription-type-24-1-2024#Subscription_Type_field.)
    • Zoho Developer Community Hackathon 2025 is LIVE!

      Hey developers! It’s that time of the year again — the Zoho Developer Community Hackathon 2025 is officially open for registrations! If you’ve been waiting for a chance to stretch your skills, try something new, or finally bring that idea to life, this
    • Converted Leads Not Showing in Lead Reports

      Converted leads are not showing in the Lead reports. How can I make converted leads visible in the report,
    • Text widgets in dashboards

      Having a text widget in a dashboard would help immensely. It would allow adding links to related documents, relevant CRM views, etc. It would allow adding explanations of the data displayed in the other widgets, about how to interpret them or about filtering.
    • Read webpage - MSXML2.ServerXMLHTTP

      I have the following VBA script, put together from various sources (mainly zoho forum/help/support, so it once worked, I guess): private Sub GetListOfSheets() Dim url As String Dim xmlhttp As Object Dim parameters As String Dim html As String range("B1").value
    • [Webinar] Zoho Writer for content creators and publishing houses

      Managing multiple drafts, edits, and client reviews doesn't have to slow you down. Join our upcoming webinar to see how Zoho Writer helps content creators and publishing houses create, edit, and publish seamlessly—all in one place. You'll learn how to:
    • Adding Reports to Portals

      Is there a way to add Reports to portals so only the user can see report templates relevant to them?
    • How to assign one Manual to multiple Spaces?

      Hello, I have two spaces, one called tech knowledge and the other one called HR knowledge. I have a manual that is called HR tech. I want to assign this manual to HR knowledge and tech knowledge. How should I do that?
    • How can I assign courses to Spaces?

      How can I make courses show up here in this space?:
    • When will Zoho Learn be able to support SCORM files on the mobile app?

      When I click the SCORM content, I just get a message saying it's not possible yet. Yet implies that it will be coming soon. All I'm asking for is a realistic timeline so I know whether or not to invest my time in using it. If it will be soon, then I will
    • Announcing new features in Trident for Windows (v.1.35.6.0)

      Hello Community! Trident for Windows just got better with an update that makes working with your emails even more efficient. Let’s dive into what’s new! Work with PST files more efficiently. You can now do more than just view mounted PST files. You can
    • Looking for best practices to import data from SAP Business One (on-prem) into Zoho Analytics via Zoho DataPrep / Databridge — daily automated schedule

      Hi all, I’m using SAP Business One on-prem (SQL Server / or HANA — depending on DB backend) as our ERP. I want to build a pipeline that, every morning at 9:00 AM IST: pulls transactional data (invoices, customers, products, stock, etc.) from SAP B1, loads
    • facing error 550 5.4.6 while sending emails

      Please help me fix this issue
    • Marketing Tip #9: Track your traffic sources

      Not all marketing channels work equally well. Knowing whether your visitors come from Google, Instagram, or email helps you focus on what actually drives sales. Try this today: Check your Zoho Commerce reports or connect Zoho PageSense to see your top
    • Google Analytics import data inaccurate (as of October 11, 2025)

      We have Zoho Analytics connected to GA4 to import daily event data. This has been running without issue for a couple of years. However, a month ago we started noticing discrepancies. All data until October 10 lines up perfectly - October 11 onward is
    • Can't make a document editable to anyone

      Hey everyone, I am using Zoho Workdrive and trying to share a document so that it is editable by anyone with the link. I am trying to convince people to shift from Google to Zoho, but they don't have accounts yet. When I try to change the share settings
    • E-Invoicing in Belgium with Zoho Billing

      Starting January 1, 2026, Belgium is introducing mandatory electronic invoices (e-invoicing) for all B2B transactions between VAT-registered businesses. Invoices and credits notes must be exchanged in a prescribed digital format. How E-Invoicing works
    • Zoho Voice lance BYOC (Bring Your Own Carrier) : intégrez votre opérateur

      Pour accompagner sa croissance, une entreprise a besoin d’une infrastructure téléphonique flexible et évolutive. Les solutions de téléphonie s’adaptent aux exigences du centre de contact, tout en intégrant aisément les opérateurs locaux de votre choix.
    • Zoho Recruit Slow and Freezing on all screens

      We have had an issue with Zoho Recruit for weeks being extremely slow and at times freezing.  We have 100 mega internet, and I went into each computer and updated the virtual memory so there is more available.  Also restarted all computers daily.  Still having the issues.  Almost unable to work.
    • Prevent accidental duplicate entry of Customer Ordersome

      Zoho Support has confirmed that Zoho currently does not have any method (using Deluge, flow or any other method) to alert a user when a sales order has been entered twice using the same customer reference number (i.e. a duplicate). Most ERP platforms
    • Zoho Books | Product updates | November 2025

      Hello users, We’ve rolled out new features and enhancements in Zoho Books. From translating email notification templates to the new transaction locking restrictions, explore the updates designed to enhance your bookkeeping experience. Making Tax Digital
    • Insert Image into Notebook page

      Prior to today, I could add images to my notebook pages. Today when I tried to do this I got an error message that said something like, "There's been a problem on our end. Try again later." So, I've tried all the ways I know how, but I can't insert an
    • 【開催報告】名古屋 ユーザー交流会 Vol.2 2025/11/21 Zoho Analytics / Inventory で実現する在庫の"未来予測"

      ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 11/21(金)に名古屋 ユーザー交流会 を開催しました。 本投稿では、当日実施したセッションの様子及び投影資料をお届けします。 会場にて参加できなかった皆さまも、ぜひご参照ください。 (Zoho 社員セッションの登壇資料については、11/28(金)開催の東京回の開催報告で共有いたします) 今年2回目の開催となる名古屋 ユーザー交流会では、株式会社エンツナクリエイト 野末さんによる Zoho Analytics / Inventory
    • 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
    • Improved RingCentral Integration

      We’d like to request an enhancement to the current RingCentral integration with Zoho. RingCentral now automatically generates call transcripts and AI-based call summaries (AI Notes) for each call, which are extremely helpful for support and sales teams.
    • Edit Pinned Comments in Zoho Desk

      It's great that private comments can now be pinned to the top of the ticket but what would be extremely helpful would be to allow for the pinned comment to be edited vs. having to find the comment in the ticket to edit it.
    • Updating Secondary Contact (CCs)

      We use Zoho Forms to capture the user request and integrated with Zoho Desk to raise tickets. Active Microsoft login is captured in our Zoho forms and registered as Primary contact in Zoho desk ticket. We also an have an option to raise ticket on behalf
    • Email Opt Out Question

      Has the problem where if a customer is emailed opt out prevents you sending standard emails? For me this feature is simply to stop any email marketing and should not block people from receiving emails via Zoho mobile, which makes no sense.
    • blank page after login

      blank page after logging into my email account Thanks you
    • WriterTh

      After every space Writer goes to capital letters mode in my Android tablet. The cap mode stays till the second letter is typed in the word then it comes to normal mode.
    • Does Thrive work with Zoho Billing (Subscriptions)?

      I would like to use Thrive with Zoho Billing Subscriptions but don't see a way to do so. Can someone point me in the right direction? Thank you
    • Zoho writer unable to merge documents to PDF with basic fonts in Hebrew or fonts from my computer

      I created several forms that will be merged into PDF files through Zoho Writer and I am unable to receive the PDF in the basic fonts of the Hebrew language or in the fonts I have on my computer. The writer exports to PDF an exchange font that looks very
    • I have already created some Bots, Commands, and Widgets in Cliq, but I am still not seeing the “Create Extension” option in my account. Could you please help me enable or access this option?

    • How to setup DKIM / SPF in Zoho Mail

      Hello there! I'm having a hard time understanding how to setup the TXT records for SPF and DKIM with Zoho Mail. I'm following the instructions here: https://www.zoho.com/campaigns/help/setup-spf-dkim.html Specifically, when it comes to the value for the
    • Cliq iOS can't see shared screen

      Hello, I had this morning a video call with a colleague. She is using Cliq Desktop MacOS and wanted to share her screen with me. I'm on iPad. I noticed, while she shared her screen, I could only see her video, but not the shared screen... Does Cliq iOS is able to display shared screen, or is it somewhere else to be found ? Regards
    • Next Page