Hello, I’m using the Google Sheets app to log some information Zolo Sign is sending us via a Webhook.
I wanted to add a human friendly time into the sheet records, using Luxon to set the time with our timezone (Pacific). I’ve required Luxon into the google sheet action code, but when I try and output into the spreadsheet rows, I get the error that DateTime i.e. Luxon is not defined.
Can we use npm package items in the spreadsheet app rows?
Hi @indexsmithy - welcome to the community! Here’s a simple example that demonstrates how to use Luxon to generate and return the current date/time from a code step:
@indexsmithy - thanks for the clarification! While you can reference previous step exports and run some basic Javascript in step inputs, npm packages are not supported. My recommendation is to add a Node.js code step before the Sheets action and return the date/time value you want to reference. E.g., add the following code to the Node.js code step:
Then reference the return value in the Google Sheets action. E.g., if you name the code step pacificTime enter {{steps.pacificTime.$return_value}} in the input for the Google Sheets action.