Example: How-to setup a webhook that updates your Trello board

From TARGIT 2021 Summer

With 2021 Summer release, it became possible to setup a notification in TARGIT with a webhook endpoint (instead of sending out an e-mail).

This allows you to set up an action in a 3rd party tool that will be activated by your TARGIT Notification Agent.

There are numerous tools that could be used - but in the Microsoft World Power Automate (formerly known as Microsoft Flow) could be the obvious choice (most Office 365 or Dynamics 365 subscriptions include access to Power Automate).


Power Automate allows you to set up a flow consisting of at least 2 things:

  1. A Trigger, which defines how the flow is activated
    (for integration with TARGIT this will be an HTTP-request, which is what TARGIT sends out when a condition in a notification is met)

  2. One or more actions
    Power Automate has connectors to numerous other applications, which means you can make those applications do things when your flow is triggered

In this use case, we want to make a Power Automate flow that can receive an incoming HTTP request from TARGIT and update a Trello board based on the content of that notification.

Note: If you don't know Trello - just understand that it is a web based project management tool - after following this guide, you should be able to replace the Trello step with any other step you might want based on the very long list of available connectors in Power Automate.


Overview of necessary steps:

  1. Go to Power Automate - https://powerautomate.microsoft.com and sign in using your Microsoft Account - create a flow and copy the URL that is autogenerated when you save the flow
  2. Do a manual test run in Power Automate
  3. Go back to TARGIT create a notification where you paste in the URL from Power Automate as Webhook endpoint
  4. Run your notification from TARGIT Scheduled jobs overview to start the test run
  5. Now you have a sample of what TARGIT is sending to your Power Automate flow - you need to copy that and paste it in your flow as "a sample payload"
  6. Now you can refer to dynamic content in your flow and replace your dummy text with data coming from your notification
  7. Save your flow again and test it by running your notification
  8. Check that your Trello board is updated like you wanted and you're done!


Step-by-step guide

Step 1:

When you have logged into https://powerautomate.microsoft.com, choose the Create button on the left hand side and choose Instant Cloud flow



Type in a good name for your flow - scroll down in the list and pick "When an HTTP request has been received" and click Create


Now add a new step to your flow:



Search out Trello and choose to create a card:



If this is the first time you have used Trello in a flow, you will now be prompted to log-in to Trello with a user account (this is not shown in this guide)


Now search out the Trello board and Parent List id (column in the board) that you would like to update - add a dummy text to the Card Name and click Save



Click on the first part of your flow and copy the HTTP POST URL



Step 2: 

Now choose Test in the upper right corner of the screen:



Choose Manually...


...and hit the Test button in the bottom right corner



Step 3:

Create a TARGIT Notification and paste in your URL in the delivery tab of your Notification dialogue:

Notice: Creating TARGIT notifications is not part of this guide, please refer to other documentation if in doubt - just make sure that your condition is met, so it will actually send out the HTTP Request



Step 4:

Save your Notifcation and choose to run it from the scheduled jobs overview



Step 5:

Now you can go back to Power Automate and see that your flow has been succesfully run:



And you can also look at your Trello board and notice a new card has been created with your text:



So your flow works - what is missing?

The information from the Notification should be used to update the card - so the Trello user can see what data has caused this To-Do card to be created - we need to be able to access this information - and to do that, we need to make Power Automate understand the structure of what we are sending from TARGIT.


Open the first part of your flow by clicking it - click in the Body field - use CTRL-A and CTRL-C to copy all the content here. This is what TARGIT has sent to Power Automate (a so called "Payload").



Now click Edit in the upper right corner...


...click use Sample Payload to generate Schema...


...paste in the content and click "Done"


Notice that Power Automate has used the "sample payload" to create a schema that describes the payload from TARGIT:



Step 6:

Open the second part of your flow and place your cursor in the Card Name - remove the Dummy Text and click on the Flash Symbol to get access to the dynamic data:


Now pick some of the dynamic content and click save (in my case I picked Name - which is the name of the Notification Agent in TARGIT - and Reason - which is the autogenerated text from TARGIT that explains why this Notification has been triggered.



Step 7:

Now Save your Flow and go back to TARGIT and run your Notification again



At this point your TARGIT notification may fail in some cases.
If that's the case - go back edit your flow, remove the sample payload, save and run a manual test again - then you should be fine.


Step 8: 

Check that your Trello board has been updated as desired:


And you're done!



Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.