The action Summarize file with AI

Modified on Fri, 15 Aug at 9:27 AM

Purpose  

This action uses a third‑party AI model (Google Gemini or OpenAI) to produce a concise text summary of the current document. The result is plain text and becomes the action output so it can be used by following steps (save to file, attach to email, feed to CRM/ERP, further AI processing, etc.).
Note: The AI functions are sending your data outside of the local computer it is installed. Other functions are working locally.


Where to add  

Insert this action into any scenario that receives documents (PDF, Office files, images, emails, HTML, plain text, etc.) and where you want a short machine-generated summary.




Required settings — quick steps

  1. Select the AI model
    Choose between the available providers and models (Google‑Gemini family or OpenAI models) from the AI model dropdown. Pick the model that best fits your needs for cost, latency and quality.
  2. Enter your API key
    Paste the API key for the selected provider into the Api key field. You must have an account with the chosen AI provider and appropriate API access enabled. By default it will save your key to the global settings of Rofiles (section advanced).
    Note: Get your Google Gemini API key here >, or your OpenAI key here >
  3. Adjust the prompt
    Edit the prompt text that will be sent to the AI. Use a clear instruction style prompt (for example: “You are a professional document summarization specialist. Summarize the given document in 50 words or less.”).
    - You can insert fields from the document (use Insert fields to add dynamic values).


That’s all — run the scenario. The action will submit the document content to the selected AI model and return a text summary as the action result.


Supported input formats

- Depending on the provider and model, the action can be applied to many file types (PDF, DOCX, XLSX, PPTX, TXT, HTML, EML/MSG, common image formats) provided the file is readable by the system.  


Output  

  • The AI produces a plain-text summary. This text is the action output and may be:
    - Saved to disk
    - Sent by email
    - Passed to downstream actions (Save to, Convert to image/PDF, AI translation, CRM upload, etc.)


Privacy and data transmission

  • The action sends document data to the selected third‑party AI service for processing. Data analysis occurs remotely on the provider’s servers, not locally. Ensure this is acceptable for the data you process and comply with organizational policies and regulations.


Best practices and tips

  • Prompt design: be explicit about length, style and focus (e.g., “Summarize in 30 words focused on key invoice totals and dates”). Short, specific prompts reduce undesired output.  
  • Model selection: pick a model that balances quality and cost; test a few models to determine the best choice for your documents.  
  • Token/size limits: be aware of model input size limits. For very large documents, pre‑process (extract important sections, or use Extract Text + chunking) before sending to the AI.  
  • Testing: run tests on representative documents and review summaries for accuracy before automating.  
  • Error handling: configure scenario behavior for AI failures. Monitor rate limits and API quota to avoid unexpected failures.


Troubleshooting

  • Authentication errors: verify the API key is valid and has required permissions (model enable for OpenAI).  
  • Timeouts or failures: check network connectivity, API quota/limits, and that the correct model was selected.  
  • Poor summaries: refine the prompt, provide examples in the prompt, or try a different model.


Example prompt

- “You are a document summarization specialist. Summarize the following document in 50 words or less, focusing on action items, dates and monetary amounts.”



This action provides a simple, flexible way to generate concise text summaries automatically, just select model, enter your API key, set the prompt, and the action returns a text summary ready for next step.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article