Get file from Zoho Form and attach in Zoho CRM contact

PHOTO EMBED

Wed May 15 2024 11:22:42 GMT+0000 (Coordinated Universal Time)

Saved by @RehmatAli2024 #deluge

// path = "https://forms.zoho.com/api/form/OnboardingForm/formperma/RcHkbHGBh8_5yjVX6sSfhb2OfIHid-3SyJAZVPOuZns/resthookdownload?filepath=/OnboardingForm/FileUpload11/1715686347747_Legal_Rep_Rep1_first_Proof_of_address.png";

passport_files = rep.get("FileUpload10");
			for each  file in passport_files
			{
				path = file.get("path");
				getFile = invokeurl
				[
					url :path
					type :GET
					connection:"zoho_form"
				];
				info "Getting file = " + getFile;
				getFile.setParamName("file");
				attach_file = invokeurl
				[
					url :"https://www.zohoapis.com/crm/v3/Contacts/" + contact_id + "/Attachments"
					type :POST
					files:getFile
					connection:"zoho_crm"
				];
				info "Attaching files = " + attach_file;
			}
content_copyCOPY