Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Duplicate worksheet and rename when new email is received

(0) ShareShare
ReportReport
Posted on by 11

Hello,

 

I'm trying to find a way to have an email (with a specific subject line) trigger Excel to duplicate a worksheet and rename it to the subject line of the email.

 

I've been able to set up the email trigger and the creation of a new sheet with the email subject name. I just don't know how to copy the items from my template worksheet into the newly made sheet while maintaining the formatting and row/column heights. Would having Power Automate run a script be easier than trying to automate this?

 

The template that I'm trying to copy is a Gantt Chart that isn't set up as a table. I'm hoping to keep making duplicates of it within the same workbook as the new emails arrive (if possible).

 

Thanks!

  • JAFTB Profile Picture
    11 on at
    Re: Duplicate worksheet and rename when new email is received

    This website is really cool! Thanks for the link. I'm sure it'll help with future script problems.

  • JAFTB Profile Picture
    11 on at
    Re: Duplicate worksheet and rename when new email is received

    Thank you! This worked for me.

  • efialttes Profile Picture
    14,756 on at
    Re: Duplicate worksheet and rename when new email is received

    Hi @JAFTB 
    So you already try to overcome your challenge with Office Scripts, right?
    If not, you will find promising stuff here 
    https://kokoroe.konomi.app/en/docs/office-scripts/worksheet/copy/
    Hope this helps
    ==========

  • Verified answer
    BCBuizer Profile Picture
    22,262 Super User 2025 Season 1 on at
    Re: Duplicate worksheet and rename when new email is received

    Hi @JAFTB ,

     

    What you may try is to use the "Get file content" action to get the contents of the original file and then create a new file using the output of that action for the File Content field:

     

    BCBuizer_0-1697062748622.png

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1