Q: Hi, does this mean integration with facebook pixel?
Can I take the facebook ads matrix and put it on google sheets with this?
And can I call data from other google sheet files?
And can I work and call data between sheets in 1 google sheet file?
Wei_Sheng
May 14, 2024A: Hi thanks for your question! Here are my answers.
🙋 does this mean integration with facebook pixel?
Yes, you can build your query here using the FB Graph API explorer (https://developers.facebook.com/tools/explorer) and send the request via Power Formulas. You can use the "Get Code" feature in the FB Graph API explorer and use the cURL tab to see how to connect to the API using Power Formulas.
🙋 Can I take the facebook ads matrix and put it on google sheets with this?
Yes, this is possible, you can also use the FB Graph API explorer to build your query. Here is how to do it:
1. Access Token: First, you need to generate an access token. Go to the Facebook Graph API Explorer. Select your app from the top right Application dropdown. Click on the "Get Token" dropdown and select "Get User Access Token". In the pop-up, under the "Ads Management" section, select "ads_read". Click "Get Access Token".
2. Account ID: You need to know your Meta Ads account ID. It usually starts with act_. If you don't know your ad account ID, you can make a GET request to me/adaccounts to get a list of ad accounts.
3. Metrics: You can get the metrics of an ad by making a GET request to {ad-account-id}/insights. Replace {ad-account-id} with your actual ad account ID.
Here is an example of how to get the amount spent and impressions for an ad account:
GET /v17.0/act_{ad-account-id}/insights?fields=spend,impressions
Replace {ad-account-id} with your actual ad account ID.
This will return a JSON object with the spend and impressions.
Please note that the version (v13.0 in the example) may change depending on the current version of the Facebook Graph API.
You can also specify the date range for the insights data using since and until parameters in the format YYYY-MM-DD.
Please reach out to me if you encounter any questions!
🙋 And can I call data from other google sheet files?
Google Sheets already has another formula (IMPORTRANGE) that does this. Please read: https://support.google.com/docs/answer/3093340?hl=en
🙋 And can I work and call data between sheets in 1 google sheet file?
Same as the above question.
Hope this answers your question! Please reach out again if you want to know more!
Wei
BTW, to call the Facebook API, you need to use Power Formulas' =API() function.
Thank you, I am still confused whether when formulas have been set such as API formulas, SQL, and other than using AI formulas, they still use open AI tokens.
Hi, I'm not sure if I understand you correctly. If you use formulas like API and SQL, they don't consume your OpenAI tokens. OpenAI tokens are only consumed when using the AI formula. Let me know if this is what you want to know. Wei