Power Automate (Flow) integration
In this tutorial, you will learn how to configure JungleMail for Office 365 to be used with Power Automate (previously Microsoft Flow). This integration opens up exciting new options to further automate your internal or external communication. For example, you can create flows to:
- require approval for newsletters with more than 100 recipients, or for recurrent newsletters
- update recipient metadata in SharePoint when sending newsletters to SharePoint list
- send a newsletter analytics report in 1 day after newsletter processing is finished
- for scheduled newsletters, inform users when newsletter processing has started
- import or update recipient addresses or unsubscribes from JungleMail to SharePoint or another system
- create a newsletter with conditions or recipient addresses from other systems
- create a document with JungleDocs for Office 365 flow actions and create newsletter with attachment.
1. Create a custom connector in Power Automate
Before you can use JungleMail for Office 365 in Power, you have to manually enable this feature by creating a custom connector.
1. Download the relevant API file and logo:
- US: https://www.enovapoint.com/publicfiles/JM365/JungleMail-1.0-swagger-us.json – select this if you downloaded JungleMail for Office 365 from AppSource
- US2: https://www.enovapoint.com/publicfiles/JM365/JungleMail-1.0-swagger-us2.json
- EU: https://www.enovapoint.com/publicfiles/JM365/JungleMail-1.0-swagger-eu.json
- AU: https://www.enovapoint.com/publicfiles/JM365/JungleMail-1.0-swagger-au.json
- UK: https://www.enovapoint.com/publicfiles/JM365/JungleMail-1.0-swagger-uk.json
- CA: https://www.enovapoint.com/publicfiles/JM365/JungleMail-1.0-swagger-ca.json
- Logo: https://www.enovapoint.com/publicfiles/JM365/JungleMail365logo.png
2. Sign in to your Power Automate account and click Discover > Custom Connectors on the left sidebar.
3. Click New custom connector > Import an OpenAPI file.
4. For Connector name, enter the title that you will use to find the app, as well as app-related triggers and actions, in Power Automate. Then, click Import and locate the API file. Then, click Continue.
5. Click Upload connector icon and locate the PNG file. Then, click Create connector.
2. Connect to Power Automate using API key
Now that you've created the connector, you need to connect your JungleMail for Office 365 user account to Power Automate. To do this, you will need to create a personal API key in SharePoint. Microsoft Flow will use this key to identify a JungleMail for Office 365 user. Note that the user will only be able to use Microsoft Flow actions within his permission scope. For example, if you are not permitted to send a newsletter in JungleMail for Office 365, the corresponding action in Microsoft Flow will be displayed but not functional.
1. Open JungleMail for Office 365 and click Settings > Automation
2. Click Create new personal API key. Copy this key for later use.
3. Sign in to your Power Automate account and click More > Connections on the left sidebar.
4. Click on New connection on the top left and find the custom JungleMail 365 connector you created previously.
5. In the API Key field, paste the key you've created and copied earlier, then click Create.
Notes related to API keys
- API keys are personal. Users and administrators can see only their own API keys. If the key doesn’t belong to your account, it will be shown stripped.
- API key scope is global (i.e., for all site collections).
- It is possible to define who can view, create and manage API keys in permission roles.
- Only administrators can delete/disable API keys created by other users. Users with permission to manage API keys can only disable or delete their own keys.
- API owner should have a JungleMail for 365 license, too. Otherwise, Power Automate actions connected to the key will not work.
3. Create a new flow
Now that you've configured your JungleMail for Office 365 user account for Power Automate, you are ready to create some flows. Learn more about flow creation in the Microsoft tutorial.
Example: emailing a newsletter report
1. Sign in to your Power Automate account, then click Create and select the Automated flow type.
2. Under Flow name, give your flow a title. Under Choose your flow's trigger, enter the full or partial name of your JungleMail for Office 365 custom connector.
3. Select the When newsletter processing is complete trigger and click Create.
4. In the Title field, enter the name for the trigger. This title will be displayed as a reference to this trigger in JungleMail for Office 365 settings (see step ...). Then, click New step.
5. Under Choose an action, type delay and select the first action from the list.
6. Enter the time period that you want to be used in the newsletter analytics report and click Next step.
7. Under Choose an action, type Junglemail and select Get analytics report from the list.
8. Click on the Newsletter id field. On the Dynamic content tab, select Newsletter id and click New step.
9. Under Choose an action, type send and select Send an email from the list.
10. Enter the report recipient email and email subject. On the Body field, type some plain text and select dynamic content to create your report structure. Then, click Save.
Note: use the Send email (V2) action to format email in which you customize the font, use bold, italic or underline, customize the color and highlight, and create lists or links, and more.
11. Send a newsletter in JungleMail for Office 365 and wait for your report.