Neil Lovelace : try / catch are working for me. Thank You.
My next issue is that I can’t return / export a value from one step to the next. I have a global var called procore_token in my step (bad practice, I know). Why can I not return pro_token and have it available for use in the next step?
Something with the try / catch has caused this to stop working.
Dylan Sather (Pipedream) : I believe the value of response.data.access_token is undefined. If you try to return undefined , we won’t display any values. You’re logging response.data and note that there’s no access_token there
Neil Lovelace : Once the function returns a response and access token I am updating the value of the global variable. At the bottom of my step I am returning the value of that global var. Am I missing something? I know that I’m a novice, but, I thought I have this part right.
Dylan Sather (Pipedream) : Yep that’s the value that you set at the start of your workflow. But then you reset the value to response.data.access_token; in this line:
pro_token = response.data.access_token;
So you need to log response.data.access_token, which is the value you’d expect pro_token to be after running that line. I modified the workflow to log that, take a look at the most recent execution:
Dylan Sather (Pipedream) : You log the value of response.data above, so you can see the full contents of that response to confirm that there’s no access_token
Neil Lovelace : Good Morning Slackers… that was intended to be humorous.
First question of the day: How can I retrieve a response from an API endpoint and limit that response to only the data. I just received a response that included 239 rows of information, of which, I only need the last 5 or 6 rows. Is this possible? If so, how?
Thanks!
Neil Lovelace : That makes perfect sense. I suppose that when I test using PostMan it is only showing the data and stripping out the headers, etc. PostMan has spoiled me.