Skip to main content
Question

Defined JSON response when the webhook is called.


marinam
Participant
Forum|alt.badge.img

Hi, I'm still a beginner with FME and I have the following problem: I have an automation that is triggered via webhook. The caller expects a JSON response in a specific format. How can I achieve that? Normally, only the default 202 response is returned. 

4 replies

alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 19, 2025

You can’t really control the response from an Automation Webhook. It always sends back a default 202.

If you need to return a custom JSON response, you might want to look into using a Data Streaming Webhook instead. That way, you can run a workspace and have it return a JSON file (using a JSON Writer or even just a Text Writer with the right structure) as the actual HTTP response.

Here’s a link that explains how it works:
👉 Submitting a Job through an FME Flow Webhook URL

The catch is that this only triggers a single workspace, not a full automation.
You can make your workspace trigger an automation afterwards using the following :

FMEFlowNotifier in the workspace → send a message to a FME Flow topic → then use a FME Flow Topic (notified) trigger in your automation.

But be aware, the notification system in FME Flow can be a bit tricky to get right if you're just getting started.


david_r
Celebrity
  • June 19, 2025

Sounds like you require an API and not a webhook. Webhooks do not return data in the traditional sense like an API call would. You can consider a webhook a one-way push notification.

Starting FME 2025.1 you probably could use the new Data Virtualisation functionality to implement it, see https://fme.safe.com/webinars/data-virtualization-bringing-the-power-of-fme-to-any-application/


alexbiz
Enthusiast
Forum|alt.badge.img+13
  • Enthusiast
  • June 19, 2025
alexbiz wrote:


You can make your workspace trigger an automation afterwards using the following :

FMEFlowNotifier in the workspace → send a message to a FME Flow topic → then use a FME Flow Topic (notified) trigger in your automation.

But be aware, the notification system in FME Flow can be a bit tricky to get right if you're just getting started.

 

An easier way to implement that without topic notification system : 

 

You can use this workspace as a “proxy” that will trigger your automation and return custom JSON data to your client application.


david_r
Celebrity
  • June 19, 2025

Just a reminder that using a Workspace to effectively create an API endpoint will require an available engine. If the request triggers the workspace and there are none available, the workspace will end up in the queue and the response might not arrive in time, leading to a timeout error in the client.

Also, since each request triggers a separate job, it’s easy to effectively DDoS the FME Flow instance by spamming it with API requests that leads to an “endless” job queue.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings