Open AI to email body

Hi,
I’m trying to generate an ai email using an input I provide to try and speed up a process of providing service quotes, but I can’t seem to get it right at the moment. Please could you help out? Ignore the prompts etc. at the moment, I just wanted to see how it could function first.

I would like it to open in the users email first, so they then manually trigger the send, allowing time to proofread etc.

The API seems to generate the email fine (under the output here)

But I can’t seem to get the body right on this workflow to generate the output into the body:

I’ve also tried this way, but still shows an empty body:

Any help or guidance would be really appreciated.

your doing right make sur the vale does not contain white spaces, use ‘:trimed’ on value and on messages soaces are %20 because we cant send white spaces in url, maybe bubble convert thos automatically or let me fo a search and see if there are any othe way we can do it

mailto:to@example.com?cc=cc@example.com&bcc=bcc@example.com&subject=Your%20Subject&body=Your%20Message’

It’s the dynamic ‘body’ section I seem to be struggling to pull through from the database. I tried to do a search for emails and last items output, but it was still blank.

I understand we need a way to pass dynamic body in url which conver any which handle White spaces. So it wont break it.

Can you share your editor with me. So i can add a custom code which handle it. Without breading.

If so dm me not here

@paul.wilson hey, so here is the approach.

we need to toolbox plugin, then then we need to add a JavaScript2bubble element on page so we can call it inside our app workflow where we run custome code, so we can pass the value we get in custome code to this and this will give use the value we can pass into open external page.

Put this element on page, give it a suffix name like i give ‘encode’ so i can call this from our custom scrip with bubble_fn_encode … also check trigger event and publish event, and also we need both subject and body can have spaces and other charecter so, check Multiple outputs and make output 1 & 2 text .


Then with a send button or any workflow you triggering inside it add a run javascript and inside it add the script whcih have the subject & body of message. and simple encode those value and return them within the javascript2bubble i created two bariable SUB & BODY and add the input value which contain these value and also did a trimed on them,

then i converted those into two other variable and then passed them into javascript2bubble which will triger a workflwo,

This is my code: `const SUB = “Input subject’s value:trimmed”;
const Body = “MultilineInput Body’s value:trimmed”;

const urlSafeSUB = encodeURIComponent(SUB);

const urlSafeBody = encodeURIComponent(Body);

bubble_fn_encode({“output1”: urlSafeSUB, “output2”:urlSafeBody})`

the last line will triger a wokflow which have the output1 as subject and output1 as body from there we can add these into the mailto

Email and CC, and BB can directly be passed here also,

Thank you very much for taking the time to write such a detailed response. I’m not 100% sure on how to do this, but I’ll give it a go this afternoon following your process.

I really appreciate your time and help.

Not had chance to try to implement your suggestions yet. Decided that a few beers at the pub on Christmas Eve instead seemed slightly more appealing. Going to get some time on it this week and see if I can get it working.