How do I base64 decode data from my incoming HTTP payload?

Dylan Sather (Pipedream) : when I loaded the workflow, it appeared that the new code still hadn’t been deployed. I did that and sent a new test event. Do you see the most recent run on the top-left?

Raoul Strachan : yes I see it now …

Raoul Strachan : it’s working (funnily enough) … right, so I wasn’t deploying the changes. Thanks I’m beginning to get a feel for how it works. It’s pretty cool.

Raoul Strachan : So, where how would I output that data to Google Sheets for example? Sorry to be a pain :slightly_smiling_face:

Dylan Sather (Pipedream) : no worries. Do you see the + button to add a new step to your workflow? If you click that, you’ll see the Google Sheets app, then Add a row to sheet action

Dylan Sather (Pipedream) : then, you’ll see params for the data to add, the spreadsheet ID, etc. When you’re adding data to your row, you’ll want to select the output of the previous step, steps.base64_decode_string.data

Raoul Strachan : ah ok … do I put that where it says Colums?

Dylan Sather (Pipedream) : exactly. That action lets you add 1 new row, with any number of columns. Each element in that Columns param is a new column. So if you want to add a row with 3 columns, you’d add one, then click the + button to the right of that input to add another column, and you’ll see a second input box appear below. That lets you add multiple columns for each row

Raoul Strachan : ah … yes I was having a play with it earlier but I hit the raw64 block … so I’ve come back to it.

Raoul Strachan : where do I put the ‘steps.base64_decode_string.data’ you mentioned?

Raoul Strachan : I’ve put {{steps.base64_decode_string.data}} in Columns … is that right

Dylan Sather (Pipedream) : that’s right. That’ll add a new row with one column: the base64-encoded data

Dylan Sather (Pipedream) : then just add your spreadsheet ID and sheet name, and deploy your workflow once more, and it should work :crossed_fingers:

Raoul Strachan : fantastic … I’ve clicked deploy just waiting for the data to appear in Sheets now …

Raoul Strachan : hmmm … it’s throwing the Type Error again now … grr

Dylan Sather (Pipedream) : do you see the variable you’re referencing in the base64-decode step? For some reason that reverted to the old value. Try changing that to the correct, payload value

Raoul Strachan : ok … it’s working now but I’m getting gobble-de-gook in sheets …

Raoul Strachan : I’m getting ‘�40=�U�3’ :slightly_smiling_face:

Raoul Strachan : but hey … it’s progress. I’ve got data flowing …

Dylan Sather (Pipedream) : that’s actually the value of the base64-encoded data as returned from that step: