Yahoo!広告 スクリプト | Developer Center
EnglishGoogleアカウントとの連携
(1) 画面右上「外部ツール連携」をクリックします。![外部連携ツール](https://s.yimg.jp/images/ads-promo_edit/support/devcen/ads-script/script_list_gaiburenkei_aka.png)
(2) 「Sign in with Google」ボタンをクリックします。
![Sign in with Google](https://s.yimg.jp/images/ads-promo_edit/support/devcen/ads-script/gaibutool_aka.png)
(3) Googleのログイン画面が表示されますので、ご自身のGoogleアカウントでログインします。
※この際、ご利用予定のスプレッドシートを開けることをご確認ください。
(4) 「Yahoo!広告スクリプトがGoogle アカウントへの追加アクセスを求めています」と表示されるので、「すべて選択」にチェックをし、「続行」ボタンをクリックします。
![](https://s.yimg.jp/images/ads-promo_edit/support/devcen/ads-script/google-renkei.jpg)
(5) Yahoo!広告スクリプト画面に自動で戻ります。
画面内の「ステータス」列にチェックアイコンが表示されていれば、連携完了です。
![連携完了](https://s.yimg.jp/images/ads-promo_edit/support/devcen/ads-script/gaibutool_renkeizumi_aka.png)
GoogleスプレッドシートIDの取得方法
該当のGoogleスプレッドシートのURLで、下図の赤線部分がスプレッドシートIDです。こちらの文字列を、スプレッドシートIDとしてYahoo!広告 スクリプト内で指定してください。
![](https://s.yimg.jp/images/ads-promo_edit/support/devcen/ads-script/id_1.png)
参考:Google「Google Sheets APIの概要」Spreadsheet
https://developers.google.com/sheets/api/guides/concepts(2023-04-07)
GoogleドライブのファイルIDの取得方法
Googleドライブで対象のファイルの縦の三点リーダー「︙」をクリックし、「リンクを取得」をクリックします。![](https://s.yimg.jp/images/ads-promo_edit/support/devcen/ads-script/id_2.png)
任意のアクセスを設定して「リンクをコピー」をクリックした後、テキストエディタ等に貼り付けます。
貼り付けたURLの以下の赤字部分がファイルIDです。
https://drive.google.com/file/d/xxxxxxxxxxxxxxxxxxxx/view?usp=share_link
こちらの文字列を、ファイルIDとしてYahoo!広告 スクリプト内で指定してください。