Skip to main content
Solved

Automation HTTP Request not able to access job variables

  • December 20, 2022
  • 4 replies
  • 43 views

Forum|alt.badge.img

We've been using automations to run jobs, and then report the status back to Teams using an HTTP Request to call a Teams webhook. This was working fine in 2021.1, but since upgrading to 2022.2 the teams message now shows the job variable names, and not the values. image.pngThe issue seems to occur somewhere within the Adaptive Card format - as I can use a very simple JSON object in the HTTP body of the HTTP Caller (eg. { "text": "{job.id}" } )- but it seems as soon as the variable call is enclosed in square brackets - it won't populate the value.

Am I making some silly reference mistake?

(Attached HTTP Caller body.)

Best answer by keziaatsafe

Hi Kezia,

  • Yes, the adaptive card format, with square brackets worked prior to the upgrade.
  • If I send a plain json message, it works fine.
  • Using square brackets and an automation parameter in the Logger works
  • Content-Type  is set to JSON
  • Automation log, including my log actions (HTTP Body response, followed by simple log message).

 

This examples uses an extremely basic adaptive card in the HTTP Body:

{
    "type":"message",
 
"attachments":[
       {
          "contentType":"application/vnd.microsoft.card.adaptive",
          "contentUrl":null,
          "content":{
             "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
             "type":"AdaptiveCard",
             "version":"1.2",
             "body":[
                 {
                 "type": "TextBlock",
                 "text": "{automation.name}, see [https://adaptivecards.io/samples" target="_blank">https://adaptivecards.io/samples](https://adaptivecards.io/samples)"
                 }
             ]
          }
       }
    ]
 }

 

Hi @aritchie​ ,

 

Thank you for the log and additional information. I tested the square and curly brackets for the Logger in 2021 vs 2022. I see that the behaviour has changed. The logger action may have more issues with the curly brackets in 2022 and perhaps the HTTPCaller with the square brackets.

I'll file a ticket to get this looked into. 

image 

I also found this idea on FME Community that you may be interested in upvoting or including your use case. 

Thanks,

Kezia

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

keziaatsafe
Safer
Forum|alt.badge.img+8
  • Safer
  • 153 replies
  • December 23, 2022

Hi @aritchie​ ,

Just to confirm, the adaptive card format and the square brackets worked prior to the upgrade? If you use it without the adaptive card, it works fine? Have you tried the square brackets work in the Logger Action? What is the content-type parameter set to in the external action, HTTP Request? Would be you able to share the automation log for me to take a look?

 

Thanks,

Kezia


Forum|alt.badge.img
  • Author
  • 2 replies
  • January 3, 2023

Hi Kezia,

  • Yes, the adaptive card format, with square brackets worked prior to the upgrade.
  • If I send a plain json message, it works fine.
  • Using square brackets and an automation parameter in the Logger works
  • Content-Type  is set to JSON
  • Automation log, including my log actions (HTTP Body response, followed by simple log message).

 

This examples uses an extremely basic adaptive card in the HTTP Body:

{
    "type":"message",
 
"attachments":[
       {
          "contentType":"application/vnd.microsoft.card.adaptive",
          "contentUrl":null,
          "content":{
             "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
             "type":"AdaptiveCard",
             "version":"1.2",
             "body":[
                 {
                 "type": "TextBlock",
                 "text": "{automation.name}, see [https://adaptivecards.io/samples" target="_blank">https://adaptivecards.io/samples](https://adaptivecards.io/samples)"
                 }
             ]
          }
       }
    ]
 }

 


keziaatsafe
Safer
Forum|alt.badge.img+8
  • Safer
  • 153 replies
  • Best Answer
  • January 3, 2023

Hi Kezia,

  • Yes, the adaptive card format, with square brackets worked prior to the upgrade.
  • If I send a plain json message, it works fine.
  • Using square brackets and an automation parameter in the Logger works
  • Content-Type  is set to JSON
  • Automation log, including my log actions (HTTP Body response, followed by simple log message).

 

This examples uses an extremely basic adaptive card in the HTTP Body:

{
    "type":"message",
 
"attachments":[
       {
          "contentType":"application/vnd.microsoft.card.adaptive",
          "contentUrl":null,
          "content":{
             "$schema":"http://adaptivecards.io/schemas/adaptive-card.json",
             "type":"AdaptiveCard",
             "version":"1.2",
             "body":[
                 {
                 "type": "TextBlock",
                 "text": "{automation.name}, see [https://adaptivecards.io/samples" target="_blank">https://adaptivecards.io/samples](https://adaptivecards.io/samples)"
                 }
             ]
          }
       }
    ]
 }

 

Hi @aritchie​ ,

 

Thank you for the log and additional information. I tested the square and curly brackets for the Logger in 2021 vs 2022. I see that the behaviour has changed. The logger action may have more issues with the curly brackets in 2022 and perhaps the HTTPCaller with the square brackets.

I'll file a ticket to get this looked into. 

image 

I also found this idea on FME Community that you may be interested in upvoting or including your use case. 

Thanks,

Kezia


keziaatsafe
Safer
Forum|alt.badge.img+8
  • Safer
  • 153 replies
  • January 11, 2023

Hi @aritchie​ ,

 

Thank you for the log and additional information. I tested the square and curly brackets for the Logger in 2021 vs 2022. I see that the behaviour has changed. The logger action may have more issues with the curly brackets in 2022 and perhaps the HTTPCaller with the square brackets.

I'll file a ticket to get this looked into.

image 

I also found this idea on FME Community that you may be interested in upvoting or including your use case.

Thanks,

Kezia

Hi @aritchie​ ,

As an update, we've filed an issue for this bug and have included it in our Known Issues 2022.x article under FMESERVER-19612. This should be resolved in 2022.2.3.

Apologies for the inconvenience and thank you for reporting this.

-Kezia