LH
December 27, 2022, 9:15pm
1
Hi,
I’m trying to add attachments to a Zoho CRM record in the form of a link to Google Drive. The process is described here:
When you manage sales in your organization, you may have to send and receive several documents to your customers. They may be legal agreements, sales documents and so on. Zoho CRM's document management feature helps you work with all these documents...
And in the API docs here:
The built in “Upload an attachment” doesn’t seem to support URL. It supports only file uploads. So I tried an API call, but that didn’t work. In fact, the module did run and returned a success (200) response, but nothing happened on Zoho.
Has anyone figured this out?
Thanks
@LH Did you run this with actual data or only the test data we see in screenshot?
If so, whats the output of this and what do you see?
LH
December 28, 2022, 12:31pm
3
Thanks for your reply.
Yes, indeed sent with live data. Here’s the input/output. I truncated the body part of the output as it’s crazy long.
Input:
[
{
"url": "v3/CustomModule5/5026427000000710775/Attachments",
"body": "attachmentUrl=https://www.zohocorp.com",
"method": "POST",
"headers": [
{
"key": "content-type",
"value": "multipart/form-data"
}
]
}
]
Output:
[
{
"body": "*Truncated (too long)*,
"headers": {
"server": "ZGS",
"date": "Tue, 27 Dec 2022 19:17:50 GMT",
"content-type": "text/html",
"content-length": "37069",
"last-modified": "Fri, 23 Dec 2022 09:30:22 GMT",
"connection": "close",
"set-cookie": [
"zip=54.75.157.176|IE|ireland|Dublin|dublin|europe; Path=/; Expires=Wed, 28-Dec-22 19:17:50 GMT"
],
"etag": "\"63a5752e-90cd\"",
"expires": "Wed, 27 Dec 2023 19:17:50 GMT",
"cache-control": "max-age=31536000, no-cache",
"access-control-allow-origin": "*",
"strict-transport-security": "max-age=63072000",
"accept-ranges": "bytes"
},
"statusCode": 200
}
]
Hi @LH ,
Zoho is very… particular. In this case, instead of using the body in your API, try to inform the url in the query section. This way works perfectly.
2 Likes
LH
January 2, 2023, 5:44pm
5
WOW, you nailed it!
Indeed works perfectly now.
Thanks!!
Just another small comment for whoever comes here later:
The link name is referred to as “title” and this can be specified on another query item
Will result in this
2 Likes