Mattermost, Inc.

Trigger ID lifetime


Is there any way to extend the Trigger ID lifetime from 3 seconds? I’m having some serious difficulties with that…

Longer explanation:
Mattermost sends the /commands as www-form-urlencoded data and not JSON. Also, when using /commands Mattermost also send an Authorization header, which Microsoft Flow (Power Automate) does not accept. Flow drops all the requests which include such header and it also only accepts JSON data.

So, I now have to post the request data from Mattermost to an Azure Function powershell script which parses the www-form-urlencoded data, reformats it to JSON and sends it to Flow as a new request. Flow in turn will open a webhook to request some more information from the Mattermost user by using the trigger_id.

That process takes time, and every second time it seems to take just enough over three seconds to fail the webhook with “Trigger ID for interactive dialog is expired. Trigger IDs live for a maximum of 3 seconds.”.

Now the question is: Is there any way to make the lifetime at least a slight bit longer, like 5 seconds? Or any other way to work around this issue? Technically I could maybe create the webhook also in the Azure Function phase, but they still sometimes take a bit longer than three seconds to get to that phase.