Dynamic Sheet Name Mapping in Google Sheets Action Causes Error

Your Task History ID
IjU3NjUwNTY5MDYzNjA0MzE1MjZlNTUzNDUxMzc1MTYxNTQzNTBmMzIi_pc
Hi Pabbly Team,

I'm facing an issue with dynamically selecting a tab in the Google Sheets module.

Use Case:
I have multiple tabs (Tab 1, Tab 2, etc.). A lookup in a master tab returns the tab name/number where the full data exists. I want to use this value dynamically in the next action (e.g., Lookup/Update Row).


Problem:
When I manually select a sheet name, it works. But when I map it dynamically from a previous step, Pabbly passes the Sheet ID or a wrong value—causing a 400/internal error. The mapped value doesn't match the actual tab name.


Question:
How can I dynamically set the "Sheet Name" field using a mapped tab name or number? Is there a way to make sure Pabbly sends the correct visible tab name?


Thanks for the support!
 
Last edited:

Preeti Paryani

Well-known member
Staff member
Hello @Aditya Gaikwad,

Thank you for sharing the details.

Upon checking your workflow, we noticed that you are mapping the sheet name in the Lookup action. Please note that when using dynamic mapping for the sheet selection, Pabbly requires the Sheet ID, not the visible sheet name.

To resolve this:
  • In your master sheet, along with the other details (like the tab name/number), also store the Sheet ID of the respective tab.
  • You can then dynamically map the Sheet ID in the action step instead of the tab name.
1745927272317.png


This approach ensures the correct sheet is selected dynamically and should prevent the 400/internal error you're encountering.
 
Top