I want to know what the name and email are in here. When I pass data to make’s webhook, all the data is gathered into the value section,I have tried passing data into 3 different variables but only the value of the value variable is received and the value of the remaining 2 variables is not received. Can anyone help me? I want to get the email value I sent. send to the webhook to fill in make’s email sending section, so that when the order is successful, Make will automatically send a message to the gmail account that placed the order
Try using this
$webhookUrl = ‘https://hook.eu2.make.com/ciufk6mbqfxx25pgziotc6mp94pp360u’;
$data = [
‘order_id’ => $order->id,
‘user_email’ => $user->email,
‘total_price’ => $order->total_price,
‘estimated_delivery_time’ => $order->estimated_delivery_time,
‘shipping_fee’ => $order->shipping_fee,
‘email’ => $user->email, // Adding email to the main data array
‘name’ => $user->name // Adding name to the main data array
];
$client = new \GuzzleHttp\Client();
$response = $client->post($webhookUrl, [
‘json’ => $data // Sending data as JSON payload
]);
Make sure to redetermine data structure in webhook to ensure everything is sent over correctly
Let me know if this helps!
Thank you for your method, I tried it but all the data is poured into the value value, the name and email values are still empty.Is there any way I can get the value of the email I send to Make’s webhook separately?
Why don’t you just use a parse JSON module and parse the data.
For example I just put the data you showed in the screenshot into a parse JSON module:
oh I just used Make so there are some things I don’t understand, thank you for guiding me, I will try, thank you very much if I have any questions I will ask, thank you again
Welcome to the Make community!
You can do that by setting the Webhook “JSON Pass-through” to YES (it is “No” by default), when creating or editing a webhook.
Then, you will be able to map the entire JSON body payload in another module.
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
@Hoang_Minh_Quan can you mark my answer as solution. Since you used it also trying to get my solutions up an play a role in community here.
Thank you!
No problem, glad I could help!
1. If anyone has a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
- others can save time when catching up with the latest activity here, and
- allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!
4. Do join the unofficial Make Discord server for live chat and video assistance
samliew – request private consultation
Join the Make Fans Discord server to chat with other makers!
Of course, thank you for your enthusiastic help