Create a gmail draft email with email content produced from gemini module

:bullseye: What is your goal?

Create a gmail draft email with email content produced from gemini module as an answer to a received email

:thinking: What is the problem & what have you tried?

I am mapping Gmail draft email module’s body content field to the Google Gemini AI module’s result output field. This field gives correct email body content.
I am mapping the body content field to {{8.candidates.content.parts.text}} but it gives me an error that says “Invalid collection in parameter ‘contents’.”
I also tried mapping the body content field to {{8.result}} but it gives me the same error.

:clipboard: Error messages or input/output bundles

BundleValidationError
Validation failed for 1 parameter(s).
Invalid collection in parameter ‘contents’.

:link: Create public scenario page

:camera_with_flash: Screenshots (scenario flow, module settings, errors)

1 Like

Hey there,

You’ve specified the biddy to be a collection of contents but are passing a text string. It’s the box above, change it so it expects a text string instead of the collection.

Hi Stoyan,

Thank you for your help. I changed the body field to ‘Raw HTML’ (it is the only other option). See below screenshot. The error has gone now and the draft email is filled with gemini AI content but the email is not formatted. Everything is in one continuous paragraph. How can I format the email content into separate sentences and paragraphs?

Thanks

Kinjal

1 Like

Change the Gemini prompt to give you the text preformatted.

Thanks a lot. That worked fine.

1 Like