Help! How to create an array from scratch

Hi There,

I am using the docusign module which requires me to input certain coordinates for where docs need to be signed.

The problem is that this needs to be flexible. I some have 12 different documents that needs signing, some only 1 all in the same docusign envelope. I have made simple routers with filters and manually inputted the variables for the X and Y etc for each document depending on howmany there are :slight_smile:

It is ugly, unwieldy and now the client wants more flexibility than the amount of combinations i have prepped for him. In other words , i just want to map an array into the : sign here tabs. I do not know however how to create that array from scratch. The input it requires is :
{
“recipients”: {
“Signers”: [
{
“name”: “MR Y”,
“tabs”: {
“signHereTabs”: [
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 2, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 3, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 4, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 5, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 6, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 7, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 8, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 9, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 10, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 11, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 12, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “1”, “pageNumber”: 13, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 420, “documentId”: “1”, “pageNumber”: 5, “recipientId”: “1” },
{ “xPosition”: 280, “yPosition”: 800, “documentId”: “2”, “pageNumber”: 1, “recipientId”: “1” }
]
},
“email”: “MR Y@email.mail”,
“recipientId”: “1”,
“addAccessCodeToEmail”: false
},
{
“name”: “MR X”,
“tabs”: {
“signHereTabs”: [
{ “xPosition”: 90, “yPosition”: 420, “documentId”: “1”, “pageNumber”: 5, “recipientId”: “2” },
{ “xPosition”: 90, “yPosition”: 800, “documentId”: “2”, “pageNumber”: 1, “recipientId”: “2” }
]
},
“email”: “xxxx”,
“recipientId”: “2”,
“addAccessCodeToEmail”: false
}
]
}
}

Can someone show or help me how to put an array like this together in an automation?

Use a text aggregator and manually map the values like this

Then use a parsejson and add the text between square brackets

Hope this helps

1 Like

Thanks mate! That really did put me on a good track. However i found an alternative solution that works easier. Used a chatGPT prompt to write the correct JSON for me with the inputs given.