Events
You can use events within Aimplan storage tables to trigger external actions, such as sending an email or performing additional processing.
Events are only triggered for visuals with Entra ID enabled. If you are not yet using Entra ID, events will not be triggered.
Stored procedures require approval. You will need to contact support to gain access. If approval has been granted, please note that the procedure must receive one parameter with the name @commit_id. The data type of the parameter must be BIGINT.
In this document, we will walk you through the configuration of such an event.
You will need an active Power Automate license to follow along. This guide assumes you already have a model set up. If not, please refer to Convert report to planning
We will begin by identifying a table for which we want to set up the action. In this example, we will track the forecast for our "New Office" project and notify managers of any changes.
First, ensure that the visual is using Entra ID to identify users. Then, locate the storage table that the visual is writing to. In our case, this is "FactPlanningData".
Now that we know which table will receive the updates, we will navigate to it in the portal. Go to https://portal.aimplan.com/storage-tables and click on the table name.
From there, you will see an "Events" button in the toolbar. Click it to navigate to the event configuration page.
On this page, you will have the option to configure an outgoing webhook. We will enable this soon, but first, we must create a webhook URL for the system to invoke. For this, we will use Power Automate.
Navigate to https://make.powerautomate.com/ and click "Create." Under "Start from blank," select "Instant cloud flow."
You will then be prompted for a flow name and how to trigger it. We can leave the name blank, as Power Automate will generate a name for us. However, we need to select the trigger "When an HTTP request is received" (not HTTP Webhook).
Once created, you will be presented with a UI that allows you to add subsequent actions, as well as our "manual" trigger. If you click on the trigger, you will notice that the URL is generated when saved. Before saving, however, we must change the value of "Who can trigger the flow?" to "Anyone," as the API cannot authenticate cross-tenants.
To ensure everything works, we will add a simple action: "Post message in a chat or channel." Add this step, choose the appropriate team, channel, and message, then save the flow.
Once saved, check the manual trigger. It should now contain an HTTP URL. This is the URL we will provide to the storage table.
Back in the portal on the events page, click "Enable Webhook." Then, enter the webhook URL you got from Power Automate and press save. Congratulations, your first webhook is now set up!
So what happens next? When you or another user saves data from an Aimplan visual, the data is sent to our APIs and written to the database. Once successfully written, Aimplan will trigger the webhook, and Power Automate will execute the flow.
This process results in a message being posted in your Teams channel. Let’s check that:
Webhooks are asynchronous. This means the visual will not, and cannot, wait for the flow to complete. Additionally, any errors that occur in the flow are not reported to Aimplan but can be found within the webhook tool itself.
Now that you’ve successfully set up your first webhook and integrated it with Power Automate, why not explore additional possibilities? Power Automate offers a wide range of connectors and automation options that can help you further streamline your processes.
Here are a few ideas to explore on your own:
- Experiment with additional triggers or actions in Power Automate to notify different teams or log data in other applications.
- Explore how conditions or loops can be used to create more complex workflows.
For more advanced options and inspiration, visit the official Power Automate documentation. This resource will help you dive deeper into customizing your flows and discovering the full potential of automation.
Happy automating!