Upserting using Coda Pre-built Function in Pipedream

22 views Asked by At

I am using the variable path below to upsert a data to Coda.

{{steps.trigger.event.body.actions[0].name}}

The code above returns an example output below:

CO-DEN - IBC 2021

What I really want to insert is only ‘CO-DEN’, the first word from the output. Is there anyway to tokenize the data to be upserted? Thanks.

enter image description here

1

There are 1 answers

0
Ali Reza Dehdar On

Yes. I can help with the easy & ugly solution. Simply use the split function to achieve what you want.

In example:

var sentence = '{{steps.trigger.event.body.actions[0].name}}';
var firstWord = sentence.split(' ')[0];