Dynamic payload via flat file

Hi,

Thanks for your quick responses for all of queries posted.

Can I add expressions in a flat file payload? I have series of API calls, feeding from one to another. Need a way to pass some data dynamically thru payload coming via flat file.

Any help is appreciated.

Sure, happy if I can help.

Sorry, can you please elaborate more as I do not understand what exactly you have planned.

Lets say 2 API calls. I get response from API1 call. API2 call has flat file payload that I need to pass certain elements from API1 output. how can I achieve this? Is it possible for me to include expression {{ }} in flat file? Does it recognize when processing API2 call?

Still not 100% sure I understand what you have planned but:
If you want to use the full response you could use it directly via an expression. As that is however not the case and/or it is not a JSON-response you can so not specifically select the data you want probably some additional work has to be done with a Function-Node. With it, you can transform the response any any way possible from API 1 to be in the correct format for API 2. That “prepared-data” you can then add via an expression.

I kind of understood, will try and let you know my findings.

As always, thanks for finding time for immature like me.

Like I said before always happy to help. Hope it was helpful!

Yes, I was able to use function node and replace certain parts of payload (retrieved from data file).

1 Like