Skip to main content

I am trying to attach an uploaded file from an RFQ form (gravity form) to a lead in Clarity. Files are typically PDFs or .zip files.

 

Here is my Zap:

1, Trigger: New form is received and basic data added to Claritysoft

2. Action: only continue if form contains a file in the Attachment field

3. Custom Request (POST): if yes to above action, upload the attachment to the lead record

 

Here is the code I’ve inserted (file content coming from Gravity Form, LeadID coming from Claritysoft)

{
  "APIKey": "vitex-key-XXXXXXXXXXXXXXXXXXX",
  "Resource": "Attachment",
  "Operation": "Create",
   "Data" : {
     "FileContent": "{{109264036__File 1}}",
     "SourceObjectId": "{{109264037__Data__LeadId}}",
     "SourceObjectType": "Lead"
  }
}

 

Looks like this:

 

Receiving an error:

 

Any ideas what is wrong? 

Hi @MKTG Consulting 

Might be best to reach out to Clarity for support on this isisue since it’s their API.


Thank you, Troy. I was hoping the community could help as I saw a solution to a similar Claritysoft issue 

 


@MKTG Consulting 

If you’ll provide api docs, I can assist further. From the link you attached, it looks like the body of your request is missing Name & Title fields. If those are required by the api, you will need to include them as well. 


Thank you @GetUWired. Added the required fields from the API documentation and still getting the same error.

 

 

 


Would you mind sharing the api docs to Clarity? 


The link you sent doesn’t include “FirstName” & “LastName” but rather “Name”. Which i’m assuming is the name of the document. I’ve included what I am referring to from the link. Without the documentation it’s hard to help further but in Data I would include the fields below. I think you were on the right track initially just missing the “Name” and “Title” fields. 

{
"APIKey": "purefiltration-key-XXXXXXXXXXXXXXXXXXXXXX",
"Resource": "Attachment",
"Operation": "Create",
"Data": {
"Name": "Name of Doc",
"Title": "I am not sure what this would be without looking at the API docs",
"SourceObjectId": "This is the lead ID",
"SourceObjectType": "Lead",
"FileContent": "The file"
}
}

 


Here is the link to the documentation: http://liveapi.claritysoftcrm.com/help

As for the code, I did update to reflect the API requirements, but still receiving an error. I added FileContent to the data per another Claritysoft customer who has been able to get the create attachment request to work (they are attaching a doc from an email, while I’m attaching from a Gravity form). File Name is not required as Claritysoft simply creates a name from the document.

{

  "APIKey": "vitex-key-xxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "Resource": "Attachment",
  "Operation": "Create",
   "Data" : {
     "FileContent": "{{109264036__File 1}}",
     "FirstName" : "{{109264036__NAME (First)}}",
     "LastName" : "{{109264036__NAME (Last)}}",
"Title" : "{{109264036__TITLE / ROLE}}",
     "Email" : "{{109264036__EMAIL}}"
  }
}

 

Much appreciate your help.


It might be that FileContent needs the base64 encoded version of the file. I.e. a field labeled something like 

file: (Exists but not shown) .

As opposed to a link to the file. 

Is that returned from Gravity forms? A quick way to get one could be to upload or replace a file in Google Drive which will return a field like that. 


Hi @MKTG Consulting!

Just checking in. How are things going? Did any of the provided information help? Let us know!