Automate/script export?

Viewing 2 reply threads
  • Author
    Posts
  • September 8, 2022 at 4:00 PM #47940

    Michael Shapiro
    Participant

    Is there a way to automate Tapforms’ existing Export Records function? I’d love to be able to run a script that basically exports the current thing I’m looking at as an Excel file. (Ideally I’d love to have an automated “export, then publish to Google Sheets” kind of functionality, but at the moment I’d be happy just reducing the number of steps.)

    I’m an ignoramus of Javascript, though I can hack my way along by modifying others’ code. Same applies to AppleScript.

    Thanks in advance for any suggestions!

    Mike

    September 9, 2022 at 12:55 AM #47943

    Daniel Leu
    Participant

    Unfortunately, there is no API available for that, but I have a game plan!

    This is how I would approach this:
    1) create JSON object from current record
    2) convert JSON object to csv object. A quick google search provides several hits. I like Christian Landgren’s updated solution in https://stackoverflow.com/questions/8847766/how-to-convert-json-to-csv-format-and-store-in-a-variable)
    3) copy csv object to clipboard using Utils.copyTextToClipboard(csv_object)
    4) call AppleScript using custom URL script to finish up (see https://www.tapforms.com/forums/topic/automator-scripting-auto-folder-creation/#post-47673 for more about that topic). The AppleScript would take the content of the clipboard and save it in a file. It looks like you can upload the file to Google Drive as well.

    It should be possible to automate your export steps. But as you can see, there are a few challenges ahead. Good luck and have fun!

    September 9, 2022 at 7:14 PM #47947

    Michael Shapiro
    Participant

    I appreciate your outlining a solution! It’s a bit beyond my technical prowess slash time available for learning new things. Hopefully someone more impatient/skilled than I will implement all of this.

    M

Viewing 2 reply threads

You must be logged in to reply to this topic.