How can i parse the response?

i want to parse the response and store access token in variable and use that variable in flow

Hi Deepak,

Does this help with your use-case

i am stuck because my AccessToken gets Expired in few Hours… so i need a solution so that my token Dont get expired Or my flow should run like first it store the Access Token And use That Access token again and again when my trigger Got fired

Can you

  1. create a new SF token using an API call
  2. for every Lead you’re trying to create pass as “Bearer tokenValue”

i have generated access token now i dont get how to pass to get lead api…

will you connect me on google meet . . . . . . . . . . . .

i am unable to storen access Token Here

what should i write in value…?? . . . … . . . . . … . . . . . … . . . . . . . … . . . .

Can you share the function you’ve written to store the API response and get the Bearer token

i havent written any function… … … … … . … . . . . … . . . … . . . . … .

You need to write a function and call that function to then access the token.

let { apiResponse } = ymLib.args; // retrieve API response
let  token = JSON.parse(apiResponse.body);

console.log(token);

return  token.token_type + " " + token.access_token;

Now add this function as your transformation function and store the response in a string variable
Then pass that token to create a lead

this function is not runnning…always gives an error

can you come on google meet please for 5min… … … … . . . . . . . . . . . . . . … . . . . … . . . … .

Can’t hop on a Gmeet, but it would be great to see the function you’ve written. We can help debug it because we’re using SF for storing leads here as well.

Additionally, why haven’t you used the SF integration that’s out of the box. This way you don’t need functions/APIs or anything else for that matter.
No-code way to add a user as a lead

client have asked that whenever someone message anything on whatsapp lead should be generated…but yellow.ai sf integration ask to many questions…to store a lead and it does allow custom fields… so i have to make my own flow and API

here when i tap on test it throws an error… … … . … . . . . … . . . . . . . … . . . . . . . . . … . . . . . .

after that this is my final flow


is there any issue in this…??