Rey
Member
- Your Workflow URL
- https://connect.pabbly.com/task/history?filter_status=applied&filter_by_workflow_id=IjU3NjYwNTY1MDYzMTA0MzU1MjY1NTUzMzUxMzMi_pc
- Your Task History ID
- https://connect.pabbly.com/task/history?filter_status=applied&filter_by_workflow_id=IjU3NjYwNTY1MDYzMTA0MzU1MjY1NTUzMzUxMzMi_pc#
- Consent to Access & Modify
- I authorize Pabbly Support to log in to my account and make changes to the specified workflow for troubleshooting.
Pabbly Text Formatter not working correctly to clean up \n from a Google Doc.
Here's the workflow:
Trigger:
After this, I will add an workflow step that emails this report.
Here's the workflow:
Workflow Summary: Google Doc AI Formatter
Objective: Automatically reformat new Google Docs from a "wall of text" into professionally structured reports using AI.Trigger:
- Google Drive: New File in Specific Folder
- Initiates the workflow when a new document is added to a monitored folder.
- Google Drive: Get File Content
- Action: Extracts raw, unformatted plain text from the triggered Google Doc.
- Output: Text string containing native newline characters (\n).
- Text Formatter: Replace Text
- Action: Finds all newline characters (input via Enter key in UI) and replaces them with a single space.
- Purpose: Converts the text into a continuous block, removing artificial line breaks to optimize it for AI processing.
- OpenAI: Create Conversation (Completion)
- Action: Sends the preprocessed text to the GPT-4 API with a strict system prompt.
- Prompt Instructions: Command the AI to act as an editor—preserving all original content exactly while adding logical structure (H1, H2, bullet lists, paragraphs). Output must be valid HTML.
- Output: Returns a JSON response containing the reformatted text as clean HTML.
- Google Docs: Create Document From Text
- Action: Takes the HTML output from the OpenAI step.
- Configuration: Content Type is set to "HTML".
- Result: Creates a new Google Doc where the HTML tags are automatically rendered into native Google Docs styles (Headings, lists, etc.).
After this, I will add an workflow step that emails this report.