Hi, I’m using the Gmail (Developer) source to send an email but I’m receiving the following error.
TypeError
this.to.join is not a function
DETAILS
at Object.run (file:///tmp/pdg/dist/code/fe557512e839d63b51e3d1b4c6bfd253a08cf7acc4770cfd97af036a245ea2d5/code/gmail/actions/send-email/send-email.mjs:102:64)
at process.processTicksAndRejections (internal/process/task_queues.js:95:5)
at global.executeComponent (/var/task/launch_worker.js:139:22)
at MessagePort.messageHandler (/var/task/launch_worker.js:598:28)
If I understand it correctly, a single email address can simply be put in and if it’s multiple email addresses then they need to be in an array. Is that right?
Thanks for the screenshot, glad you were able to figure it out!
For anyone else with this issue, don’t forget to evaluate to an array if you’re passing text.
For example, if you selected Custom Expression and simply type in:
["me@gmail.com"]
That will still evaluate as a string. Or literally "['me@gmail.com']". Notice the quotes outside of the array brackets [], which is a string not an array.
To evaluate as an array, use the special handlebars {{ }} to tell Pipedream to evaluate Javascript instead.
So to create a static array, use this instead:
{{ [ 'me@gmail.com' ] }}
The handlebars tell the prop to evaluate ["me@gmail.com"]as Javascript, not just simple text.