Mutation to create multiple cards in a pipe from a xlsx spreadsheet.

In the tab cardsImporter (bellow) you can see an example mutation. Once you change the query to your variables, send it to https://api.pipefy.com/graphql and cards will be created with the information of your spreadsheet.
In the tab Structure you can have a better view of the query and you can use this format in our IDE: pipefy.com/graphiql

{
	"query": "mutation { cardsImporter(input: {pipeId: \"219739\", url: \"https://docs.google.com/spreadsheets/d/13sohSO0eGjgZYqQSFyp0LUFwZhktiU9t3BX6Sgnb_yk/export?format=xlsx\", assigneesColumn: \"a\", labelsColumn: \"b\", dueDateColumn: \"c\", currentPhaseColumn: \"d\", fieldValuesColumns: [{column: \"e\", fieldId: \"company_name\"}, {column: \"f\", fieldId: \"contact_email\"}, {column: \"g\", fieldId: \"deal_value\"}]}) { cardsImportation { id } } }"
}
{
	mutation { 
    cardsImporter(
      input: {
        pipeId: "219739",
        url: "https://docs.google.com/spreadsheets/d/13sohSO0eGjgZYqQSFyp0LUFwZhktiU9t3BX6Sgnb_yk/export?format=xlsx",
        assigneesColumn: "a",
        labelsColumn: "b",
        dueDateColumn: "c",
        currentPhaseColumn: "d",
        fieldValuesColumns: [
          {column: "e", fieldId: "company_name"},
          {column: "f", fieldId: "contact_email"}, 
          {column: "g", fieldId: "deal_value"}
        ]
      }) { 
      cardsImportation { 
        id 
      } 
    } 
  }
}
Input fieldsDescriptionDetails
pipeId (required)Represents the pipe ID.You can find the pipe ID in the URL of the pipe.
url (required)Represents the spreadsheet URL.Sheet file must be public.
assigneesColumn (optional)Represents column's letter or number where the assignee are represented.In the sheet, the cell should contain the user's full name or the user's email. Each assignee must be separated by commas.
labelsColumn (optional)Represents column's letter or number where the labels are represented.In the sheet, the cell should contain the label's title. Each label must be separated by commas.
dueDateColumn (optional)Represents column's letter or number where the due date is represented.In the sheet, this column must be formatted as date time.
currentPhaseColumn (optional)Represents column's letter or number where the current phase is represented.In the sheet, the cell should contain the phase's name. Use this field if you need to create a card in different phase. If not supplied, the cards will be created in the first phase.
fieldValuesColumns (optional)Represents column's letter or number where the field's value are represented and the field ID where it should be sent to.To get the fields IDs of a pipe, you can use this query:

{ "query": "query { pipe(id: your_pipe_id) { table_fields { id } } } " }

📘

URL

If you are using google spreadsheet, change the end of the URL from /edit#gid=1144534632 to /export?format=xlsx.

Response

After sending the query to Pipefy, you will recieve a response in your email when the importation proccess its done!

CaseDetails
SuccessIn case of success, an email will be sent to let you know the pipe and how many cards were created.
Partially ImportedIn this case, not all cards were created. In the email, will be attached a file with the inconsistent lines and the details about the errors (in the last column). Update the lines and use this file to send another mutation to create the remaining cards.
Error 1Selected fields couldn’t be found. Maybe you type the wrong column position or field ID.
Error 2File format was invalid. Spreadsheet is not Public or the file is not .xlsx format.
Error 3File format was invalid. Spreadsheet is not Public, the file is not .xlsx format or the cell input was not in the demanded format (in this documentation you can find how you should
configure the information of each column regarding the field type.)