web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Automaçaõ de uma deter...
Power Automate
Suggested Answer

Automaçaõ de uma determinada rotina num ERP

(0) ShareShare
ReportReport
Posted on by
Prezados,
 
Estou precisando de ajuda para melhorar um fluxo já gravado de uma rotina de leitura de um arquivo de contagem de estoque formato .txt no ERP Shop Control 9. Questões: O ERP abre popups, telas de mensagens, avisos de forma aleatória, preciso que a cada passo o power automate valide se esta na tela certa, feche os popups e demais possiveis telas fora do fluxo. Há uma pasta recebendo arquivos .txt da nuvem essa pasta precisa ser monitorada e virar o gatilho da ação, entrou um arquivo ele precisa ser lido, se tiver entrar mais de um arquivo, devem ser lidos por ordem de chegada (os arquivos tem data, hora, com segundos), dentro do fluxo ha um momento que um campo .txt deve ser preenchido dentro do fluxo, trata-se do nome da contagem que esta sendo lida, para isso vamos utilizar o nome do proprio arquivo .txt que esta sendo lido. Ao ser lido o arquivo deve ser movido para uma pasta determinada, tipo: processados.
I have the same question (0)
  • Suggested answer
    Assisted by AI
    manuelstgomes Profile Picture
    6,643 on at
     
    Vou tentar ajudar mas em Inglês porque assim podemos ajudar mais pessoas. 

    Recomendo-lhe postar em Inglês porque somos poucos aqui a falar Português 😃
     
    I think you're using Power Automate Desktop right? Don't have much experience with that ERP and PAD but try this, but here are a few directions that might help.
     
    • For the folder: PAD doesn't really watch a folder on its own as far as I know, so you'd probably trigger it from a scheduled run or from a separate flow. Since your file names include date and time, sorting by name should roughly give you the arrival order.
    • For the count name: when you read each file, you should be able to reuse the file name (without the extension) to fill that field.
    • For the random popups: this is usually the tricky part. The general idea that tends to help is checking you're on the expected screen before each step, and having a small routine that closes any unexpected windows, combined with some error handling so a stray popup doesn't break the run.
    • For moving the file: once it's been read successfully, a move into your "processados" folder should do it, ideally only after success so nothing gets lost.
    That's just the general direction. Hopefully someone with more hands-on time in that ERP and PAD experience can fill in the specifics. 
     
    I'll be happy to learn as well if this isn't the correct answer 😃
     
    Abraço!
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    This is a good use case for Power Automate Desktop (PAD) combined with a Cloud Flow (or PAD file watcher). The key is to make the automation queue-based, resilient, and state-aware, rather than relying solely on UI automation.
     
    Best approach: 
    • Process one file at a time to avoid conflicts in the ERP.
    • Move files to a Processing folder before starting to prevent duplicate processing.
    • Validate the active ERP window and required controls before every interaction.
    • Create a reusable popup handler subflow that closes or responds to unexpected dialogs.
    • Add structured logging and screenshots for troubleshooting.
    • Implement retries for temporary UI failures, but move unrecoverable files to an Error folder so the queue continues processing.
    • Avoid relying on fixed delays; use "Wait for window", "Wait for UI element", and "Wait until process completes" actions wherever possible.
    This design provides a robust and maintainable automation that can reliably process stock-count files in sequence, recover from unexpected ERP pop-ups, and ensure no files are lost or processed twice.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard