Skip to main content
Question

I'm struggling getting filters to work in a simple automation. I'm using a webhook as a trigger, logging the message response from it then trying to pass a filter based on containing a certain value.

  • June 7, 2023
  • 3 replies
  • 18 views

chadprop
Contributor
Forum|alt.badge.img

The webhook is coming from a hosted FS on AGOL set to respond to updates and creates. There are 10 'pieces' (layerids) to the feature service and I'm only interested in triggering a workbench when the layerID=0. I've imported the JSON keys and made them available to the filter action.

I've tried many different formatting methods in the 'Contains' setting but no matter what I put in there the filter always fails and logs another message that it has failed. I've got a fairly simple workbench I'm trying to trigger with the automation but since the filter fails the workbench does not run.

3 replies

chadprop
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 9 replies
  • June 8, 2023

Sorry, should have mentioned I'm using 'Form' version 2022.0 and Server 2022.0 (running on Linux).


redgeographics
Celebrity
Forum|alt.badge.img+59
  • Celebrity
  • 3697 replies
  • June 8, 2023

Can you use a Log A Message action to log the "Event as JSON" so you can see what exactly is in the messages?

 

The way you have it set up right now the webhook.layerId should contain that entire text in order to pass, whereas I suspect it will simply contain the id value, so 0 should work too.


chadprop
Contributor
Forum|alt.badge.img
  • Author
  • Contributor
  • 9 replies
  • June 20, 2023

Can you use a Log A Message action to log the "Event as JSON" so you can see what exactly is in the messages?

 

The way you have it set up right now the webhook.layerId should contain that entire text in order to pass, whereas I suspect it will simply contain the id value, so 0 should work too.

turns out the JSON being passed from the AGOL webhook started off with a ' Payload[ ' string of text that FME wasn't recognizing as JSON at all.

I had to manipulate the string and clean up the extra characters so that workbench could parse the message correctly.