# Recipes

## Automatically tweet a prediction for a match 30 minutes before it starts

### Trigger

* Make sure that you selected **Prediction** as a trigger for our action

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTSpx7lwlTYzbOrfnwP%2F-LTSsqYASSAYY1_uut53%2FPredictionTrigger.png?alt=media\&token=b3234104-64b5-4152-8196-5ce1fb0ad664)

* Use the credentials defined in [Connect to Zapier](https://developer.boggio-analytics.com/zapier-beta/connect-to-zapier) and click next until you reach **Set Up Options**

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTSpx7lwlTYzbOrfnwP%2F-LTStOOzaZYFqnYpdUxu%2FPredictionOpts.png?alt=media\&token=69fb582a-28b2-4a61-bb4a-579d154c6196)

* For the **prediction market** choose **Over 25** (or any other available prediction market)

{% hint style="info" %}
We will use Over 25 prediction market which predicts whether there will be more than or less than 2.5 goals scored in a match.

The available markets depends on your Football Prediction API subscription.

Details about each prediction market can be found [here](https://developer.boggio-analytics.com/getting-started/making-a-first-api-call#available-prediction-markets)
{% endhint %}

* Leave the **federation** field empty as we are interested in all available predictions.
* **Minutes before start** set this to 30. (we want to post to twitter 30 minutes before the start of the actual match)
* **Test this step** it is useful to have a sample for the current market

{% hint style="warning" %}
Make sure the **Minutes before start** is not higher than the maximum supported by your subscription:

* 12 hours for BASIC (**Minutes before start** should be lower than 720)
* 36 hours for PRO (**Minutes before start** should be lower than 2160)
* 48 hours for ULTRA and MEGA (**Minutes before start** should be lower than 2880)
  {% endhint %}

### Action

* Click **+Add a step** from the left panel and press **Action/Search**
* Search for **Twitter** and choose **Create Tweet**
* Connect to your **Twitter** account and **Edit Template**

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTSpx7lwlTYzbOrfnwP%2F-LTSwW6l-tf9IqeivXV0%2Fimage.png?alt=media\&token=3732a1f1-01f4-4f72-9fb7-c68055113f56)

* Write your template for the tweet, toggle **Setup Preview** to get an idea on how it would look based on the sampled prediction.
* With the template in place, you are almost done.
* A general recommendation is to click **Send Test To Twitter** to see the prediction actually posted to Twitter.

{% hint style="info" %}
When creating a Zap for the first time, Zapier will check all the available predictions for the **Minutes before start** you defined.

It automatically makes sure it doesn't post the same prediction twice, that is why it will start considering new predictions after the initial interval defined.

This means effectively that the recipe we just created will consider as new any match starting > 30 minutes from now.
{% endhint %}

## Save tomorrow's predictions for UEFA to a Google Sheets spreadsheet

{% hint style="danger" %}
This recipe requires a PRO/ULTRA/MEGA Football Prediction API subscription to work as described here but can be made to work with BASIC as well.

BASIC subscription only permits "seeing" predictions for matches that are starting in 12 hours max and won't be able to see "tomorrow" predictions as that would be 24 hours ahead.

If you want to use BASIC and Google Sheets you can follow the [Trigger](#trigger) steps for the Twitter recipe and use the Google Sheets Action described below.
{% endhint %}

### Trigger

* Make sure that you selected **Tomorrow's Predictions** as a trigger for our action

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTTLpC6vRbedUcexWMZ%2F-LTTR4gyf65zt3R9D2RI%2Fimage.png?alt=media\&token=9ef0095c-b747-4124-b491-8060449356d9)

* Use the credentials defined in [Connect to Zapier](https://developer.boggio-analytics.com/zapier-beta/connect-to-zapier) and click next until you reach **Set Up Options**
* For the **prediction market** choose **Over 35**

{% hint style="info" %}
We will use Over 35 prediction market which predicts whether there will be more than or less than 3.5 goals scored in a match. (yes or no)

The available markets depends on your Football Prediction API subscription.

Details about each prediction market can be found [here](https://developer.boggio-analytics.com/getting-started/making-a-first-api-call#available-prediction-markets)
{% endhint %}

* For the **federation** choose UEFA.
* **Test this step** as it is useful to have a sample for the current market.

### Action

* Click **+Add a step** from the left panel and press **Action/Search**
* Search for **Google Sheets** and choose **Create Spreadsheet Row**
* Connect to your **Google Sheets** account and **click continue**&#x20;

#### Google Sheets

* Copy the first row from this [Google Sheet template](https://docs.google.com/spreadsheets/d/1fbE2xLbd9xrs_JDyL0BE-8tZpBVg0MUTzP48djfmT7E/edit?usp=sharing) and create a new Google Spreadsheet where you will get the predictions.
* Paste the row into the new spreadsheet and optionally rename the Worksheet name of the current Worksheet to something matching the prediction market.

#### Back to Zapier

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTTUDwAKqSOSX1y_mTn%2F-LTT_EdgGkkKE1oNk0No%2Fimage.png?alt=media\&token=b814b3fc-c6b5-46ff-9a37-7755c191bd9e)

* You should now be in the **Edit Template** section of Zapier
* Set the **Speadsheet** to the one created earlier
* The **worksheet** should be the one renamed earlier.

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTTUDwAKqSOSX1y_mTn%2F-LTT_wXY_4u8W7UE6aGt%2Fimage.png?alt=media\&token=212950d0-c519-44a6-8c12-88713ec9ccc7)

* For each field in the Spreadsheet header we need to match one from the trigger.

{% hint style="danger" %}
Make sure each header is mapped correctly as an incorrect mapping would lead to inconsistencies
{% endhint %}

{% hint style="info" %}
Depending on your subscription type, you may not have access to all the fields. (e.g only MEGA has access to team strength)

Leave it blank if not found in the response from Step 1.
{% endhint %}

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTTUDwAKqSOSX1y_mTn%2F-LTTaRvviumwnP6twTGB%2Fimage.png?alt=media\&token=aa067ca5-f815-4470-b527-028459a8d24f)

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTTUDwAKqSOSX1y_mTn%2F-LTTaZSD45O0YW88UWWv%2Fimage.png?alt=media\&token=7ee40850-8537-4e50-a90d-356e0ee16735)

![](https://2291015899-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LSptjNWFuZaPDt1Y12e%2F-LTTUDwAKqSOSX1y_mTn%2F-LTTaer8w6r_tVP_MkLG%2Fimage.png?alt=media\&token=f9ffc463-4f00-4e76-a164-49da9009b55a)

* With the mapping in place, you are done, however it is recommended to test everything is working by pressing the **Send Test To Google Sheets** button
* If you go back to your Google Spreadsheet you should see the sample row sent by the test.
* You will start seeing new predictions added to you spreadsheet once a day after 00:00 London Timezone.

## Over 1000 apps on Zapier

These two recipes above serve as an example, you can use any of the over 1000 apps supported by Zapier and they all work automatically.

It is up to your imagination how you plan to use them.
