Save Document to Table Block

Save documents to tables within Scout collections

The Save Document to Table block enables users to store structured documents within a specified table in a Scout collection. This block is essential for workflows that require saving data securely and efficiently, with support for dynamic content through Jinja templating.

Configuration (Required)

Collection
stringRequired

The collection to save the document to. Ensure that the collection ID is correct to avoid saving data to the wrong collection.

Table
stringRequired

The table to save to. Ensure that the table ID is correct and exists within the desired Scout collection.

Values
list

A list of values to be saved in the table. This field supports Jinja templating, allowing for dynamic content generation. The default is an empty list.

See Workflow Logic & State > State Management for details on using dynamic variables in this block.

Outputs

The block outputs the response from the collection service after saving the document, formatted as a JSON object. This response confirms the successful storage of the document and provides any relevant feedback from the service.

Usage Context

Use this block to store structured data into specific tables within Scout collections. It is particularly useful for applications requiring dynamic content generation and storage.

Best Practices

  • Ensure the collection and table IDs are correct and exist within the desired Scout collection to prevent data from being saved to the wrong location.
  • Use Jinja templating in the ‘fields’ input to dynamically construct values based on the current workflow state.
  • Validate that the data types in ‘fields’ match the expected schema of the target table to avoid errors.
  • Check the response from the collection service to ensure that the document was saved successfully.
Built with