Send an email to various addresses

Hi Guys, I am a new customer of yours from Appsumo! i bought the full plan :)! i really believe in the potential of this app. I wanted to know if you can help me with my first stream?

  1. I would like every (1 minute) the app to check for new fields on a google sheet (tab 1)
  2. i would like it to later look for a field in (sheet 2), what it will look for will be the new value found in sheet 1.
  3. I would like it to send an email to the results found in step 2.

in a nutshell: a user leaves his data in a contact form (the important data will be city), his data is transmitted to google sheets, which checks in the data base (tab two) the companies in that city, subsequently (let’s say it finds 3 companies “this field may vary”) it sends an email to each company with the user’s data.

This is very interesting, and welcome to Activepieces!

I suggest the following:

  1. The first step in your flow is Google Sheets → New Row.
  2. The second step in your flow is Google Sheets → Find Rows. Then you’ll have to fill in the settings from the first step in this one.
  3. The third step is a Loop, you will give it the array of results found by Step 2.
  4. In the Loop, you’ll send an email for each of these results. Maybe using Gmail or SendGrid.

If you get stuck while setting this up, let me know.

1 Like

Hi, thanks for your reply, I’ll try later and update you. just one more question, the range of results is variable, they can be 2,6,10. change something? it would be enough for me to also send an email with a blind copy to all the other results! Could this be feasible, rather than sending one at a time? Thank you

Hi Asgrafsam, could you be more specific here: The third step is a Loop, you will provide it with the set of results found from step 2.
In the Loop, you will send an email for each of these results. Perhaps using Gmail or SendGrid.

I look forward to your feedback on my previous answer.

Thank you for your support.

@ashrafsam waiting for your reply! thank you

Hi @Giovanny_Giraldo Did you try to follow the steps? I described the steps one by one and you follow them maybe you can ask me a more specific question to better help you!

@ashrafsam Hi, I followed yours up to the second. the loop could you explain it better? thanks
I’m also asking if you can answer this: just one more question, the range of results is variable, they can be 2,6,10. change something? it would be enough for me to also send an email with a blind copy to all the other results! Could this be feasible, rather than sending one at a time? Thank you

@Giovanny_Giraldo So the Loop is a piece that takes an array (collection) of items and perform an operation for each of these items.

If you got all the rows by the Find Rows action of Google Sheets, then you can add a Loop like this and select the Find Rows step as an input for it:

Now, add the Gmail step inside the Loop, and start filling its settings by using the Item data item like this:

Complete the pre-filled value with .values.COLUMN_LETTER like .values.B if the email address is under the second column in this case. Like this:

Follow this approach for the rest of your flow. I hope this helps!

@ashrafsam Hi, thanks for the short guide, it certainly helped me to understand it better. i followed step by step but when i do the test i get this error.

{
  "response": {
    "status": 400,
    "body": {
      "error": {
        "code": 400,
        "message": "Recipient address required",
        "errors": [
          {
            "message": "Recipient address required",
            "domain": "global",
            "reason": "invalidArgument"
          }
        ],
        "status": "INVALID_ARGUMENT"
      }
    }
  },
  "request": {
    "body": {
      "raw": "Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvYWx0ZXJuYXRpdmU7DQogYm91bmRhcnk9Ii0tX05tUC01MjgzYzMxMjIwYmY5YTRlLVBhcnRfMSINCkZyb206ICJNZXhhZ3VhLmNvbSIgPG1leGFndWEuY29tLmluZm9AZ21haWwuY29tPg0KU3ViamVjdDogPT9VVEYtOD9CP1VISmxjM1Z3ZFdWemRHL0NvSE5sY25acFkybHZJQzBnVFdWNFlXZDFZUzVqYjIwPT89DQpNZXNzYWdlLUlEOiA8MTQ4ZDY1ZWUtY2M4OC05NjM4LTIyZmQtNTY3MWE4YTI5ODFiQGdtYWlsLmNvbT4NCkRhdGU6IFRodSwgMTQgU2VwIDIwMjMgMDY6Mzg6NTkgKzAwMDANCk1JTUUtVmVyc2lvbjogMS4wDQoNCi0tLS1fTm1QLTUyODNjMzEyMjBiZjlhNGUtUGFydF8xDQpDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9dXRmLTgNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IHF1b3RlZC1wcmludGFibGUNCg0KPUMyPUExU2FsdWRvcyE8YnI-U29tb3MgTWV4YWd1YS5jb20sIHN1IGFsaWFkbyBjb25maWFibGUgZW4gbGEgPQ0KYj1DMz1CQXNxdWVkYSBkZSBzZXJ2aWNpb3MgZGUgc3VtaW5pc3RybyBkZSBhZ3VhIGVuIHBpcGFzIGVuIE09QzM9QTl4aWNvLj0NCjxicj5Ob3MgY29tcGxhY2VyPUMzPUFEYSBjb25lY3Rhcm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VzdGFkbyBkZSBNPUMzPUE5eGljbzwvcD4KPHA-UXVpZXJvIHZlciBsYSBwb3NpYmlsaWRhZCBkZSBxdWUgbWUgc3VydGFuIHBpcGFzIGRlIGFndWEgcGFyYSBlbCA9DQpzaWd1aWVudGUgZG9taWNpbGlvOiBMdC4gNCwgQm9zcXVlIGRlIE1hbGluYWxjbywgQ2x1YiBkZSBHb2xmLCBFZG8uIGRlID0NCk1leGljby4KPC9wPgoKPHA-QXRlbnRhbWVudGU8L3A-CjxwPkVsIHRlYW0gZGUgTWV4YWd1YS49DQpjb208L3A-DQotLS0tX05tUC01MjgzYzMxMjIwYmY5YTRlLVBhcnRfMS0tDQo="
    }
  }
}

@ashrafsam , I found the error, maybe it can help someone. During creation i moved steps several times, when i was calling that step and field, he did not find it. see screenshot. I redid everything from the beginning and it works. (and the steps are also correct). thanks for your assistance.

Thanks for the update @Giovanny_Giraldo

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.