Render Image Skill
Overview
Use the Render Image skill when your agent should generate a new image from a written description. The skill creates a PNG image that can be reused immediately in downstream steps, especially when you want to add the image to a Salesforce record or place it inside a PDF.
This skill is best for single generated visuals such as illustrations, icons, concept images, and cover graphics.
Who This Is For
Salesforce admins, operations teams, service teams, enablement teams, and solution architects who are extending custom agents with business-ready visual output.
What The Skill Can Create
- Business illustrations
- Cover images for reports or summaries
- Product or process concept images
- Simple icons and branded-style graphics
- PNG files that can be attached directly to Salesforce records
Best Use Cases
- Add a visual cover image to a PDF report
- Generate a simple illustration for a knowledge article workflow
- Attach a generated image directly to a Case, Account, or Opportunity
- Create a reusable PNG asset for a customer-facing or internal document
- Produce a lightweight concept image for a sales or support workflow
What The Skill Needs
Render Image works best when the agent has:
- a clear visual description
- guidance about the subject or scene
- direction about whether the background should be standard or transparent
- a decision about whether the PNG should be attached directly to the current record
This is important: the prompt should describe the image itself. It should not mix in unrelated workflow instructions.
Pairing With Generate PDF
Render Image becomes especially useful when paired with Generate PDF:
- The agent generates the image first.
- The agent reads the image result and uses the returned signed image URL.
- The agent creates the report layout.
- The agent calls
generate_pdfand places the image into the final document.
This is a strong pattern for:
- cover pages
- executive summaries
- customer handoff documents
- branded one-page reports
- training or enablement packets
Attach The Image Directly To A Record
You do not always need a PDF.
If the user wants the PNG file itself saved on the current Salesforce record, instruct the agent to call render_image and attach the image directly to the record.
This is useful when:
- a support team wants a generated illustration attached to a Case
- a sales team wants a concept image stored on an Opportunity
- an admin wants the PNG available in Salesforce Files for later reuse
In plain language, ask for something like:
Create the image and attach the PNG file directly to this Salesforce record.
Make Image PDFs Fit The Page
Render Image outputs a PNG image. That works well in PDFs, but the agent should still lay the image out correctly in the HTML it sends to Generate PDF.
For image-based reports, tell the agent to:
- use HTML rather than Markdown
- keep page margins fairly narrow
- make the image span the available content width
- keep the image height automatic so it scales cleanly
In plain language, ask for something like:
Create the PDF in HTML. Use page margins of about half an inch. Make the image use the full content width and keep the height automatic.
Admin Setup Checklist
- Add the
render_imageskill to the agent. - Add
generate_pdfif the image will be used in downloadable reports. - Tell the agent when it should generate an image instead of answering in text.
- Tell the agent whether it should attach the PNG directly to the current Salesforce record when requested.
- Keep v1 instructions simple and focused on one image at a time.
Prompt Guidance Snippets
Use snippets like these in your custom agent system prompt.
General Image Guidance
When the user asks for a generated image, call render_image.
Use a clear visual prompt, generate a PNG, and return the image artifact instead of answering only in prose.
Use attachToRecord=false unless the user wants the PNG saved directly to the current Salesforce record.
Image + PDF Report
When the user asks for a PDF that should include a generated image, first call render_image.
Then call generate_pdf and embed the returned image URL in the final HTML report.
Create the PDF in HTML with page margins of about half an inch.
Make the image fill the available content width and keep its height automatic.
Direct Image Attachment
When the user wants the generated PNG file itself saved on the current Salesforce record, call render_image and attach the file directly to the record.
Do not wrap it in a PDF unless the user also asks for a downloadable report.
Example Agent Behaviors
Example: Case Runbook Cover Image
User request:
Create a simple support runbook cover image and attach it to this Case.
Good agent behavior:
- call
render_image - generate a business-appropriate PNG
- attach the PNG directly to the current Case
Example: Report Illustration
User request:
Create an illustration for a customer summary report, then generate the PDF.
Good agent behavior:
- call
render_imagefirst - use the returned image URL in the report layout
- call
generate_pdffor the final downloadable report
Tips For Better Results
- Describe the subject, style, and setting clearly.
- Ask for one image at a time in v1.
- Use a transparent background only when you really need a reusable overlay-style asset.
- Ask for a PDF only when the image needs narrative context or packaging.
- Ask for direct record attachment when the PNG itself should live in Salesforce Files.
Troubleshooting
- The agent answered in prose instead of creating an image: add stronger prompt guidance telling it to call
render_image. - The image was generated but not attached: update the prompt so the agent sets direct record attachment when requested.
- The image is not in the final PDF: update the prompt so the agent calls
generate_pdfafterrender_imageand uses the returned image URL. - The result is too vague: make the image request more specific and describe the scene or subject more clearly.