How to append array data with mapping columns in google sheet?

Describe the issue/error/question

I receive that format of data and wanna pull all data from array to google sheet with mapping data to each columns in google sheet but I don’t understand how I can may do that.

Please share the workflow

Share the output returned by the last node

[

  {

    "code":"000000",

    "message":null,

    "messageDetail":null,

    "data":[

      {

        "adv":{

          "advNo":"11447618160028704768",

          "classify":"mass",

          "tradeType":"SELL",

          "asset":"USDT",

          "fiatUnit":"RUB",

          "advStatus":null,

          "priceType":null,

          "priceFloatingRatio":null,

          "rateFloatingRatio":null,

          "currencyRate":null,

          "price":"71.30",

          "initAmount":null,

          "surplusAmount":"855.65",

          "amountAfterEditing":null,

          "maxSingleTransAmount":"61000.00",

          "minSingleTransAmount":"30500.00",

          "buyerKycLimit":null,

          "buyerRegDaysLimit":null,

          "buyerBtcPositionLimit":null,

          "remarks":null,

          "autoReplyMsg":"",

          "payTimeLimit":null,

          "tradeMethods":[

            {

              "payId":null,

              "payMethodId":"",

              "payType":null,

              "payAccount":null,

              "payBank":null,

              "paySubBank":null,

              "identifier":"RosBankNew",

              "iconUrlColor":null,

              "tradeMethodName":"RosBank",

              "tradeMethodShortName":"RosBank",

              "tradeMethodBgColor":"#EE293D"

            },

            {

              "payId":null,

              "payMethodId":"",

              "payType":null,

              "payAccount":null,

              "payBank":null,

              "paySubBank":null,

              "identifier":"TinkoffNew",

              "iconUrlColor":null,

              "tradeMethodName":"Tinkoff",

              "tradeMethodShortName":"Tinkoff",

              "tradeMethodBgColor":"#DAB700"

            }

          ],

          "userTradeCountFilterTime":null,

          "userBuyTradeCountMin":null,

          "userBuyTradeCountMax":null,

          "userSellTradeCountMin":null,

          "userSellTradeCountMax":null,

          "userAllTradeCountMin":null,

          "userAllTradeCountMax":null,

          "userTradeCompleteRateFilterTime":null,

          "userTradeCompleteCountMin":null,

          "userTradeCompleteRateMin":null,

          "userTradeVolumeFilterTime":null,

          "userTradeType":null,

          "userTradeVolumeMin":null,

          "userTradeVolumeMax":null,

          "userTradeVolumeAsset":null,

          "createTime":null,

          "advUpdateTime":null,

          "fiatVo":null,

          "assetVo":null,

          "advVisibleRet":null,

          "assetLogo":null,

          "assetScale":2,

          "fiatScale":2,

          "priceScale":2,

          "fiatSymbol":"₽",

          "isTradable":true,

          "dynamicMaxSingleTransAmount":"60946.89",

          "minSingleTransQuantity":"427.76",

          "maxSingleTransQuantity":"855.53",

          "dynamicMaxSingleTransQuantity":"854.79",

          "tradableQuantity":"854.79",

          "commissionRate":"0.00100000",

          "tradeMethodCommissionRates":[

          ],

          "launchCountry":null,

          "abnormalStatusList":null,

          "closeReason":null

        },

        "advertiser":{

          "userNo":"sfc42bc5b24e0352f972e4f880861dd56",

          "realName":null,

          "nickName":"WorkBench",

          "margin":null,

          "marginUnit":null,

          "orderCount":null,

          "monthOrderCount":104,

          "monthFinishRate":0.946,

          "advConfirmTime":null,

          "email":null,

          "registrationTime":null,

          "mobile":null,

          "userType":"user",

          "tagIconUrls":[

          ],

          "userGrade":2,

          "userIdentity":"",

          "proMerchant":null,

          "isBlocked":null

        }

      },
  }]
}]

Hi @droppe, based on your description I am not completely sure which data exactly you want to append to your Google Sheet.

But assuming it’s one row per element in your data array and your sheet looks like below a workflow like below should do the job. It would use the Item Lists node to split up your array into individual n8n items.

In this example I have mapped data into each column like so:

Recording 2023-01-17 at 16.29.02

Result:

Hope this helps!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.