Skip to content

Commit

Permalink
📝 Improve send email doc
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Nov 28, 2022
1 parent 28c1a7b commit 3e80af6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { CodeEditor } from '@/components/CodeEditor'
import { CredentialsType, SendEmailOptions, Variable } from 'models'
import React, { useState } from 'react'
import { env } from 'utils'
import { env, isNotEmpty } from 'utils'
import { SmtpConfigModal } from './SmtpConfigModal'
import { SwitchWithLabel } from '@/components/SwitchWithLabel'
import { VariableSearchInput } from '@/components/VariableSearchInput'
Expand Down Expand Up @@ -38,22 +38,29 @@ export const SendEmailSettings = ({ options, onOptionsChange }: Props) => {
const recipients: string[] = recipientsStr
.split(',')
.map((str) => str.trim())
.filter(isNotEmpty)
onOptionsChange({
...options,
recipients,
})
}

const handleCcChange = (ccStr: string) => {
const cc: string[] = ccStr.split(',').map((str) => str.trim())
const cc: string[] = ccStr
.split(',')
.map((str) => str.trim())
.filter(isNotEmpty)
onOptionsChange({
...options,
cc,
})
}

const handleBccChange = (bccStr: string) => {
const bcc: string[] = bccStr.split(',').map((str) => str.trim())
const bcc: string[] = bccStr
.split(',')
.map((str) => str.trim())
.filter(isNotEmpty)
onOptionsChange({
...options,
bcc,
Expand Down
6 changes: 5 additions & 1 deletion apps/docs/docs/editor/blocks/integrations/email.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ If you want to receive an email notification each time a user completes the bot
alt="Email block example"
/>

By default, the email will be sent from notifications@typebot.io with default content based on what your new lead has replied to. It will look like this:
By default, the email will be sent from `notifications@get-typebot.com` with default content based on what your new lead has replied to. It will look like this:

<img
src="/img/blocks/integrations/default-email.png"
Expand All @@ -20,6 +20,10 @@ By default, the email will be sent from notifications@typebot.io with default co
You can choose to use your email (SMTP) account, using the "From:" dropdown and filling in your credentials.
You can also customize the email content with your text/HTML.

## Attachments

You can attach files to your email with the Attachments option. Make sure that it points to a variable that is linked to a File upload input block.

## Troubleshooting

You are supposed to receive an email but it doesn't get to your inbox? Make sure to check the [logs](/editor/results). If you still can't figure out what went wrong, shoot me a message using the chat button directly in the tool 👍
2 changes: 2 additions & 0 deletions apps/docs/docs/embed/html-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ Typebot.initContainer('typebot-container', {
```

It will populate the `Current URL` variable with the parent URL and the `User name` variable with "John Doe".

Note that if your site URL contains query params (i.e. https://typebot.io?name=John), the variables will automatically be injected to the typebot. So you don't need to manually transfer query params to the bot embed configuration.

5 comments on commit 3e80af6

@vercel
Copy link

@vercel vercel bot commented on 3e80af6 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3e80af6 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 3e80af6 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

viewer-v2-alpha – ./apps/viewer

bot.maitempah.com
bot.phuonghub.com
bot.reviewzer.com
cares.urlabout.me
fmm.wpwakanda.com
gentleman-shop.fr
k1.kandabrand.com
lb.ticketfute.com
ov1.wpwakanda.com
ov2.wpwakanda.com
ov3.wpwakanda.com
1988.bouclidom.com
andreimayer.com.br
bot.megafox.com.br
bot.neferlopez.com
bots.robomotion.io
cadu.uninta.edu.br
dicanatural.online
goalsettingbot.com
positivobra.com.br
survey.digienge.io
this-is-a-test.com
zap.techadviser.in
bot.digitalbled.com
bot.eventhub.com.au
bot.jepierre.com.br
bot.winglabs.com.br
carsalesenquiry.com
demo.botscientis.us
forms.webisharp.com
kbsub.wpwakanda.com
live.botscientis.us
mentoria.omelhor.vc
nutrisamirbayde.com
order.maitempah.com
quest.wpwakanda.com
test.botscientis.us
typebot.stillio.com
wordsandimagery.com
bium.gratirabbit.com
bot.ansuraniphone.my
bot.cotemeuplano.com
chat.hayurihijab.com
chatbee.agfunnel.com
click.sevenoways.com
connect.growthguy.in
kuiz.sistemniaga.com
offer.botscientis.us
sellmycarglasgow.com
talkbot.agfunnel.com
tenorioadvogados.com
uppity.wpwakanda.com
abutton.wpwakanda.com
link.cascadigital.com.br
onboarding.growthside.io
reward.onlinebotdemo.xyz
type.opaulovieira.com.br
aibot.angrybranding.co.uk
bot.aidigitalmarketing.kr
bot.arraesecenteno.com.br
bot.blackboxsports.com.br
bot.cabinrentalagency.com
boyfriend-breakup.riku.ai
brigadeirosemdrama.com.br
chat.ertcrebateportal.com
chat.thisiscrushhouse.com
sellmyharleylouisiana.com
verfica.botmachine.com.br
configurator.bouclidom.com
help.atlasoutfittersk9.com
ted.meujalecobrasil.com.br
type.dericsoncalari.com.br
chatbot.berbelanjabiz.trade
designguide.techyscouts.com
presente.empresarias.com.mx
sell.sellthemotorhome.co.uk
anamnese.odontopavani.com.br
austin.channelautomation.com
bot.marketingplusmindset.com
piazzatorre.barrettamario.it
requests.swamprecordsgnv.com
type.cookieacademyonline.com
bot.brigadeirosemdrama.com.br
onboarding.libertydreamcare.ie
type.talitasouzamarques.com.br
agendamento.sergiolimajr.com.br
anamnese.clinicamegasjdr.com.br
bookings.littlepartymonkeys.com
bot.comercializadoraomicron.com
elevateyourmind.groovepages.com
yourfeedback.comebackreward.com
personal-trainer.barrettamario.it
preagendamento.sergiolimajr.com.br
studiotecnicoimmobiliaremerelli.it
download.thailandmicespecialist.com
register.thailandmicespecialist.com
viewer-v2-alpha-typebot-io.vercel.app
pesquisa.escolamodacomproposito.com.br
anamnese.clinicaramosodontologia.com.br
viewer-v2-alpha-git-main-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 3e80af6 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-git-main-typebot-io.vercel.app
docs-typebot-io.vercel.app
docs.typebot.io

@vercel
Copy link

@vercel vercel bot commented on 3e80af6 Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

builder-v2-typebot-io.vercel.app
app.typebot.io
builder-v2-git-main-typebot-io.vercel.app

Please sign in to comment.