Question

Using an automation trigger webhook as a Teams outgoing webhook?

  • 12 April 2021
  • 2 replies
  • 16 views

Badge

Has anyone configured an FME trigger webhook as an outgoing webhook in Teams? It'd be very nice to just @ an automation without leaving Teams.

 

I've got an automation triggered by a webhook that can be triggered no problem using curl, but trying to use that webhook in Teams gets an immediate failure ("Sorry, there was a problem encountered with your request"). It looks like Teams may be expecting a particular response (https://stackoverflow.com/questions/45743782/custom-bot-always-replies-with-an-error) and I'm not sure whether FME provides that / how to troubleshoot from here.


2 replies

Badge +2

Hi @mtaftferguson​ ,

I haven't personally tried to use outgoing webhooks with MS Teams, so someone else may have actually done this and have better advice.

 

It's a bit hacky, but instead of giving MS Teams the webhook url from automations, you could point it to a Data Streaming workspace url, then have a really basic workspace that creates a JSON response (like in the SO thread) and streams it back to Teams.

You'd also probably need a job submitter transformer or a HTTPCaller to actually pass on the incoming message from Teams to where you wanted it to go next.

 

Badge

Hi @mtaftferguson​ ,

I haven't personally tried to use outgoing webhooks with MS Teams, so someone else may have actually done this and have better advice.

 

It's a bit hacky, but instead of giving MS Teams the webhook url from automations, you could point it to a Data Streaming workspace url, then have a really basic workspace that creates a JSON response (like in the SO thread) and streams it back to Teams.

You'd also probably need a job submitter transformer or a HTTPCaller to actually pass on the incoming message from Teams to where you wanted it to go next.

 

That's an interesting idea that I'll definitely look into, thank you! That could be nice regardless; it'd spare us having to change configuration on the Teams side every time we had a new workspace/automation we wanted to use this pattern for.

 

The automation that prompted this question a beast, so I'd be looking to trigger it, rather than a single workspace/job... there's no automation equivalent of an FMEServerJobSubmitter right now, correct? I suppose that's where an HTTPCaller + webhook trigger would come in.

 

Edit to add: In initial testing, the data streaming workspace never gets triggered either, so Teams is either interfering sooner than that or it's user error :)

Reply