Google Calendar - New Event

(Aj Loreto) #1

New Event Trigger then trying for bot to send message but its always invalid response path error.

(Daniel Beckett) #2

Hi,

It can be a bit confusing to get this one setup since you need to gather a response path before you can do anything.

The only way your bot gets a response path is by having a user talk to it. I’ve got a basic example of how this works where I have two flows:

Flow 1 - Register the User’s Response Path to Google Sheets

In this Flow I’ve got a New Message trigger for ‘Register’ that will record the user’s response path to a Google Sheet that I have setup.

Flow 2 - Message User on New Calendar Event

For the second Flow I have a trigger for New Event that pulls through the information on the Google Sheet and then sends a message to the user(s).

Hope that helps.:slightly_smiling_face:

If you’re still having trouble getting it to work feel free to email the support team - support@flowxo.com

Thanks,
Dan

(Aj Loreto) #3

Below is my flow… cannot find what to put in response path… do i need to create?

(Daniel Beckett) #4

You won’t have a response path to use unless a user talks with your bot. You’ll need another flow that triggers on a catch-all or new message and then records the response path to something like Google Sheets. In your calendar event flow you can then pull up the response path(s) and use it in the send a message action.

Edit: A new post has been added to the Flow XO Medium page about using Google Sheets. It’s definitely worth a read if you want more info on how you can use the service to capture a response path.

(Aj Loreto) #5

Thanks. This is great. Will try it out.

Another question. Can I set the multiple response path? Meaning I respond to multiple path but not like broadcast, chosen response paths. If yes, how? Just concatenate the response paths?

(Daniel Beckett) #6

If you use the Google Sheets method then each response path could be on a new row and you could send to all / a selection of those rows.

(Aj Loreto) #7

Will try that. Thanks.

By the way talking about google sheets, when I do get a row or list rows and try to access a specific column (any column except the first column) it is always empty. Is this a bug or I need to do something special?

(Karen Barker) #8

Hi there,

When you’re using the results of List Row you access the data using Collection Outputs, so you would need something like the following:
{{list_rows.results_+_gsx:columnName &}}

Where “list_rows.results” accesses the results of the google sheets action and “columnName” is the name of the specific column. The & gives a space separated list of all values in that column.

For Get a Row, this should be a little simpler as there is only 1 result. You’d just need to use something like:
{{get_a_row.gsx:time}}

If you click on the Flow XO icon at the right hand side of an input box then you’ll be able to choose from the result options available and these also show the column names.

If you’re still having problems with this, then please email in to support@flowxo.com and we’ll be happy to take a closer look. :thumbsup:

(Aj Loreto) #9

Hi Karen,

I have tried that and it is not working.It is only sending to the 1st
response path.

I also tried using ‘*’ instead of ‘&’ and it is also not working


(Daniel Beckett) #10

If you use && for the output it should format the response paths into a usable format. Please give that a try and let me know if it doesn’t work for you.

(John Jackson) #11

A response path field only takes a single response path unfortunately so using && won’t work here unfortunately.

(Aj Loreto) #12

Hi Daniel

Still having problem. The response path now has an ‘&’. But still only sending to the first response path only

(Aj Loreto) #13

Hi John,

Does that mean cannot send to a group of selected users?

(Daniel Beckett) #14

Sorry Aj, I didn’t give it too much thought regarding multiple response paths. :thinking:

If you want to be able to send to multiple users then the Broadcast service will need to be used. On your first Flow you’ll still have a trigger for new event on Google calendar but then it will make a http request to your broadcast trigger and pass along the event details.

If you create a broadcast trigger for receiving a webhook and then copy the URL to your calendar flow’s http request (Method=GET, Content Type = None) you can add the parameters on that you want to send across, for example, the following URL:

https://flowxo.com/hooks/b/9r8eqexp?title={{new_event.summary}}&start={{new_event.begins}}&end={{new_event.ends}}

In the above URL there is a ‘?’ which is a separator for your data string. To send the start time of the event for example I would take the main URL:

https://flowxo.com/hooks/b/9r8eqexp

Add a question mark to the end:
https://flowxo.com/hooks/b/9r8eqexp?

Insert a title for the data I’m sending and follow it with an equals sign, so for this example it’s ‘start=’
https://flowxo.com/hooks/b/9r8eqexp?start={{new_event.begins}}

For additional values I then use the same method but put an ampersand (&) in to separate them:
https://flowxo.com/hooks/b/9r8eqexp?start={{new_event.begins}}&end={{new_event.ends}}

Once you have the URL ready in your calendar flow you will need to trigger the webhook on the broadcast by adding a new event.

Now, on the second flow you can use the Bot > Send a Message Action to output the data you received to anyone that has talked to your bot:

Message:
{{receive_a_webhook.title}} {{receive_a_webhook.start}} - {{receive_a_webhook.end}}

I hope that helps. If you want further assistance with this please contact the support team at:
support@flowxo.com

Thanks,
Dan