How to send a file coming from Hubspot to a SugarCRM Lead using Zapier ?

Good morning,

I've created a test zap that extracts a sample file from hubspot (via public url) and send it to a specific SugarCRM lead (standard connection). 
I tried two ways, both present in my Zap
1- using the standard SugarCRM connector and passing the File (not shown) in the Attachment field
2- getting the Token from CRM and invoking a POST webhook, passing again the File (not shown) in the File parameter of the Call

In both case I can't get the File uploaded correctly in SugarCRM.
Using Postman or Curl, I can send it easily.
How can I do that?
Maybe because File (not shown) coming from Hubspot is in the hydrate format ? How to convert in Bin? 

Here the standard documentation about Post a file to a record in SugarCRM

https://support.sugarcrm.com/documentation/sugar_developer/sugar_developer_guide_12.2/integration/web_services/rest_api/endpoints/modulerecordfilefield_post/

Some Zapier experts here?


Thanks

Parents
  • Hey  ,

    I was looking at your post https://community.zapier.com/code-webhooks-52/how-to-send-a-file-coming-from-hubspot-to-a-sugarcrm-lead-28197 which has a little more details and screenshots.

    First of all, I will be frank, I do not know what the hydrate format is.

    If I were you, I would try to go back to basics first.

    Normally, when you upload a file in Sugar as an attachment, it is stored against a Note record. And you can either upload a file against an existing note, or create a temporary file, and then create the note and move the temp file against it.

    If you can get either of those to work, then you can attempt to attach a file to a record.

    Following the tmp file upload and then note approach:

    1) To upload a file, postman is normally set as "form-data" and on the key "filename" it sends the file, like this:

    2) Then create a note with the tmp file guid and the file name:

    Then you would receive back the note id within the response, and you should be able to verify if it worked by opening the Note with the record id and downloading again the attachment.

    If that does not work, it might well be a limitation of Zapier (or incompatibility as well), but you will be able to verify that, after attempting this linear approach that I can confirm works.

    If that's the case, you might have to find an alternative with something that might be a little more "beefed up" than Zapier.

    All the best,

    Ciao!

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States

  • Ciao Enrico,

    yes, I already achieved file saving on Lead and Note via Postman and Curl. They work flawlessly. 

    In Zapier I tried 2 things, as you can see: store the file in a File Field, store the file in an existing Note (attachment field). No success.

    To be honest, I didn't try to Create the note passing also the file but I'm afraid that won't work, because the format it's the same.

    Could be, as you say, a limitation of Zapier but ... I hope it isn't because we have already other flows created inside. 

    "Normally, when you upload a file in Sugar as an attachment, it is stored against a Note record"

    >> no, it wasn't but it isn't anymore. Sugar Sell 13 store Files elsewhere, not in the Notes module anymore (as It was under SugarCRM Pro 11).

    Thanks, ciao Slight smile

Reply
  • Ciao Enrico,

    yes, I already achieved file saving on Lead and Note via Postman and Curl. They work flawlessly. 

    In Zapier I tried 2 things, as you can see: store the file in a File Field, store the file in an existing Note (attachment field). No success.

    To be honest, I didn't try to Create the note passing also the file but I'm afraid that won't work, because the format it's the same.

    Could be, as you say, a limitation of Zapier but ... I hope it isn't because we have already other flows created inside. 

    "Normally, when you upload a file in Sugar as an attachment, it is stored against a Note record"

    >> no, it wasn't but it isn't anymore. Sugar Sell 13 store Files elsewhere, not in the Notes module anymore (as It was under SugarCRM Pro 11).

    Thanks, ciao Slight smile

Children
  • Ciao  ,

    Thanks for the heads up.

    I just opened the network tab on an instance on 13.2, created a note, with an attachment and it executed the same first APIs that I mentioned above.

    There was a difference with the temp attachment linking when creating a new note (see screenshot below)

    I suspect the previous method might still work for backward compatibility, but you never know (I have not tested it on 13.2).

    If Zapier is "aware" of a method for storing attachments in Sugar, that would be it. See if that works!

    And if it does not, then you might try something like Make which is the next step, above Zapier for automation and integrations, and see if that works for you.

    Hope it helps

    PS: Sugar is an API-based application, where the UI component lives in your browser and interacts with the backend via API only. The most efficient way to find out how to use the API is to look at the network tab while completing the action you want to replicate

    --

    Enrico Simonetti

    Sugar veteran (from 2007)

    www.naonis.tech


    Feel free to reach out for consulting regarding:

    • API Integration and Automation Services
    • Sugar Architecture
    • Sugar Performance Optimisation
    • Sugar Consulting, Best Practices and Technical Training
    • AWS and Sugar Technical Help
    • CTO-as-a-service
    • Solutions-as-a-service
    • and more!

    All active SugarCRM certifications

    Actively working remotely with customers based in APAC and in the United States