Hi there,
I have a file URL that gets loaded to our CRM, Salesforce. I need to take that file URL, convert to Base64, then use a POST Webhook to upload the document to CompanyCam. I’ve accomplished the first two steps but need assistance with the POST Webhook.
The CompanyCam POST requirements are outlined here https://docs.companycam.com/reference/createprojectdocument.
For the Webhook step in Zapier, I’ve populated the following:
URL = https://api.companycam.com/v2/projects/{project_id}/documents
---- where project_id is mapped to the appropriate id from a previous step
Payload Type = json
Data = I need help with this field as it needs to look like the below but I need to insert the converted file from the Base64 step...I’m unsure how to insert the mapped field:
{ "document": { "name": "test.pdf", "attachment": "DOCUMENT FROM Base64 Step]” } }
Wrap Request in Array: No
Unflatten: No
Headers:
Authorization -- Bearer hKEY]
X_COMPANYCAM_USER -- Xlogin id]
I keep running into error messages and I don’t know how to fix them. Can someone point me in the right direction? Should I be using the file field instead? I tried doing that but it didn’t work and based on the API documentation for CompanyCam, I am assuming it’s expecting the Data section I’ve noted above.
Thanks!