Issue with Field Mapping in Make - Need Help*

Hi everyone,

I’m facing an issue with sending emails through a webhook in Make (formerly Integromat) that is integrated with a Streamlit application. I’ve set up the fields To, Subject, and Content in the Email module in Make, mapping them to the data sent from my Streamlit app.

However, the emails I receive are empty; the subject and content are not being populated. Here’s what I’ve tried so far:

  1. Verified Data Being Sent: I used st.write() in Streamlit to check the data being sent to the webhook, and it appears to be correct.
  2. Tested with Fixed Values: I disabled dynamic mapping and entered fixed values directly in Make, which worked fine. But when I switch back to dynamic mapping, the emails are empty.
  3. Checked Make Scenario Configuration: I’ve double-checked the mappings multiple times, but the issue persists.

I’m running out of ideas and wondering if anyone else has encountered this issue or has suggestions on how to resolve it. Any help would be greatly appreciated!

Thanks in advance for your advice!

import streamlit as st
import requests

# My webhook URL from Make
WEBHOOK_URL = 'https://hook.eu2.make.com/your-webhook-url'

def send_message():
    st.title("Send an Email via Webhook")
    
    recipient = st.text_input("Recipient")
    subject = st.text_input("Subject")
    content = st.text_area("Content")
    
    if st.button("Send"):
        if not recipient or not subject or not content:
            st.error("All fields must be filled in!")
            return

        # Data to be sent to the webhook
        data = {
            "to": recipient,
            "subject": subject,
            "text": content
        }
        
        st.write(data)  # Display the data being sent for verification

        response = requests.post(WEBHOOK_URL, json=data)
        
        if response.status_code == 200:
            st.success("Message sent successfully!")
        else:
            st.error(f"Error sending the message: {response.text}")

if __name__ == "__main__":
    send_message()

Welcome to the Make community!

To allow others to assist you with your scenario, please provide the following:

1. Relevant Screenshots

Please share screenshots of your scenario, any error messages, relevant module fields, and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:

2. Scenario Blueprint

Please export the scenario blueprint file to allow others to view the mapped variables in the module fields. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

3. Output Bundles of Modules

Please provide the output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.

A. Upload as Text File

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

B. Insert as Formatted Code Block

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles.
These are the two ways to format text so that it won’t be modified by the forum:

  • Method 1: Type code block manually

    Add three backticks ``` before and after the content/bundle, like this:

    ```
    content goes here
    ```

  • Method 2. Highlight and click the format button in the editor

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

Thank you for your previous suggestions, but I’m afraid I’m still encountering issues and it’s becoming quite frustrating. I’ve tried implementing the changes as advised, but the problem persists.

Here’s what’s happening:

  1. I’m still getting a “BundleValidationError” with the message “Missing value of required parameter ‘to’.”
  2. What’s really puzzling is that the data size shows as 0 when it reaches Make.

I must admit, I’m struggling to understand exactly how this is supposed to work. We’ve tried different data structures and checked configurations, but we seem to be missing something crucial.

Some specific concerns:

  1. Why are the data empty when they reach Make?
  2. Could there be a webhook configuration issue that we’re overlooking?
  3. How can I effectively debug this when I can’t see the data in transit?

I’ve attached a screenshot of the error message for reference.

I’m open to any suggestions or directions you might have. Perhaps there’s a configuration or testing step we haven’t tried yet?

Thank you in advance for your continued help and patience. I’m really hoping we can resolve this issue soon.

Best regards,

P.S. I’ve noticed something peculiar: When I use the JSON blueprint file and manually add the email, subject, and content, it works fine. However, when I try to do the same thing through my Streamlit interface, it fails. This makes me think there might be an issue with how the data is being sent from Streamlit to Make. Any insights on this would be greatly appreciated.

import streamlit as st
import requests
import json

WEBHOOK_URL = ''

def envoyer_message():
    st.title("Envoyer un Email via Webhook")
    
    destinataire = st.text_input("Destinataire (Email address)")
    sujet = st.text_input("Sujet (Subject)")
    contenu = st.text_area("Contenu (Text)")
    
    if st.button("Envoyer"):
        if not destinataire or not sujet or not contenu:
            st.error("Tous les champs doivent être remplis!")
            return
        
        data = {
            "from": {
                "address": destinataire
            },
            "subject": sujet,
            "text": contenu
        }
        
        st.write("Données envoyées au webhook:", json.dumps(data, indent=2))
        
        try:
            response = requests.post(WEBHOOK_URL, json=data)
            st.write("Code de statut de la réponse:", response.status_code)
            st.write("Contenu de la réponse:", response.text)
            
            if response.status_code == 200:
                st.success("Message envoyé avec succès!")
            else:
                st.error(f"Erreur lors de l'envoi. Code de statut: {response.status_code}")
        except requests.exceptions.RequestException as e:
            st.error(f"Erreur de requête: {str(e)}")

if __name__ == "__main__":
    envoyer_message()

blueprint.json (10.2 KB)

I’ve tried sending the data using curl, but I keep getting the same error message indicating that the required parameters Email, Subject, and Content are missing. Here’s the exact error message I’m receiving:

>> Missing value of required parameter 'Email'.
>> Missing value of required parameter 'Subject'.
>> Missing value of required parameter 'Content'.

I used the following command to send the request:

curl -X POST "https://hook.eu2.make.com/xxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"Email": "test@example.com", "Subject": "Test Subject", "Content": "Test Content"}'

Despite this, the Webhook still seems to not recognize or receive the values correctly. Could you help me understand what might be going wrong?

Just found a solution, just dont use Json format lol

import streamlit as st
import requests

# URL du webhook Make
MAKE_WEBHOOK_URL = 'https://hook.eu2.make.com/XXXXXXXXXXXX'

def envoyer_email():
    st.title("Envoyer un Email via Make")

    # Champs pour entrer les informations
    email = st.text_input("Email (destinataire)")
    subject = st.text_input("Sujet")
    content = st.text_area("Contenu")

    if st.button("Envoyer"):
        # Créer le payload à envoyer à Make au format application/x-www-form-urlencoded
        data = {
            "Email": email,
            "subject": subject,
            "content": content
        }

        # Affichage des données pour vérifier avant l'envoi
        st.write(f"Payload envoyé: {data}")

        # Envoyer la requête POST à Make en format form-url-encoded
        response = requests.post(MAKE_WEBHOOK_URL, data=data)

        # Vérification de la réponse
        if response.status_code == 200:
            st.success("Message envoyé avec succès!")
        else:
            st.error(f"Erreur lors de l'envoi: {response.text}")

if __name__ == "__main__":
    envoyer_email()

1 Like