Add a File Input block
Research paper PDF
.pdf
no
Add a select input to choose the persona
Persona
Sales
, Marketing
, Product
, and Engineering
.persona
. You use this variable name in the blueprint when asking the text generation block to generate a summary for the selected persona.Add a button to start the summarization process
Summarize
Add a message block to indicate that the file is in progress
@{status}
. This will display the status message from the agent’s state. You use this variable name in the blueprint to update the status message in the UI.Add a text block to display the results
@{summary}
. This will display the summary results from the agent’s state. You use this name in the blueprint to display the summary results in the UI.yes
Add a UI trigger for file input
File upload
. This is optional, but helps to identify the trigger in the blueprint.File Input
component from the dropdown of UI blockswf-file-change
Add a block to add files to Writer Cloud
@{payload}
. This references the payload provided by the preceding UI trigger. The payload contains the file that was uploaded to the file input block.Add the uploaded file information to the state
file_info
state variable. This is the information about the uploaded file, specifically the id
of the file in Writer Cloud, that will be used in the next blueprint.In the block’s configuration panel, update the following fields:file_info
text
@{result}
. This references the result
from the previous block, which is the information about the uploaded file.Add a new blueprint
Add a UI trigger for the button to start summarizing
Start summary
(optional, to make the trigger easier to identify)Summarize
button component from the dropdown of UI blockswf-click
Update the status message
status
text
%Summarizing...
. The %
symbol creates an animated spinning icon when the message appears in the UI.Add a block to parse the uploaded PDF file
@{file_info.0.id}
. This references the file_info
state variable you defined in the first blueprint and specifically access the id
of the uploaded file.file_info
state variable is an array of objects, containing one object with information from the Add files to Writer Cloud block. You can see the values of state variables by clicking the State Explorer (<>
) icon at the top of the canvas. Learn more about nested state variables.Add a block to generate a summary of the parsed file
Provide a one-paragraph summary and a list of the three most important takeaways from this research paper: @{result}. Provide the summary for the user persona @{persona}.
@{result}
references the result
from the previous block, which is the parsed PDF file.@{persona}
references the persona
state variable you defined in the UI.Palmyra X5
Add the summary results to the state
summary
state variable.In the block’s configuration panel, update the following fields:summary
text
@{result}
. This references the result
from the previous block, which is the summary of the parsed PDF file.Clear the status message from the state
status
text
%Summarizing...
and the summary results appear in the text block.