Solved

Automations webhook keys not working?

  • 10 January 2023
  • 2 replies
  • 6 views

Badge +2

I have been trying to get wehook trigger output keys to work, but haven't had any luck.

 

I have an automation with  a webhook trigger, and an output key configured:

Screen Shot 2023-01-09 at 2.45.19 PMThe JSON I am posting to the webhook is:

{
    "email":"user@example.com",
    "data":"this is a test"
}

The Log action is set to log:

{webhook.email}
{message}

The automation log is as follows:

1	2023-01-09T19:32:45Z | 410115 : (Automations) Assembling automation "test"...
2 2023-01-09T19:32:45Z | 410156 : (Automations) Creating webhook trigger...
3 2023-01-09T19:32:45Z | 410109 : (Automations) Creating link from trigger...
4 2023-01-09T19:32:45Z | 410136 : (Automations) Updating event keys for component...
5 2023-01-09T19:32:45Z | 410150 : (Automations) Logging events for component...
6 2023-01-09T19:32:45Z | 410105 : (Automations) Creating project "test"...
7 2023-01-09T19:32:45Z | 410116 : (Automations) Finished assembling automation "test"
8 2023-01-09T19:32:48Z | 410160 : (Automations) Automation successfully triggered
9 2023-01-09T19:32:48Z | {webhook.email}
{ "email":"user@example.com", "data":"this is a test"}

So I know that the webhook is getting triggered and that the message is received.  However, shouldn't the email address have been logged instead of {webhook.email}?

 

FME Server 2022.2 Build 22765 on FME Cloud

icon

Best answer by sanaeatsafe 16 January 2023, 20:21

View original

2 replies

Badge +6

Hi @cnieman, I was able to reproduce this on the same FME Cloud version under certain conditions.

  • If the application posting to the webhook has a header "Content-Type: application/json", the email address will be parsed correctly.
  • If the application posting to the webhook has a header "Content-Type: text/plain" or another, the email address will not be parsed correctly. It will be posted as {webhook.email}.

Can you configure the client request's headers? If you can, please change the content-type to JSON.

Badge +2

Hi @cnieman, I was able to reproduce this on the same FME Cloud version under certain conditions.

  • If the application posting to the webhook has a header "Content-Type: application/json", the email address will be parsed correctly.
  • If the application posting to the webhook has a header "Content-Type: text/plain" or another, the email address will not be parsed correctly. It will be posted as {webhook.email}.

Can you configure the client request's headers? If you can, please change the content-type to JSON.

Thanks. I was pretty sure I had the content type header set correctly, but maybe I had a spelling mistake.

Reply