Mailgun
Mailgun by Sinch is an email delivery service for sending, receiving, and tracking emails.
Connect a Mailgun account to Chatlayer and trigger and email that will be sent to your user at that point in the bot flow.
In an Action block, select the Mailgun app from the App options menu on the right side.
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FGdHQ0m0bUqnPlVwKOsTX%252Fimage.png%3Falt%3Dmedia%26token%3D022dd317-19d2-455b-ad90-ef045f9c72f5&width=768&dpr=4&quality=100&sign=5349dac3&sv=1)
An App integration section will automatically appear. You will be able to see the accounts that are already connected to Chatlayer, if any, and a button to connect a new account. In case the account you need to use is already connected, you can select it from the list and skip the "connect new account" steps.
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FNkgAc2sz73pWDpFMcuzw%252Fimage.png%3Falt%3Dmedia%26token%3Db87ed36c-5668-4f9b-ac54-3b4bfac9a782&width=768&dpr=4&quality=100&sign=d125ff3e&sv=1)
When clicking “Connect new account”, this pop-up will appear:
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FUwS4GuHZhdBw6GuRqVrj%252Fimage.png%3Falt%3Dmedia%26token%3Db978b053-5f7d-4d5b-859a-8007e4fac8a4&width=768&dpr=4&quality=100&sign=8b25e6e7&sv=1)
The Private API key can be found by clicking your username on the top right corner and clicking on API Keys.
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FGIwnUN9t98ZR1xVRJYoD%252Fimage.png%3Falt%3Dmedia%26token%3D59c0b93f-9880-4a2e-b911-e8a28fdad68e&width=768&dpr=4&quality=100&sign=49eb3b0b&sv=1)
The Domain names can be found on the left-side menu, by clicking Sending and Domains. The Domain region is informed by the flag to the left side of each Domain name:
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FnfzEHgmUnXhHgLDefs6y%252Fimage.png%3Falt%3Dmedia%26token%3D564667be-4dcb-4b8e-a923-16a2f9bba2e6&width=768&dpr=4&quality=100&sign=74a5ec04&sv=1)
After that you will be able to see all connected accounts in the Action block.
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252Fj2amhlyUdZzU5jQgIw65%252Fimage.png%3Falt%3Dmedia%26token%3Dd2a65ddf-4495-4e65-8950-27bf28051b07&width=768&dpr=4&quality=100&sign=23fd1246&sv=1)
Then select the available action, in this case it’s ‘Send email’
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FTRcjcbg6SSaqZqhHjf4c%252Fimage.png%3Falt%3Dmedia%26token%3Ddff995d5-ab04-40b3-825b-aa86a351244c&width=768&dpr=4&quality=100&sign=a30e1732&sv=1)
Set up the action by filling the required fields:
![](https://docs.chatlayer.ai/~gitbook/image?url=https%3A%2F%2F2786867680-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-LLTwFwbOqJj4dDhg8Ju%252Fuploads%252FoBjrJZmJhWPpSod6R0lH%252Fimage.png%3Falt%3Dmedia%26token%3D4b22e0cb-47e7-4d81-9a8c-3b38a680f7ea&width=768&dpr=4&quality=100&sign=f5a4ee47&sv=1)
'From': make sure to add the username before the domain name, eg.: username@domainname.com
'To': you can write down the emails of one or multiple recipients or write down a variable that is saving the user input from an Input Validation earlier in the flow,
eg.: create an Collect input block (the green ones) to ask for the user email, save it under the variable emailLead. In the Action block (orange), inform the name of the variable in curly brackets {emailLead} to send it to the email the user informed in the previous step.
'Email subject': choose a contextualized email so the user will easily find it.
'Email body': write down the text that the user should receive and sign it.
You're good to go.
When that Action block is triggered from your flow, the user will receive the email you configured.
If you are using a Mailgun sandbox account to test the flow, make sure to pre-authorize the recipients for that domain on Mailgun.
Last updated