We start with creating a new resource by clicking on the green plus.

Then a window like the one left side should open.

Is this the case we click on category Compute and choose the component Function App.

The white lightning on a light blue background.

If we go on we can create our Function App by filling out the input boxes.
Then we click on create and wait until our Function App is deployed.

Then we switch to the Function by clicking on the go to resource button.

We should get directed to a page which looks like this.

Now we can create our new Function by clicking on the button.

Now you can decide which environment you want to choose. We decide to use the In-portal option.

Then we must decide what should trigger the function. We will use an Event Hub in this example. So, we click on the right section for more templates.

In the opening menu we scroll down until we reach the Azure Event Hub Trigger.

We go on and install the missing Extension this will take a few minutes until its installed. When we have successful installed the extension we can go on and bind our event hub to the function.

Trough clicking on the new mark a popup opens where you can relegate to your Event Hub.

Have we filled out all the missing information we click on create and get directed to our first function, that should look like this.

Now in the list on the left side, click Integrate to open the screen where we can set our trigger, inputs and outputs.

Our Event Hub Trigger is already implemented. Now we implement our output. We start by clicking on the New Output box. A list will open where we can decide which Output we will use.

We choose the Azure Cosmos Db as Output.

First, we need to install the Cosmos DB extension. Then we are going to declare the Database we like to use by clicking on the new tag.

When all requirements are filled out we can click on the save button and the function output is added to function.

We can see that in the function.json file the Event Hub Trigger and the Cosmos Db are bound.

Now we can declare the cosmosDB as output in the run.csx file and use the value of outputDocument as the value which is transported into the cosmosDB.