Copy data from Retool state

Hey there, I was wondering whether there's an easy way to copy data from the Retool app state. Ideally, I could directly copy the object / JSON output of a query directly to my clipboard.

This would be great for things like debugging, plugging your data into LLMs for quicker iteration, etc.

2 Likes

Hi @Janosch_Herrmann, we can log it in the Debug console. Although we won't be able to directly copy the object from there, we can find the log in the browser's console and copy it from there:

For example:

[
    {
        "id": 3,
        "name": "Benjefield Errol",
        "email": "danten3q@bbc.co.uk",
        "product_id": "SKU_764",
        "quantity": 46,
        "order_requested": "2023-01-24T12:26:00.000Z",
        "order_completed": "2023-01-24T07:01:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 4,
        "name": "Upward Pandora",
        "email": "kledger1g@hhs.gov",
        "product_id": "SKU_203",
        "quantity": 34,
        "order_requested": "2023-01-25T23:06:00.000Z",
        "order_completed": "2023-01-14T09:49:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 5,
        "name": "Johanning Chloe",
        "email": "efishenden5c@npr.org",
        "product_id": "SKU_294",
        "quantity": 16,
        "order_requested": "2023-01-19T06:31:00.000Z",
        "order_completed": "2023-01-09T21:57:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 6,
        "name": "Schafer Alia",
        "email": "bmanktelow30@geocities.jp",
        "product_id": "SKU_449",
        "quantity": 69,
        "order_requested": "2023-01-15T17:59:00.000Z",
        "order_completed": "2023-01-06T12:39:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 7,
        "name": "Kenafaque Adelind",
        "email": "lzannolli1m@hostgator.com",
        "product_id": "SKU_969",
        "quantity": 99,
        "order_requested": "2023-01-03T18:31:00.000Z",
        "order_completed": "2023-01-11T00:56:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 8,
        "name": "Fendt Talya",
        "email": "kturton37@github.com",
        "product_id": "SKU_362",
        "quantity": 52,
        "order_requested": "2023-01-22T09:20:00.000Z",
        "order_completed": "2023-01-14T20:40:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 9,
        "name": "Rogeon Pepi",
        "email": "groddie12@icio.us",
        "product_id": "SKU_355",
        "quantity": 31,
        "order_requested": "2023-01-10T20:51:00.000Z",
        "order_completed": "2023-01-10T21:31:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 10,
        "name": "Linne Charo",
        "email": "hcodner4y@java.com",
        "product_id": "SKU_239",
        "quantity": 88,
        "order_requested": "2023-01-09T11:43:00.000Z",
        "order_completed": "2023-01-24T06:57:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 11,
        "name": "MacDowal Sharlene",
        "email": "bboyle4a@ocn.ne.jp",
        "product_id": "SKU_903",
        "quantity": 60,
        "order_requested": "2023-01-16T23:15:00.000Z",
        "order_completed": "2023-01-30T02:27:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 12,
        "name": "Turton Bailie",
        "email": "lraffels43@blogger.com",
        "product_id": "SKU_830",
        "quantity": 74,
        "order_requested": "2023-01-19T23:16:00.000Z",
        "order_completed": "2023-01-13T19:06:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 13,
        "name": "Garriock Christoph",
        "email": "rcodner0@berkeley.edu",
        "product_id": "SKU_644",
        "quantity": 33,
        "order_requested": "2023-01-20T01:48:00.000Z",
        "order_completed": "2023-01-28T23:38:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 14,
        "name": "Quemby Delphinia",
        "email": "hboshers50@narod.ru",
        "product_id": "SKU_500",
        "quantity": 99,
        "order_requested": "2023-01-03T11:18:00.000Z",
        "order_completed": "2023-01-06T20:39:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 15,
        "name": "Bonick Willey",
        "email": "rpeetz@npr.org",
        "product_id": "SKU_836",
        "quantity": 64,
        "order_requested": "2023-01-25T17:19:00.000Z",
        "order_completed": "2023-01-22T16:07:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 16,
        "name": "Blackmoor Sondra",
        "email": "jvenneur60@bbb.org",
        "product_id": "SKU_573",
        "quantity": 69,
        "order_requested": "2023-01-06T12:13:00.000Z",
        "order_completed": "2023-01-22T00:03:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 17,
        "name": "Bohey Anita",
        "email": "efoat3d@list-manage.com",
        "product_id": "SKU_105",
        "quantity": 88,
        "order_requested": "2023-01-02T17:12:00.000Z",
        "order_completed": "2023-01-11T22:01:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 18,
        "name": "Penkman Bailie",
        "email": "dleavy2i@qq.com",
        "product_id": "SKU_116",
        "quantity": 16,
        "order_requested": "2023-01-30T13:37:00.000Z",
        "order_completed": "2023-01-06T17:27:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 19,
        "name": "Kaminski Tersina",
        "email": "tpikett4d@gnu.org",
        "product_id": "SKU_782",
        "quantity": 22,
        "order_requested": "2023-01-14T05:19:00.000Z",
        "order_completed": "2023-01-01T22:03:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 20,
        "name": "Guy Quinlan",
        "email": "dshields5n@loc.gov",
        "product_id": "SKU_574",
        "quantity": 25,
        "order_requested": "2023-01-24T15:14:00.000Z",
        "order_completed": "2023-01-13T05:16:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 21,
        "name": "Codner Binni",
        "email": "etexton2d@stanford.edu",
        "product_id": "SKU_743",
        "quantity": 66,
        "order_requested": "2023-01-15T03:52:00.000Z",
        "order_completed": "2023-01-11T16:22:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 22,
        "name": "Lenton Ranique",
        "email": "tborth5b@zimbio.com",
        "product_id": "SKU_124",
        "quantity": 14,
        "order_requested": "2023-01-22T05:42:00.000Z",
        "order_completed": "2023-01-07T17:10:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 23,
        "name": "Kaminski Elmira",
        "email": "hwarbrick1s@alibaba.com",
        "product_id": "SKU_709",
        "quantity": 2,
        "order_requested": "2023-01-29T09:59:00.000Z",
        "order_completed": "2023-01-19T21:09:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 24,
        "name": "Rogeon Gay",
        "email": "cbrabham3p@a8.net",
        "product_id": "SKU_848",
        "quantity": 47,
        "order_requested": "2023-01-06T04:09:00.000Z",
        "order_completed": "2023-01-24T17:51:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 25,
        "name": "Mitchely Doretta",
        "email": "vhessel2w@sciencedirect.com",
        "product_id": "SKU_23",
        "quantity": 24,
        "order_requested": "2023-01-07T17:46:00.000Z",
        "order_completed": "2023-01-18T02:27:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 26,
        "name": "Turton Gwen",
        "email": "pravillas4l@yale.edu",
        "product_id": "SKU_844",
        "quantity": 93,
        "order_requested": "2023-01-06T22:44:00.000Z",
        "order_completed": "2023-01-30T16:41:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 27,
        "name": "Worviell Eustace",
        "email": "gblanchflower3u@nasa.gov",
        "product_id": "SKU_94",
        "quantity": 26,
        "order_requested": "2023-01-15T00:31:00.000Z",
        "order_completed": "2023-01-31T01:45:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 28,
        "name": "Craiker Almeda",
        "email": "ceilles29@google.ru",
        "product_id": "SKU_161",
        "quantity": 13,
        "order_requested": "2023-01-13T10:03:00.000Z",
        "order_completed": "2023-01-22T03:09:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 29,
        "name": "Bohey Annadiana",
        "email": "pheindricka@zimbio.com",
        "product_id": "SKU_686",
        "quantity": 93,
        "order_requested": "2023-01-09T07:38:00.000Z",
        "order_completed": "2023-01-30T21:53:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 30,
        "name": "Blanchflower Domini",
        "email": "aduckeru@scribd.com",
        "product_id": "SKU_622",
        "quantity": 50,
        "order_requested": "2023-01-22T11:40:00.000Z",
        "order_completed": "2023-01-02T02:36:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 31,
        "name": "Bonass Ruperto",
        "email": "mboman9@google.cn",
        "product_id": "SKU_249",
        "quantity": 96,
        "order_requested": "2023-01-17T01:01:00.000Z",
        "order_completed": "2023-01-03T08:44:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 32,
        "name": "Spellissy Myca",
        "email": "bpycock5@myspace.com",
        "product_id": "SKU_86",
        "quantity": 90,
        "order_requested": "2023-01-10T08:42:00.000Z",
        "order_completed": "2023-01-10T07:01:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 33,
        "name": "Kersey Charlotte",
        "email": "mboman9@google.cn",
        "product_id": "SKU_892",
        "quantity": 63,
        "order_requested": "2023-01-19T04:37:00.000Z",
        "order_completed": "2023-01-21T09:47:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 34,
        "name": "Cullrford Guinevere",
        "email": "cfoale16@oracle.com",
        "product_id": "SKU_385",
        "quantity": 20,
        "order_requested": "2023-01-16T07:34:00.000Z",
        "order_completed": "2023-01-07T11:54:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 35,
        "name": "Veare Tory",
        "email": "lharriott2a@joomla.org",
        "product_id": "SKU_978",
        "quantity": 30,
        "order_requested": "2023-01-04T05:51:00.000Z",
        "order_completed": "2023-01-26T07:09:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 36,
        "name": "Cutler Anita",
        "email": "bpycock5@myspace.com",
        "product_id": "SKU_670",
        "quantity": 39,
        "order_requested": "2023-01-27T12:46:00.000Z",
        "order_completed": "2023-01-04T13:44:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 37,
        "name": "Handrik Nikolaos",
        "email": "rpordals@usatoday.com",
        "product_id": "SKU_929",
        "quantity": 54,
        "order_requested": "2023-01-28T02:28:00.000Z",
        "order_completed": "2023-01-18T09:22:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 38,
        "name": "Berryann Birch",
        "email": "carckoll8@ebay.co.uk",
        "product_id": "SKU_916",
        "quantity": 72,
        "order_requested": "2023-01-18T21:25:00.000Z",
        "order_completed": "2023-01-13T05:44:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 39,
        "name": "Harriott Halie",
        "email": "fskirling2p@adobe.com",
        "product_id": "SKU_695",
        "quantity": 54,
        "order_requested": "2023-01-07T08:13:00.000Z",
        "order_completed": "2023-01-19T18:19:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 40,
        "name": "Masarrat Nevsa",
        "email": "ssiddons10@sfgate.com",
        "product_id": "SKU_112",
        "quantity": 36,
        "order_requested": "2023-01-12T22:23:00.000Z",
        "order_completed": "2023-01-29T04:32:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 41,
        "name": "Cameli Purcell",
        "email": "jcorssenf@dyndns.org",
        "product_id": "SKU_357",
        "quantity": 92,
        "order_requested": "2023-01-28T08:14:00.000Z",
        "order_completed": "2023-01-20T22:40:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 42,
        "name": "Radleigh Donnie",
        "email": "chyam5u@usatoday.com",
        "product_id": "SKU_925",
        "quantity": 24,
        "order_requested": "2023-01-12T22:03:00.000Z",
        "order_completed": "2023-01-01T14:59:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 43,
        "name": "West-Frimley Etienne",
        "email": "gcullrfordm@myspace.com",
        "product_id": "SKU_695",
        "quantity": 24,
        "order_requested": "2023-01-14T09:52:00.000Z",
        "order_completed": "2023-01-12T03:17:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 44,
        "name": "Boyle Geno",
        "email": "iwathall41@reverbnation.com",
        "product_id": "SKU_591",
        "quantity": 38,
        "order_requested": "2023-01-08T21:35:00.000Z",
        "order_completed": "2023-01-28T07:12:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 45,
        "name": "Feore Vyky",
        "email": "vhefforde46@fc2.com",
        "product_id": "SKU_445",
        "quantity": 69,
        "order_requested": "2023-01-16T08:40:00.000Z",
        "order_completed": "2023-01-06T14:40:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 46,
        "name": "MacDowal Brewer",
        "email": "cfoale16@oracle.com",
        "product_id": "SKU_352",
        "quantity": 11,
        "order_requested": "2023-01-07T05:05:00.000Z",
        "order_completed": "2023-01-19T15:08:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 47,
        "name": "Weatherburn Blythe",
        "email": "mharken63@nymag.com",
        "product_id": "SKU_774",
        "quantity": 65,
        "order_requested": "2023-01-07T00:06:00.000Z",
        "order_completed": "2023-01-06T04:45:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 48,
        "name": "Godmar Filippa",
        "email": "lkenafaque2o@utexas.edu",
        "product_id": "SKU_401",
        "quantity": 59,
        "order_requested": "2023-01-25T17:02:00.000Z",
        "order_completed": "2023-01-25T21:16:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 49,
        "name": "MacCafferky Charo",
        "email": "bhollyland3e@prnewswire.com",
        "product_id": "SKU_633",
        "quantity": 7,
        "order_requested": "2023-01-21T00:21:00.000Z",
        "order_completed": "2023-01-09T04:39:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 50,
        "name": "Doyle Beilul",
        "email": "mboman9@google.cn",
        "product_id": "SKU_729",
        "quantity": 50,
        "order_requested": "2023-01-07T06:47:00.000Z",
        "order_completed": "2023-01-24T20:28:00.000Z",
        "received_payment": false,
        "date_test": "2024-02-22",
        "price": "99.52"
    },
    {
        "id": 1,
        "name": "Gimson Elisha",
        "email": "cwindrum31@nsw.gov.au",
        "product_id": "SKU_650",
        "quantity": 59,
        "order_requested": "2023-01-13T13:57:00.000Z",
        "order_completed": "2023-01-20T17:07:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22 15:58:56",
        "price": "99.52"
    },
    {
        "id": 2,
        "name": "Durrett Adrien",
        "email": "bmanktelow30@geocities.jp",
        "product_id": "SKU_839",
        "quantity": 36,
        "order_requested": "2023-01-17T01:26:00.000Z",
        "order_completed": "2023-01-16T00:54:00.000Z",
        "received_payment": true,
        "date_test": "2024-02-22 15:58:56",
        "price": "99.52"
    }
]
2 Likes

Another option might be to generate a file that will get downloaded. This is a little hacky, but does the job. Add a button that runs this code and click on it. Now your state will be in a file you can open and copy from easily.

            const blob = new Blob([text], { type: 'text/plain' });
            // Create a link element
            const a = document.createElement('a');
            // Create a URL for the Blob and set it as the href attribute
            a.href = URL.createObjectURL(blob);
            // Set the download attribute to the desired file name
            a.download = 'app state.txt';
            
            // Programmatically trigger a click on the link element
            document.body.appendChild(a); // Append to the body
            a.click();                    // Trigger the download
            document.body.removeChild(a); // Remove the link element```
3 Likes