Get current flow details in outgoing middleware

Hi,
I have a custom module. In that, I have an outgoing middleware. I need to get current flow details in that outgoing middleware. but

event.state.context is empty

Is there any way to get the current flow details in the outgoing middleware

Hi @Vijayakumar_Raghu,

Are you importing the botpress sdk in your module?

sdk.IO.IncomingEvent should contain the event in which context is stored.

Let me know if this helps.

Happy Building :robot:

yes. I am importing botpress sdk. Eventhough context is empty

{“type”:“text”,“channel”:“web”,“direction”:“outgoing”,“payload”:{“type”:“text”,“markdown”:true,“text”:“How can I help you?”},“target”:“u/e2268f69-3b2a-2cba-c385-385609f47dfd”,“botId”:“vijaybot”,“createdOn”:“2020-07-24T05:12:00.013Z”,“threadId”:“6ff0039e-cd6c-11ea-87d0-0242ac130003”,“id”:“159556752001314100”,“preview”:“How can I help you?”,“flags”:{},“state”:{"__stacktrace":[]},“incomingEventId”:“159556751875754900”,“nlu”:{“entities”:[],“language”:“n/a”,“detectedLanguage”:“n/a”,“ambiguous”:false,“slots”:{},“intent”:{“name”:“none”,“confidence”:1,“context”:“global”},“intents”:[],“errored”:false,“includedContexts”:[“global”],“ms”:0}}