Payload format in "Perform an HTTP request" not working

I have a workflow action that have action type is “Perform an HTTP request”. And my payload is as the photo below.

But what I receive on my server is:
{
“message”: “EDMS Notification>>\nYour document has been received.\nDocument URL: Example Domain”,
“sender_number”: “”,
“keyword”: “”
}

I tried around to resolve empty “sender_number” but none of them works.
workflow_instance.document.metadata_value_of.sendernumber
document.metadata_value_of.sendernumber
Removing the quotes from the value in the payload

If anyone has idea on how to resolve, please help me.

Since your {{ document.id }} seems to get replaced correctly in your url payload, you could try the using the {{ document.metadata_value_of.sendernumber }} approach first.

Please navigate to one of your documents containing the sendernumber, then to the sandbox tool and enter your expression to make sure your it is returning the correct value. Also note that the metadata_value_of.Value is case sensitive.

Torsten

I tried {{ document.metadata_value_of.sendernumber }} as you suggested again and the result is still the same i.e. empty value for “sender_number” properties in my JSON.

I’m wondering if this is a bug of Mayan or not. Because like you said, it should work because {{ document.id }} has no problem.

If you have other idea, please help me.

It seems the new version of Mayan 4.5.4 fixed my issue with Payload. Now to access the document’s information or so, we have to use {{ workflow_instance.document }}.

From the changes log:

The workflow template state action template no longer has direct access to the document to which the workflow is attached via the variable {{ document }}. To access the document, do so indirectly via the {{ workflow_instance }} variable with {{ workflow_instance.document }}.