Classic file types are no longer available for use as of January 2021. You can transition your classic files or download a PDF. Learn More

How to Get Spreadsheet ID from POST command output

Beantwoord
0

Opmerkingen

5 opmerkingen

  • Jeff Hickey

    Hi Talia, you will need to configure the Output Schema of the HTTP Request commands in order for other commands to use it's output. Assuming you're using the Platform Files Create new file endpoint, you can see an example response here https://developers.workiva.com/workiva-platform/reference/platform-createfile.

    However, instead of using the HTTP Request Connector, you may want to consider creating a new Workiva Connector that uses the Client ID and Client Secret from an API Grant associated with your account. You can then use that Workiva Connector in the command for creating the Spreadsheet which will allow you to continue using the Workiva Commands rather than the HTTP Request commands.

    0
  • Permanently deleted user

    Hi Jeff Hickey, thanks for getting back to me on this! I implemented your suggestion for using the create file endpoint and a new response code and it worked! I am now on the last step of my chain and I am running into a different issue. I am using a POST command to overwrite sheet data using the data file output from a previous Get Sheet Data command, but I have been unsuccessful and I think it is because of the Body Text structure. Can you take a look and let me know if I am in the right direction here?

    0
  • Jeff Hickey

    The value of the Body Text must be JSON in the following format:

    {
    "values": [
      [
        "Row1-Column1 Data",
        "Row1-Column2 Data"
      ],
      [
        "Row2-Column1 Data",
        "Row2-Column2 Data"
      ]
    ]
    }

    The Get Sheet Data command will produce a flat file that would need to be transformed into the above expected format. Alternatively, if you did decide to create an additional Workiva Connector rather than using the HTTP Requests command, you could directly pass the file output from Get Sheet Data into the Overwrite Sheet Data command. If you continue using the HTTP Request commands, it is also advisable to use the Platform Spreadsheets API endpoints.

    0
  • Permanently deleted user

    Jeff Hickey Thanks! Should the convert CSV to JSON command work for transforming the flat file to the needed format? My testing for this has been unsuccessful. Ideally, we would like to use the Workiva connector rather than the HTTP commands, but this chain is something that we would like to turn into a template for other users in our organization and, because of the issue we are experiencing with the service user running the chain, other users who do not have connectors set up with their credentials will not be able to use this process. Is there a way to override permissions for the spreadsheet being created in the chain or set up some type of default permission group that includes the service user and our Admin team?

    0
  • Jeff Hickey

    The CSV to JSON command won't build the expected JSON array. You could transform it to JSON using the CSV to JSON command and then build the JSON array with Handlebars to pass into your POST command.

    0

U moet u aanmelden om een opmerking te plaatsen.