I am using similar workflow (batch)
Invoke a cloud function using HTTP Source, and get the secret value from cloud secrets
parse the cloud function response and extract required token and Base64 attributes
Using HTTP sink, call a token generation api with inputs from step 2 and generate the bearer token
I am unable to achieve this and getting invalid request in http sink. @zahid khan/ others , Any pointers would help.