Salesforce AI + Flow: Ask Questions About Any Document via Quick Action


In the age of AI-powered productivity, Salesforce Prompt Templates open up powerful ways to interact with unstructured content like documents. Imagine being able to ask questions about a contract, resume, or policy document—right from a record page—and get instant answers using generative AI. In this blog, I’ll walk you through how to build a Prompt Template, wire it up using Flow, and expose it through a Quick Action, creating a seamless and intelligent experience for end users.
Step 1:
Create a flex prompt template and define 2 sources
Free text
File object
3. Select appropriate LLM model that accepts pdf and images
4. Provide you prompt
Step 2:
Create a flow
Screen flow if you want to launch it from say custom button
Auto launched flow if you want to use it as an agent action
Here we will go through Screen flow and launch it from a quick action button
Once screen flow is created
- Create 2 variables for flow
1. Question(Text type and available for input)
2. Result(This will be available for output)
Now keep on adding elements as shown below
Step 3:
Create an Action button on your object you want to place this flow on:
Step 4: Hurray!! 😊you are done with all configurations and its time to test it out
Go on you object record and launch it
Click Next!
Subscribe to my newsletter
Read articles from Varshit Yadav directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
