String variable from previous step in code block not behaving as expected

I’m using a hubspot piece, “Find Contact”, and I want to use the email string value that is returned in the results in a subsequent code piece sending an HTTP request. My debugging efforts have led me to conclude the email string value is not being grabbed correctly out of the Find Contact piece. I even tried adding a code piece that just console.logs the email string value, but I get a URL is null or undefined error message:

Additionally, using a very similar piece for hubspot, “Get Contact” works fine:

When I look at the payload of both hubspot pieces, the email string value looks exactly the same.

I’m wondering if maybe there’s a bug somewhere in the “nesting” (not sure what the right word is) of the Find Contact piece, since there are more nested levels to get to the email value in that piece.

How many contacts does the Find Contact action return? You can try the following code. Also, can you recreate the HubSpot step to ensure it uses the latest piece version?

Okay false alarm. I think something within ActivePieces internal versioning wasn’t using my most up to date edits to my pieces, but everything’s working as expected now. Thanks for the quick reply to help!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.