Hello. I’m fairly new to all of this so please be gentle!
I’m trying to accomplish the following… I don’t even know if it is possible, but figured it was worth an ask.
I’m looking to use Gravity Forms for an end-user to submit a product stock check form. I will send this via Webhook into Microsoft Power Automate and use it to update a Google Sheet.
The query I have…
In my products google sheet, I have a number of products, all with a unique reference number in one of the columns. This reference number means nothing to the staff that will be submitting the form.
In gravity forms, I would like the end user to see the product and be able to enter the stock quantity.
RED PENS = 5
But when the form is submitted, I need the webhook data to have multiple values, including the unique reference number.
(I’m guessing this is an array?)
My power automate flow would then connect to the google sheet, find the matching row (based on the ID) and update the current stock value (based on qty).
I’m alright with Power Automate, but hitting a roadblock trying to see how Gravity can do this.
Or if anyone has any other suggestions, they would be most appreciated!
Hi there, I saw you mentioned Power Automate. I wrote the Power Automate plugin for Gravity Forms and even though you aren’t using it, I figured I could help.
Could you provide a dropdown for the user to select the product and have Gravity Forms send the ID as the value for that form field instead of the words the user selected?
Ultimately what you have is a mapping problem.
The Google Sheets datasource holds information on the product name and the product id. That mapped data needs to be present in Gravity Forms as well, or at the very least, inside your Power Automate flow. So the real question here is “What datasource is responsible for knowing the relationship between ID and NAME?”
If you want to keep it so that Google Sheets is the ultimate source of truth, then you somehow would need to sync updates from that sheet to updates to the option values for your Gravity Forms form. There are ways to do this, but without some research I couldn’t tell you the best option. This is one of the targeted areas for us in the Power Automate plugin, so if we get enough interest we’ll build it in there directly.
Anyway, I hope this helps I like to help with all things Gravity Forms and Power Automate.
You could use GP Google Sheets and GP Populate Anything to populate a Drop Down in the form directly form the sheet. Basically, you would populate the name of the product as the choice’s label and then the reference number as the choice’s value.
You could then pass that value to Power Automate and to Google Sheets. I should also mention that if the sole reason you’re using Power Automate is to pass values from Gravity Forms to Google Sheets, you could skip that step and use GP Google Sheets to send those values.
Hey @user5d5bfcdbc979f965 and @scott-the-sorceror
Many thanks for your replies. Sorry for the delayed reply.
I’m not sure a drop-down will work… basically there will be a long list of products - somewhere between 50-80 (it’s for a bar).
In my head (whilst I know it may not be possible!, haha) I envisaged a list of single line text boxes (split into columns) with the normal label set to the product name, the admin label set to a unique reference number, and then the qty of stock on the shelves would be inputted by the staff.
I managed to get some code for the admin label to be passed via the webhook action instead of the main label… but I’d like to have a single source for new products to be added (the form).
So once the form is submitted, the data is handed off to Google Sheets, and a flow will match up the unique reference number (in a column) and replace the current stock value (in another column).
Am I making it over complicated? Is there a better way I should be looking at this? Or is it just not possible?
Really appreciate your thoughts.
EDIT: Probably worth noting, the reason why I’ve got it going into Google Sheets is because I’ve couple of different scripts running on it which checks through the data and compares it to an acceptable range and produces an out of stock report which it compiles into a CSV and emails.
One approach that could work is using GP Nested Forms. Basically, you’d set up a child form that has the drop down that’s populated via Populate Anything and a text field for entering the number. You could use GP Advanced Select to make the drop down searchable.
The parent form would contain all the order details, and the child entries would contain the individual items ordered.
Hi Scott. Many thanks, I’ll have a play around with this and see if I can get something working.
Just with your comment about making the drop-down searchable… so I envisage basically a big list of fields for example:
Each product will have a unique reference (stored in Google Sheets).
So with this method… would all the products be listed on one page, or would the user need to cycle through? And would I still send these off into Power Automate via Webhook in order to populate back to Google Sheets?
Excuse the naivety, I’ve not used nested Forms or Populate Anything before, so trying to work out how it would work. I’ll get them and have a play…!
Each product would have a unique reference, yes. You’d populate the product name as the choice label and the reference number as the choice value. The drop down would behave the same as the one we have on the GP Advanced Select demo, where it is either clickable to make a selection or the user can search within to make a selection.
The idea would be that each nested form entry would be separate, but in the Nested Form Field they would see an itemized list of the selections made.
Regarding sending the order to Google Sheets, you could use GP Google Sheets to handle this and skip Power Automate altogether. Unless you’re specifically using Power Automate to also send the form entry to another system, it isn’t needed to send entries to Google Sheets.
If you have questions while building the form, feel free to reach out to our support team. They’re happy to help answer any questions and offer guidance.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.