Automatically enriches Flatfile data by performing text summarization and key phrase extraction on specified text fields using natural language processing.
summarize
function accepts a configuration object with the following parameters:
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
sheetSlug | string | Yes | - | The slug of the sheet that the plugin should operate on |
contentField | string | Yes | - | The API key of the field that contains the source text to be summarized |
summaryField | string | Yes | - | The API key of the field where the generated summary should be stored |
keyPhrasesField | string | Yes | - | The API key of the field where the extracted key phrases (as a comma-separated string) should be stored |
summaryLength | number | No | 2 | An optional integer specifying the number of sentences the final summary should contain. This is overridden if summaryPercentage is also set |
summaryPercentage | number | No | - | An optional number specifying the desired summary length as a percentage of the total sentences in the content. For example, a value of 30 would create a summary using 30% of the original sentences. This option takes precedence over summaryLength |
sheetSlug
in your configuration exactly matches the slug of your Sheet in FlatfilecontentField
, summaryField
, and keyPhrasesField
names are correct and that the contentField
actually contains textsummaryField
is empty for records you expect to be processed, as the plugin will not overwrite existing summariessummaryField
is empty; it will not overwrite existing data. If the source contentField
for a record is empty, the plugin will add an error to that field and skip processing for that record.
summaryField
already contains a value for a given record, that record will be skipped#Adjective? #Adjective? #Noun+
), which identifies phrases consisting of up to two optional adjectives followed by one or more nounscompromise
NLP library, and the quality of the output is determined by its capabilitiesstring
field typesrecord.addError()
. This provides direct feedback to the user in the Flatfile UI without halting the entire import process.