M365 Template to Excel Error

Hello!

I am utilizing the M365 Connector from the Library, when I run the standard “Add a row” to a table, the template from tulip library allows Values1-Values5 which runs great. But the moment I add more than 5 columns to my table in excel, and match with a Value6, Value7, Value8 – I get hit with the error ““code”:

string"InvalidArgument"

“message”:

string"The number of rows or columns in the input array doesn’t match the size or dimensions of the range."

Which is incorrect as there are corresponding columns in my table.

Hi @samantha.mcintosh,

Here’s what’s happening:
The M365 “Add a row” template from the Library is set up for 5 columns (Values1–Values5). When you try to add Value6, Value7, etc., the connector ends up sending an array that doesn’t match the exact shape Excel expects for your table. That mismatch is what triggers the “InvalidArgument” error.

Here are a few ways to work around it:

Custom connector function
Build a connector function that matches your specific table:

  • Use the Microsoft Graph API directly

  • Construct the values array with the correct number of columns

  • Set the range to match your table structure

Modify the template
Duplicate the Library template and extend it by adding Value6, Value7, and so on. Update the function logic so it knows how to handle the extra inputs.

Batch operations
If you want something simpler, you can split the data into multiple “Add a row” calls.

Next step
How many columns does your table have, and how comfortable are you with editing connector functions? That will help point to the best option.

Best,
Nicolo