Blank email field in recipient

Hi all,

I have searched through the community and have tried various different suggestions to overcome this issue but without success!

My scenario involves sending lots of information from Monday.com to a Pandadoc template. The Pandadoc template has been set up to have up to 9 recipients but the contracts generated will often have less recipients. My plan is to send the information to Pandadoc as a draft contract then remove the unused roles/ recipients before sending on the contract.

I keep running into errors for the blank email field, I have tried using {ifempty, email3, null}, {ifempty, email3, emptyarray}, {ifempty, email3, add emptyarray}, {ifempty, email3, test@gmail.com} but just cannot get the scenario to run without error!

Most of the above have returned invalid parameter errors, but the last one returned Function ‘recipients’ finished with error! Cannot read property ‘replace’ of undefined.

Any help would be greatly appreciated!

Hi @James_Lee James,

You need to build an array of emails dynamically and map that array into your “send to” field rather than trying to handle that logic in the field itself.

The array can be built many different ways:

  • Aggregator
  • JSON aggregator
  • Text aggregator

If you are not familiar with this and need this to be done quickly do not hesitate to book a call.


wiseflow.co
Our Blog
Need Make expert support quickly? Book a session

2 Likes

Hi @loic.wiseflow ,

Thanks for your reply, though I am not sure that is quite what I am looking for. I don’t want to bundle all the email addresses into one array, I had used an aggregator to bundle all the email addresses into the CC field of pandadoc, but I now need to assign each individual email to ‘Roles’ in Pandadoc. I had used ‘set multiple variables’ after the array aggregator module and can see each individual email address, but Pandadoc doesnt like it when i have a blank field. I had looked at an Iterator after the aggregator but this just seems to put all email addresses into one string.

Hi @James_Lee,

Sorry, I just looked at the Pandadoc app and the roles are not how I had remembered, so my solution was not making sense.

This worked for me: {{ifempty(6.value; “dev@wiseflow.co”)}} (replace 6.value by your email field).

If the role field is required in your template you have to have an email. If not you get this error:
Missing value of required parameter ‘Client.Email’.

2 posts were split to a new topic: How to handle varying number of recipients for ClickSend text messages

Can you help me with something similar?

I tried your suggestion but it didnt work for me. I’m getting

IMLError

Function ‘recipients’ finished with error! Cannot read properties of undefined (reading ‘replace’)

Hey there @sgharibian :wave:

just wanted to offer a piece of friendly advice to you. Generally, it’s more effective to create a new topic for each one of your questions rather than comment on old posts. That way you are more likely to get help from a fellow Maker.

If you want to point out some information from an older thread, just add the link to the new topic and redirect users here. Thanks a lot for keeping the community neat and tidy for others. :broom:

Keep up the great work! :sunny: