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

Reply
  • 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

Children
  • 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