2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

<Airtable>スプレッドシートからAirtableへPOSTする(GAS)

Last updated at Posted at 2020-07-26

毎日、あるスプレッドシートの値をAirtableに送るためのスクリプトを書いたので、メモとして残します。

結論

  var YOUR_API_KEY = "あなたのKEYを入れてください"
  var obj = {
    'fields': {
      "Airtableの項目名1": "値1",
      "Airtableの項目名2": "値2",
      "Airtableの項目名3": "値3",
    }
  }
  
  var headers = {
    'Authorization': 'Bearer ' + YOUR_API_KEY,
    'Content-Type': 'application/json'};
  var data = JSON.stringify(obj);
  var options = {
    'method' : 'post',
    "headers" : headers,
    'payload' : data
  };
  
  var response = UrlFetchApp.fetch('https://api.airtable.com/v0/データベースID/テーブルID',options);
2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?