Upload Image from ZOHO Creator to ZOHO CRM
#Tips & Trick of the Day
- data = Ar[ID == 4227213000000688005];
- myImage = data.Site_Picture.replaceAll("/sharedBy/appLinkName/", zoho.appuri);
- myImage = myImage.replaceAll("viewLinkName", "All_Ares");
- myImage = myImage.replaceAll("fieldName", "Site_Picture");
- ImageUl = myImage.getsuffix("\"").getprefix("\"");
- ImageUl = ImageUl.getsuffix("image/");
- //ImageUl = "Image Name which we have inside the zoho creaot report with the id";
- ID = 4227213000000688005;
- XXpublicKEYXX = "OpG1Y2xFTfhjJMmR0DWuZmjhQEMa666E3M4MBtQNAepCEsfWbN4454hfgvH1UhnOmAuNy6X3uV5TDvE4jAmHRbXwS5fjy3MHaUBH";
- ImageUl = "https://creatorapp.zohopublic.com/file" + zoho.appuri + "All_Ares/" +ID+ "/Site_Picture/image-download/"+XXpublicKEYXX+"?filepath=/" + ImageUl;
- GetImage = invokeUrl
- [
- url: ImageUl
- type: GET
- connection: "creator_app_auth_connection"
- ];
- GetImage.setParamName("file");
- response = invokeurl
- [
- url: "https://www.zohoapis.com/crm/v3/Leads/4655606000005549022/Attachments"
- type: POST
- files: GetImage
- connection:"zohocrm1"
- ];
- info response;