Multiline input rows to database

Hello,

I’d suggest using a regex to turn the multiline input into a list of values. You can then call a scheduled api workflow on a list to write each of the list values into your database.

You can do that as follows:

  1. Create a multiline input with a button

  1. Turn on Workflow API and backend workflows in SettingsAPI.

  1. Create a backend workflow where you take in a key which represents the data you want to write to the database
  • In example case the key is called new_input and it’s text
  • The backend workflow iterates on each item in your list

  1. Create an action in that workflow where you write the value in step #3 into the database
  • In this example, we’re creating a new Input thing and setting the field Value to the new_input in step #3

  1. Create a workflow for the button in step #1 that calls the backend workflow. You can turn the multiline input’s value into a list by using the regex [^\n][^\n]*[^\n]* which separates values by a line break. You can use a different regex to separate based on commas or any other character you like.

Hope this helps!

4 Likes