Image types in Functions

We’re starting to get our hands on functions, and right now I’m a bit stuck because we have a connector function which takes in an Image type (and specifically, we use the image URL). Usually, this field is optional for us - not all our connector invocations actually set the image.

We seem to be unable to use this connector in Functions because the Image type is not supported in functions, and the “Run Connector” block thinks that it’s invalid to have a blank input field. Is there any workaround for this? Perhaps specifying connector inputs as optional?

Thanks!

Ah I ended up working around it by duplicating the connector function and removing the image field from the second one. Probably would still be nice to have something a bit more maintainable than this though :slight_smile:

Hi Fifi,

Good find, and you’re right about what’s happening. Functions currently don’t support the Image type input, so the “Run Connector” block treats that field as required even if it’s optional in the connector definition.

Duplicating the connector and removing the image input is the right short-term workaround. Another option is to keep one connector and pass a placeholder value (like a small blank PNG URL) when the image is not needed, though that’s not ideal.

If you’d like to see optional connector inputs supported in Functions, you can share it as a feature request here: https://community.tulip.co/c/product-suggestions/10.

Best,
Nicolo