Automate current date import using Power Automate

As you all know, Anaplan cannot display the current time from a function, so it needs to be imported into a module by an import action. As described here it can be done via Python: Import and automate current date import to Anaplan. I would like to to show you an easier way of doing it when your organization has access to Microsoft Power Automate.

For starters, create a module in Anaplan for loading the current time. In this case it is a module with only one line item formatted as text: 

CommunityMember129720_0-1657279334057.png

After creating this module, use Python (see @chase.hippen best practice article) or Postman to get the lineitem id.

Now you can setup a Power Automate flow. If you choose a scheduled power flow the first step is already added (Run flows on a schedule in Power Automate - Power Automate | Microsoft Docs). The next step is getting the current date and time. You can use the variable step in Power Automate:

CommunityMember129720_2-1657279747136.png


formatDateTime(convertTimeZone(utcNow(),'UTC','W. Europe Standard Time'),'yyyy-MM-dd hh:mm:ss')

The next step is getting the authorization token. You can use the HTTP action for this (this is a premium action, so you can only use it when you have premium): How to get started with HTTP requests in Power Automate - Microsoft Tech Community

CommunityMember129720_3-1657280251359.png

Now you only need to get the token from the response in a Parse JSON action and use the token in the API call for writing the data to your module:

CommunityMember129720_4-1657280527321.png

And there you go:

CommunityMember129720_5-1657280577171.png

Thanks for reading, and please contact me if you have any further questions.