Closed pavel-mxsf closed 2 weeks ago
can you try wrapping it in fromJson()
?
id: repro
namespace: test
tasks:
- id: api
type: io.kestra.plugin.core.http.Request
method: GET
uri: https://reqres.in/api/repro
- id: testEventhub
type: io.kestra.plugin.azure.eventhubs.Produce
disabled: true
from:
body: "{{ fromJson(outputs.api.body) }}"
namespace: xxx
eventHubName: xxx
connectionString: "xxx"
bodySerializer: JSON
bodyContentType: application/json
eventProperties:
source: kestra
can you try wrapping it in
fromJson()
?
It doesn't do anything with that string, just sends "{{ fromJson(outputs.api.body) }}" to EH.
Expected Behavior
I'd like to call REST API and send result body to eventhub. Like this kafka blueprint: blueprint 151.
Actual Behaviour
It sends message to eventHub, but message body contains
{{ outputs.api.body }}
string instead of actual API response body.Steps To Reproduce
See attached example (secrets and URLs redacted), log task shows what I expect in eventHub message.
Environment Information
Example flow