Trying to add cc&bcc: on Button to openURL to compose Gmail

I am trying to make a Button that will open a Gmail compose message screen that has the To, CC, BCC, and Subject fields pre-filled.
The CC and BCC are static; To and Subject change depending on the record.

This one works but doesn’t have the cc field, and I want to add a BCC too…”&{send to email} &"&su="&({load}&" - confirmation")&"&body="&{load numbers}

now trying to add a CC field and it won’t save the formula, get an ‘Invalid Formula’ error”&{send to email}?"&su="&({load}&" - confirmation")&"&body="&{load numbers}

What am I doing wrong?

@Traci_Franssen You were really close! You missed an ampersand in your CC formula. To make the link work, all you need to do is encode the URL component using the ENCODE_URL_COMPONENT() function. Here is the formula you are looking for:

"" &
"&to=" &
ENCODE_URL_COMPONENT({send to email}) &
"&cc=" &
"&bcc=" &
"&su=" &
ENCODE_URL_COMPONENT({load} & " - Confirmation") &
"&body=" &
ENCODE_URL_COMPONENT({load numbers})

I did not know what {load} and {load numbers} represented, and I did not know what static BCC and CC emails you wanted either, so I kept your fields as-is and inputted a couple example emails for BCC and CC. I also changed your starting URL link, removing the /u/0/ part and the authuser part. I believe they are unecessary, though feel free to add them back in if you need them for your use-case.

Here is a screenshot showing how it would work (the screenshot uses {Email}, {Subject}, and {Body} fields so that future people looking at this can make better sense of what is going on):


Gmail (after clicking button)


Hooray!!! :tada: It’s working now – Thank you so much!!!

1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.