How to do Background remove (AI) with Make.com (Integromat)? (It says the transformation not avail)

itoldusoandso
itoldusoandso Member Posts: 9
edited October 8 in Developer APIs

I have a Make.com (integromat) workflow to grab image from Airtable, upload to Cloudinary, process some transformations and then save back to Airtable. All works fine.

But when i try to use the … e_background_removal .. transformation, it doesn't work. I do have credits for the AI Background removal plugin and I am able to remove the background by running the command as a URL in the browser.

How to get it working in Make.com? I am getting error saying something with 400 Error. When digging deeper it says the AI Background Transformation is not available to be used on the fly .. or something.

So how can I use the AI Remover?

The basic background remover (non-AI) is just awful so onnly the AI remover is worth it.

Best Answer

Answers

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 176 admin

    Hi there,

    Thanks for reaching out.

    As mentioned in our documentation, there are some scenarios where e_background_removal cannot be used on-the-fly. For example, this transformation is not supported for fetched images or incoming transformations.

    For further details, I would advise taking a moment to review the documentation here:
    https://cloudinary.com/documentation/transformation_reference#e_background_removal

    If you'd like to share the URL where you received the 400 error, I can check our backend logs and let you know the exact reason for the error.

    I hope this helps. If you have any questions, do not hesitate to ask.

    Kind regards,

    Tia
    Developer Support Engineer
    Cloudinary

    --
    💡 Improve your site's performance by applying optimization features when delivering assets


    💬 Community Forums | 🧑‍💻 Discord Server
    🧑‍🎓 Academy Training | 📖 Documentation | 📰 Blog

  • itoldusoandso
    itoldusoandso Member Posts: 9
    edited September 22

    Thank you. Is there any way I can use Cloudinary with Make or Zapier for background removal?

    The error I am getting in Make is this:


    This is my request:

  • Cloudinary Team
    Cloudinary Team Administrator, Cloudinary Staff Posts: 176 admin

    Hey,

    Yes, you should be able to do that.

    From the error message you shared it looks like we didn't receive any file. We received "data:image/jpeg;base64," but no file attached to this url. Please try to check again your workflow on Make.com since it seems the step before is sending null instead of the image.

    Let me know if this helps or if you need further troubleshooting.

    Best,
    Keren

  • itoldusoandso
    itoldusoandso Member Posts: 9

    Hello Karen,

    Thank you for pointing that out. The previous step is just an HTTP request and that is pretty dumb step doing nothing but getting the file. The step before that is however the Cloudinary transformation.

    If the transformation is background removal, it gives that error. If the transformation is anything else e.g. enhancing the image, then there is no issue with the flow.


    So this flow works (e_improve_indoor:40)


    So this flow DOES not work (e_background_removal):

    Does it have to do with the limitation as to when the e_background_removal runs?

    It seems the step is not running correctly, if I go to that Output link, it shows me simply the page doesn't exist. This should be the link on Cloudinary to the result image.

    So my first question here was, is there is a way to use Cloudinary here with Make (integromat) to get the background removal working using the native tools that Make offers.


  • Wissam
    Wissam Member, Cloudinary Staff Posts: 107

    Hi @itoldusoandso ,

    Thank you for the additional information.
    I believe it is possible to use make.com with Cloudinary with the background removal.
    Can you please provide the full output URL that I can check the backend logs on our side?

    Regards,

    Wissam

  • itoldusoandso
    itoldusoandso Member Posts: 9

    I may not have credits left in Cloudinary because I am just not on the free account with 15 monthly edits. I don't remember if I ate the credits by using the programmable links in the browser to text the background removal, or did I lose the credits also by running Make flow with trial and error. In any case, I don't have credits left in Cloudinary AI background removal addon, so that could be also an issue, but I just don't know if that is the issue or am I getting simply an error because the flow is not working in Make. But I would like to know if the issue isn't with Make flow setup because I am tapping in the blind here, not really understanding that well what I am doing but sometimes 50/50 it actually works.
    I have another Cloudinary account I can test with the free credits to see if it works with Make, but before I do that I just want to make sure it's not something else that is the issue. Because the error doesn't say .. not enough credits or something but just receives no input.

    There isn't much any documentation about using cloudinary with make.com so that makes it a bit harder.


    https://res.cloudinary.com/rlink/image/upload/e_background_removal/iwht4cfei8qss0ypexo9

    and earlier:

    https://res.cloudinary.com/rlink/image/upload/e_background_removal/x1szk0z2cn7gukrcropj

  • Vdeub
    Vdeub Member, Cloudinary Staff Posts: 79

    Hi @itoldusoandso

    Would you mind sharing the blueprint of your flow so I can work on it on my side?

    If you are not able to attach it here, feel free to open a ticket to support@cloudinary.com referencing this community thread.

    Thanks in advance.

    Best,

    Loic

  • itoldusoandso
    itoldusoandso Member Posts: 9

    Hi Loic,

    Thank you. Here is the shared Airtable Database link:

    https://airtable.com/app0MpIEx9PwmkJ3z/shrTJWSBGdA1p8Tge

    Attached Make scenarios:

    1. Optimization - directly upload from Cloudinary Transform step to Airtable - WORKS

    2. Optimization - upload via HTTP step to Airtable - WORKS

    3. Background removal - directly upload from Cloudinary Transform step to Airtable - doesn' work

    4. Background removal - upload via HTTP step to Airtable - doesn't work

    I tried with the HTTP module and without, that's why there are both included here.

    Basically what I can see is that transformation is running fine, it deducts credits and I can see the URL in the transformation step has a valid link pointing to the image with removed background. For strange reason the link is showing as Input, I would have expected it would be Output.

    But the following steps do not work:

    ……..either direct (upload from Cloudinary Tranform to Airtable directly)

    …… or via HTTP module (upload from Cloudinary Transform to HTTP module, then upload to Cloudinary Assets and then from there download to Airtable)

    If I run the direct flow (without HTTP step), then the flow finishes, but nothing is uploaded to Airtbale, see the data size is 1.7 KB

    I even tried to specifically set the name of the file and file extension (e.g. "removed.png") in the last step when it should upload to Airtable, but this doesn't help either:

    If I look at the Transformation step, it shows output link and there is the image processed without background:

    https://res.cloudinary.com/dzks8rlxu/image/upload/e_background_removal/oxaym9cekxc7mu7gndl3

    If I do the way with HTTP module, it complains invalid data received, the input link for HTTP module is good, but the data size is 1.3 KB, so the following steps says invalid data.

    I also tried doing same by setting the file extension in the transformation step to .JPG.

    ===============

    For comparison I did both for the image improving transformation e_improve:indoor:40

    This works fine with both scenarios (direct or without HTTP step)

    Because the image improve transformation is running fine, I don't see if there is anything that Make support could do since it looks like there is something different about the background removal addon in Cloudinary.

    Attached all mentioned Make flows as ZIP file. I wasn't able attach the files directly.

  • itoldusoandso
    itoldusoandso Member Posts: 9
    edited October 9

    OKAY I got it WORKING !!

    After struggle quite long hours.

    Long story short.. somewhere in the documentation for Cloudinary it says, background removal via the plugin doesn't work for the first try, it gives error, but it will work on the second try.

    So I have change the Make.com flow so that it includes a separate first branch that is executed first, followed by a pause and a second branch that gets the working url for the background removal.

    The issue is only with the background removal plugin.

    I have added subsequent image improvement command (which is free in Cloudinary) and this command runs without any issue.

    Now 2 more things remaining on my to-do list with regards to this flow:

    1. process all images in the Airtable source field


    So far I can't figure out how to get the flow to process all images in the source Airtable field. The attachment field in Airtable contains multiple pictures. I have added the iterator and aggregator for the array but doesn't look like it does anything. The flow only runs once, only processes the 1st image in the Airtable field.


    2. add processed images to an attachment field in Airtable without overwriting existing images

    Here it says apparently how it's done via adding a formula to the Update a Record step for Airtable, but I haven't figured out the array yet.

    https://community.airtable.com/t5/development-apis/upload-multiple-files-to-the-same-field-with-integromat/td-p/123511

    https://community.airtable.com/t5/development-apis/upload-multiple-files-to-the-same-field-with-integromat/td-p/123511

    https://www.youtube.com/live/adWU3DkUuIU?t=2558s




    Maybe this flow isn't very efficient and maybe it can be improved by reducing the number of steps.

    Any suggestions for improvement will appreciated.


  • Cloudinary_John_H
    Cloudinary_John_H Cloudinary Staff Posts: 51

    Thanks for the writeup! We don't have any immediate suggestions, but the level of detail is greatly appreciated. As others have ideas they can definitely add them here

  • itoldusoandso
    itoldusoandso Member Posts: 9

    I should mention one more peculiar thing with Cloudinary, not sure if I mentioned already:
    If I want to do 2 transformations involving the same tools, they need to be done as separate steps from Make automation. It can't be done in one shot.

    e.g. I want a picture to have 2 separate text and rectangle block overlays, one on the top and one on the bottom of the picture. I use same transformations twice, one on the top, first adding the rectangle block overlay covering the top band of the picture from side to side and on top of that text overlay.

    Then the bottom of the picture same thing.

    In Make, these are 2 separate steps, they need to be 2 separate recipes.

    This wasn't very obvious as the module contextual help for Cloudinary in Make doesn't mention about it.

  • Cloudinary_John_H
    Cloudinary_John_H Cloudinary Staff Posts: 51

    Thanks for that additional context, our community appreciates it!

  • Eren1107
    Eren1107 Member Posts: 1

    It sounds like you're dealing with a tricky integration issue. I’ve seen similar cases in some Gleem AI reviews where API calls can cause unexpected errors, especially when handling on-the-fly transformations. Maybe the AI remover has certain limitations in how it integrates with platforms like Make.com. It might help to compare how the workflow is set up versus how it works in a browser. Debugging this part could offer some insights!