Batching Inside Logic App.
I’m going to create two logic apps.
One will do batching of the inboard massages and the other one is going to receive the single record and send it to the batch logic apps.
I have already created both empty logic apps so, let’s start the first one.
We’ll select a batch trigger and inside the batch trigger, you’ll select the batch mode. It is either inline or an integration account.
- If you select inline you will configure all your batch triggers right here in the designer.
- If you select an integration account, you can select a predefined batch criteria that is defined in your integration account.
The batch name is to be defined. Add number of massages to the batch then compose connector. It will have the batched data. Chose an action and compose then save it.
In the third step, I’m going to send the emails. I’m selecting Gmail to send emails you can Search Gmail in the search bar as well. In the body I’ll put output & current data in subject. I’m going to save this now.
Let’s move to the second one! Here I’m selecting HTTP request as a trigger. Selecting sample JASON so that it can create a schema automatically.
I’ve already copied my JASON file, now I‘m going to paste it. so, It will generate a schema automatically. We need our first logic app for this purpose.
We need to search batch and select our logic app and give the exact name. It needs to match the batch name and batching name into the file logic app. I’m going to save the body of our inboard massage.
If we take a look on the advanced options. Here I don’t need to set partition name or message ID. We can see here the trigger name. Work flow has already filled it for us. Let’s save this logic app.
For testing purpose I’m going to use Boseman. Let’s create a basic request.
Filling in the request name box.
We’ve got to copy the logic app trigger URL and paste the URL. In body section I’ve already created a JASON file. In body section we can paste the JASON file and click on send.
We can see, we only have one entry.
There is no entry in batch receive logic app. I’m going to send multiple requests and then check the status.
Here you can see that I have three requests to receive in a single logic app.
Only one single execution has been completed at the batch receive. I’m going to check my email, check in JASON file. I have two massages in my email.