You may know my series of blog posts about BizTalk Server Tips and Tricks that I normally write in the BizTalk360 blog. Well, the goal of this Logic Apps Tips and Tricks series will be the same; to provide simple tips or tricks that may improve your performance on developing Logic Apps workflows, avoiding issues, apply best practices and so on.
But you may think, “What a strange way to start this topic, deprecated actions? Why should I use deprecated actions?”.
First of all, you shouldn’t use deprecated actions or at least avoid using them. Nevertheless, this is the first time that Microsoft deprecated Connection Actions, as far as I remember, and you may see that in the connectors documentation pages, for example:
- Office 365 Outlook Connector: where several actions were deprecated like:
- Send an email: This action is deprecated, and you should use Send an email (V2) instead;
- Reply to email and Reply to email (V2): These actions are deprecated, and you should use Reply to email (V3) instead. And many others.
- SQL Server Connector: where also several actions were deprecated like:
- Execute a SQL query: This action is deprecated, and you should use Execute a SQL query (V2) instead.
- Get row: This action is deprecated, and you should use Get row (V2) instead. And many others
Microsoft has been discontinuing some actions for some time or at least running different versions side by side, don’t get me wrong. When I say that, for the first time that Microsoft deprecated connection actions, I mean actually remove them from the list of actions on the Logic App design, take for example the two connectors mentioned above, you can’t see the deprecated action on the Logic App designer anymore:
But don’t be alarmed, your Logic Apps that still use these actions continue to work properly.
Secondly, and to be honest, Microsoft was never extremely good at providing proper documentation, even in the old days when we had software releases every two or three years, now imagine in this crazy fast delivery world that we are living in! What you see is:
- A big gap between the documentation and the features that we have available or not properly documented in terms of how they work;
- There is nothing that tells you what was changed or how a certain task, that was possible to perform in previous versions of action, can now be done. For example:
- The Send an email action, that was deprecated and not available anymore from the list of actions of this connector, had a property “Is HTML” which you could place inside the body a custom HTML in which you would easily be able to send a fancy and well-presented email and not a simple text email without any flavor. Send an email (V2) action doesn’t have this property anymore and you cannot directly put custom HTML on the body property anymore. So, how can you perform this nowadays?
Note: I will explain how you can perform this in another post, stay tuned.
Sometimes you need to put stuff up and running fast, for several reasons, and you don’t want to run into this kind of annoying and sometimes time-consuming issues. So, sometimes you want to put it working as it was and later on, investigate and upgrade the Logic App once you’ve found the solution.
Third, but not less important, I better know how to do it than not to know at all.
How to call deprecated connector actions on Logic Apps?
Taking the Office 365 Outlook Connector and the Send an email action as a sample, the simple way for you to use a deprecated action inside the Logic App designer is to:
- On the Choose an action, select the Office 365 Outlook connector
- That will render the Action on the Logic App designer
- Now in the Logic App designer menu, select the option Code View to switch to the Code View Editor and see the Logic App definitions in JSON.
- Next, you need to find the Send an email (V2) that should be represented as Send_an_email_(V2), but that is true if you don’t change the name of the action
- The simple way for you to find the string, is“/v2/Mail”
- Once you found the correct action, replace the path:
- From: /v2/Mail
- To: /Mail
Switch back to Logic App Designer by clicking the Designer option in the menu.
As you will see, despite the action still being called Send an email (V2) in fact, you are using the older version.
And you still can run side by side:
Quick, simple and practical.
Stay tuned for new Azure Logic Apps tips and tricks!