Skip to main content
Question

Automation HTTP Request not able to access job variables (2)

  • April 17, 2026
  • 7 replies
  • 74 views

laurensdelfland
Contributor
Forum|alt.badge.img+9

It seems the issue described in the related topic, where the job variables show in the result, instead of the values, has never been resolved. Or the issue has returned in version 2025.2.4.

As a workaround I can send an email to a Teams-channel. But I looks a lot better when I send an adaptive card to the channel, using a Workflow in that channel.

But as described in the related topic, when I send a adaptive card with a HTTP Request in an Automation, a job variable like {automation.name} just shows as {automation.name} in the result. Of course I would like it to show the name of the automation.

Is there a way to make this work? Or is this a bug and I just have to wait when it will be fixed?

7 replies

laurensdelfland
Contributor
Forum|alt.badge.img+9

I did find a workaround, but it's not very pretty. 

Here is some extra information:

  1. In Teams I created a Workflow with the template “Send webhook warnings to a channel”. This generates a url.
  2. I added the HTTP Request External Action to the Failed-port of a workspace in an automation and used the webhook URL.
  3. I use this json in the Body of the HTTP Request:
    {
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.5",
    "body": [
    {
    "type": "TextBlock",
    "text": "⛔ {time}: automation {automation.name} failed",
    "weight": "Bolder",
    "size": "Large",
    "wrap": true
    },
    {
    "type": "TextBlock",
    "text": "Created: {job.timeFinished}",
    "isSubtle": true,
    "spacing": "None",
    "wrap": true
    },
    {
    "type": "Container",
    "spacing": "Medium",
    "items": [
    {
    "type": "FactSet",
    "facts": [
    {
    "title": "Workspace",
    "value": "{job.workspace}"
    },
    {
    "title": "Start",
    "value": "{job.timeStarted}"
    },
    {
    "title": "Finish",
    "value": "{job.timeFinished}"
    },
    {
    "title": "Error type",
    "value": "{error.type}"
    }
    ]
    }
    ]
    },
    {
    "type": "Container",
    "style": "attention",
    "spacing": "Medium",
    "items": [
    {
    "type": "TextBlock",
    "text": "❗ Error Message",
    "weight": "Bolder",
    "wrap": true
    },
    {
    "type": "TextBlock",
    "text": "{error.message}",
    "wrap": true
    }
    ]
    },
    {
    "type": "Container",
    "spacing": "Medium",
    "items": [
    {
    "type": "TextBlock",
    "text": "[Automation](https://fme_url/fmeserver/automations/{automation.id})",
    "wrap": true
    },
    {
    "type": "TextBlock",
    "text": "[Job summary](https://fme_url/fmeserver/job/{job.id}/summary)",
    "wrap": true
    }
    ]
    }
    ],
    "actions": [
    {
    "type": "Action.OpenUrl",
    "title": "Open job summary",
    "url": "https://fme_url/fmeserver/job/{job.id}/summary"
    }
    ]
    }

This creates a good looking message in the Teams channel, but {job.id} stays {job.id} and will not turn into a number.

The workaround I used to make this work, is I chopped up the json in 10 pieces. I created 10 Automation-parameters and put every piece in a parameters. In the HTTP Request I stitched all the pieces back together by adding all the parameters: {global.part1}{global.part2}{global.part3} etc.


sveeraa9790
Contributor
Forum|alt.badge.img+8
  • Contributor
  • May 19, 2026

Hi ​@laurensdelfland , 

             I tried the JSON for reference but i got only dynamic inputs only, can you please share you idea regarding this issue.


laurensdelfland
Contributor
Forum|alt.badge.img+9

Hi ​@laurensdelfland , 

             I tried the JSON for reference but i got only dynamic inputs only, can you please share you idea regarding this issue.

I had the same issue. I described my workaround in the previous post. But now I have applied a better workaround:

  1. Create four Automation-parameters:
  2. Replace all (curly)brackets in the json with the automation parameters, except the curly brackets of the other parameters (automation.name, job.timeFinished, etc.). Now I have this “json” as the body:
    {global.curlyopen}

    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",

    "type": "AdaptiveCard",

    "version": "1.5",

    "body": {global.bracketopen}

    {global.curlyopen}

    "type": "TextBlock",

    "text": "⛔ {time}: automation {automation.name} mislukt",

    "weight": "Bolder",

    "size": "Large",

    "wrap": true

    {global.curlyclose},

    {global.curlyopen}

    "type": "TextBlock",

    "text": "Created: {job.timeFinished}",

    "isSubtle": true,

    "spacing": "None",

    "wrap": true

    {global.curlyclose},

    {global.curlyopen}

    "type": "Container",

    "spacing": "Medium",

    "items": {global.bracketopen}

    {global.curlyopen}

    "type": "FactSet",

    "facts": {global.bracketopen}

    {global.curlyopen}

    "title": "Workspace",

    "value": "{job.workspace}"

    {global.curlyclose},

    {global.curlyopen}

    "title": "Start",

    "value": "{job.timeStarted}"

    {global.curlyclose},

    {global.curlyopen}

    "title": "Finish",

    "value": "{job.timeFinished}"

    {global.curlyclose},

    {global.curlyopen}

    "title": "Error type",

    "value": "{error.type}"

    {global.curlyclose}

    {global.bracketclose}

    {global.curlyclose}

    {global.bracketclose}

    {global.curlyclose},

    {global.curlyopen}

    "type": "Container",

    "style": "attention",

    "spacing": "Medium",

    "items": {global.bracketopen}

    {global.curlyopen}

    "type": "TextBlock",

    "text": "❗ Error Message",

    "weight": "Bolder",

    "wrap": true

    {global.curlyclose},

    {global.curlyopen}

    "type": "TextBlock",

    "text": "{error.message}",

    "wrap": true

    {global.curlyclose}

    {global.bracketclose}

    {global.curlyclose}

    {global.bracketclose},

    "actions": {global.bracketopen}

    {global.curlyopen}

    "type": "Action.OpenUrl",

    "title": "Automation",

    "url": "https://{deployment.FMEFLOW_URL}/fmeserver/automations/{automation.id}"

    {global.curlyclose},

    {global.curlyopen}

    "type": "Action.OpenUrl",

    "title": "Job",

    "url": "https://{deployment.FMEFLOW_URL}/fmeserver/job/{job.id}/summary"

    {global.curlyclose}

    {global.bracketclose}

    {global.curlyclose}

Does that answer your question?


 


sveeraa9790
Contributor
Forum|alt.badge.img+8
  • Contributor
  • May 19, 2026

Thank you so much for your valuable Answer. Now it’s working Dynamic Variables.


laurensdelfland
Contributor
Forum|alt.badge.img+9

You're welcome!

ps I'm not entirely sure it is necessary to replace these brackets: [ ] 

I actually don’t think it was not necessary, but I didn't feel like more testing when I got a working solution.


sveeraa9790
Contributor
Forum|alt.badge.img+8
  • Contributor
  • May 26, 2026

@laurensdelfland I want to add the Job Log in the Teams Notification is that any possible to do that.

 


laurensdelfland
Contributor
Forum|alt.badge.img+9

I haven't tried, but I think you can just add {job.log} somewhere to display the Job Log.