101.1 - Event to action: Inbound call to email

The very first automation to learn is how to use an EVENT to cause another ACTION to happen.

It is good to do this with a simple example first. This will just send yourself an email at the start of a new call. (Then we'll build on that to show you how to send data, test call flows, add integrations, etc. The sky is the limit once you get started.)


All you need for this: 

1. a phone number that routes to any call bot application, e.g. one of the example welcome audio prompt players is fine.

2. that's it


TEST 1 - Set up and test basic event to send an email action

In babelforce "Integrated processes > Events", create a new "Event Trigger" and select the EVENT "Inbound call" and the ACTION "send email". Enter an email address that you use and send yourself a message. It will look like this:


Note that Trigger is left empty. A trigger defines the conditions under which the action will be carried out whenever the event occurs. An empty trigger is assumed to be always true. We'll learn more about triggers in other guides later.

Also you will be asked to enter a priority number. This only becomes useful later to influence the order in which some of the actions are carried out. For now just enter a high number, i.e. so it is carried out before any others you might have in your account.

Now go to the section "Numbers". Check that you have a phone number and that it is routed to a callbot/call-flow application. It will look something like this:


Now call the number from your own cell phone or other phone.

You will receive an email. But not a very interesting one :-)


TEST 2 - Add some more interesting data from the call

Simply paste in this placeholder {core.expressions} into the email body in the action. Your Event-trigger-action will now look like this:


This will reveal in your email the entire set of expressions and their values currently set in the system and available to use for other automations. Part of it will look like this:


[call.from.number] evaluates to [4930920373300] 
[call.from.anonymous] evaluates to [false] 
[call.from.mobile] evaluates to [false] 
[call.displayAs] evaluates to [null] 
[call.to] evaluates to [4930920373321] 
[call.to.number] evaluates to [4930920373321] 



TEST 3 - Use specific placeholders to make our email content more useful

The items on the left above are the EXPRESSIONS and on the right the current value at the time of the "Inbound call" event. The way to evaluate any expression is to put curly brackets around it, then it is known as a placeholder because it can be put into a text to hold the place for the real value.

So we can format our email using the "send email" action with useful information like this:


TEST 4 - IMPORTANT: How to see what happens on your call with live logs 

One of the most important things to learn is how to see what is going on when you do your test calls. This is the key to testing your automations, your callbots (IVRs ...), your integrated processes, etc.

Just go to "Reporting > Live logs" and at the top enable live logging. Note that it turns itself off after a time because otherwise all your processes would always be sending that huge amount of log data all the time. The idea is that you turn it on when you are actively testing.

If you turn on all categories and levels in the filters, then repeat your test inbound call, you will see something like this in the live logs when your call arrives on the babelforce platform:


As you can see the call arrives the the call flow voice application and simultaneously it sends the email action using the event trigger. Once you have multiple automations and potentially multiple call flows, you will see them all being fired here.


Further references

Learn more about expressions and placeholders here

You can find out about events (and the triggers and actions) here

And you can dig into all aspects of callbots, IVRs, call-flow applications here








Have more questions? Submit a request